[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.4/kdebase/workspace/plasma/generic/runners/places
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2010-01-18 22:12:13
Message-ID: 1263852733.561296.14486.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1076818 by aseigo:

move the pre-creatin of the places model to the ctor rather than on each show; slows \
start up a bit, but makes showing the interface instant, while still avoiding crashes


 M  +4 -8      placesrunner.cpp  
 M  +0 -1      placesrunner.h  


--- branches/KDE/4.4/kdebase/workspace/plasma/generic/runners/places/placesrunner.cpp \
#1076817:1076818 @@ -31,20 +31,16 @@
     setObjectName("Places");
     addSyntax(Plasma::RunnerSyntax(":q:", i18n("Finds file manager locations that \
                match :q:")));
     addSyntax(Plasma::RunnerSyntax(i18n("places"), i18n("Lists all file manager \
                locations")));
-    connect(this, SIGNAL(prepare()), this, SLOT(prepPlacesModel()));
+
+    // makes sure we have the bookmarks and what not that the places
+    // model uses set up in the main thread, otherwise crashes ensue
+    KFilePlacesModel places;
 }
 
 PlacesRunner::~PlacesRunner()
 {
 }
 
-void PlacesRunner::prepPlacesModel()
-{
-    // this may look odd, but this makes sure we have the bookmarks and what not \
                that the places
-    // model uses set up so we can get instant matches once we get to that point
-    KFilePlacesModel places;
-}
-
 void PlacesRunner::match(Plasma::RunnerContext &context)
 {
     const QString term = context.query();
--- branches/KDE/4.4/kdebase/workspace/plasma/generic/runners/places/placesrunner.h \
#1076817:1076818 @@ -36,7 +36,6 @@
     void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch \
&action);  
 private slots:
-    void prepPlacesModel();
     void setupComplete(QModelIndex, bool);
 };
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic