summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-07-14 18:49:16 (UTC)
committer llornkcor <llornkcor>2003-07-14 18:49:16 (UTC)
commitab28f35bc3c9c184862ac19462322eed2be0f541 (patch) (side-by-side diff)
tree99bff20a6ca5c4b19d972d72ca2ec9abbaaa0e9d
parenta62dda249a0b823e1aa006bbc502f72e9af7da95 (diff)
downloadopie-ab28f35bc3c9c184862ac19462322eed2be0f541.zip
opie-ab28f35bc3c9c184862ac19462322eed2be0f541.tar.gz
opie-ab28f35bc3c9c184862ac19462322eed2be0f541.tar.bz2
try to fix crash when insert drive. please test.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index d9fc8e4..5f050aa 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -152,56 +152,56 @@ void CategoryTabWidget::nextTab()
int tab = categoryBar->currentTab();
categoryBar->setCurrentTab( (tab + 1)%n );
}
}
void CategoryTabWidget::showTab(const QString& id)
{
if ( categoryBar ) {
int idx = ids.findIndex( id );
categoryBar->setCurrentTab( idx );
}
}
void CategoryTabWidget::addItem( const QString& linkfile )
{
int i=0;
AppLnk *app = new AppLnk(linkfile);
if ( !app->isValid() ) {
delete app;
app=0;
}
if ( !app || !app->file().isEmpty() ) {
// A document
- delete app;
- app = new DocLnk(linkfile);
- if ( app->fileKnown() ) {
- ((LauncherView*)(stack->widget(ids.count()-1)))->addItem(app);
- } else {
- ((LauncherView*)(stack->widget(ids.count()-1)))->sort();
- delete app;
- }
+// delete app;
+// app = new DocLnk(linkfile);
+// if ( app->fileKnown() ) {
+// ((LauncherView*)(stack->widget(ids.count()-1)))->addItem(app);
+// } else {
+// ((LauncherView*)(stack->widget(ids.count()-1)))->sort();
+// delete app;
+// }
return;
}
// An application
for ( QStringList::Iterator it=ids.begin(); it!=ids.end(); ++it) {
if ( !(*it).isEmpty() ) {
QRegExp tf(*it,FALSE,TRUE);
if ( tf.match(app->type()) >= 0 ) {
((LauncherView*)stack->widget(i))->addItem(app);
return;
}
i++;
}
}
QCopEnvelope e("QPE/TaskBar","reloadApps()");
}
void CategoryTabWidget::initializeCategories(AppLnkSet* rootFolder,
AppLnkSet* /*docFolder*/, const QList<FileSystem> & /*fs*/)
{
QString current;
if ( categoryBar ) {
int c = categoryBar->currentTab();
if ( c >= 0 ) current = ids[c];