KDE/kdebase/workspace

Davide Bettio davbet at aliceposta.it
Mon Apr 28 19:11:13 CEST 2008


SVN commit 802143 by bettio:

Replacing exec() with run(): this change wasn't discussed during the tokamak meeting.
run() method is more obvious than exec() (don't forget that a runner run :) ).
Anyway during the meeting we have decided to replace createMatchOptions() with createRunOptions()
and (set)hasMatchOptions() with (set)hasRunOptions(), now with this commit we have a more coherent naming.
CCMAIL: panel-devel at kde.org


 M  +2 -2      krunner/interface.cpp  
 M  +1 -1      krunner/interface.h  
 M  +2 -2      libs/plasma/abstractrunner.cpp  
 M  +4 -4      libs/plasma/abstractrunner.h  
 M  +1 -1      libs/plasma/scripting/runnerscript.cpp  
 M  +1 -1      libs/plasma/scripting/runnerscript.h  
 M  +2 -2      libs/plasma/searchmatch.cpp  
 M  +1 -1      libs/plasma/searchmatch.h  
 M  +2 -2      plasma/runners/bookmarks/bookmarksrunner.cpp  
 M  +1 -1      plasma/runners/bookmarks/bookmarksrunner.h  
 M  +1 -1      plasma/runners/locations/locationrunner.cpp  
 M  +1 -1      plasma/runners/locations/locationrunner.h  
 M  +1 -1      plasma/runners/services/servicerunner.cpp  
 M  +1 -1      plasma/runners/services/servicerunner.h  
 M  +1 -1      plasma/runners/sessions/sessionrunner.cpp  
 M  +1 -1      plasma/runners/sessions/sessionrunner.h  
 M  +1 -1      plasma/runners/shell/shellrunner.cpp  
 M  +1 -1      plasma/runners/shell/shellrunner.h  
 M  +1 -1      plasma/runners/webshortcuts/webshortcutrunner.cpp  
 M  +1 -1      plasma/runners/webshortcuts/webshortcutrunner.h  
 M  +1 -1      plasma/runners/xesam/xesamrunner.cpp  
 M  +1 -1      plasma/runners/xesam/xesamrunner.h  


--- trunk/KDE/kdebase/workspace/krunner/interface.cpp #802142:802143
@@ -89,7 +89,7 @@
 
         void activate(const Plasma::SearchContext *context) const
         {
-            m_action->exec(context);
+            m_action->run(context);
         }
 
         bool actionEnabled() const
@@ -652,7 +652,7 @@
     }
 }
 
-void Interface::exec()
+void Interface::run()
 {
     if (!m_execQueued && m_searchTerm->completionBox() && m_searchTerm->completionBox()->isVisible()) {
         queueMatch();
--- trunk/KDE/kdebase/workspace/krunner/interface.h #802142:802143
@@ -70,7 +70,7 @@
         void queueUpdates();
         void updateMatches();
         void setWidgetPalettes();
-        void exec();
+        void run();
         void matchActivated( QListWidgetItem* );
         void showOptions(bool show);
         void setDefaultItem( QListWidgetItem* );
--- trunk/KDE/kdebase/workspace/libs/plasma/abstractrunner.cpp #802142:802143
@@ -210,10 +210,10 @@
     return &Private::bigLock;
 }
 
-void AbstractRunner::exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
+void AbstractRunner::run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
 {
     if (d->script) {
-        return d->script->exec(search, action);
+        return d->script->run(search, action);
     }
 }
 
--- trunk/KDE/kdebase/workspace/libs/plasma/abstractrunner.h #802142:802143
@@ -89,8 +89,8 @@
          * The match will be activated if the user selects it.
          *
          * If this runner's exact match is selected, it will be passed into
-         * the exec method.
-         * @see exec
+         * the run method.
+         * @see run
          *
          * Since each runner is executed in its own thread there is no need
          * to return from this method right away, nor to create all matches
@@ -107,7 +107,7 @@
 
         /**
          * If the runner has options that the user can interact with to modify
-         * what happens when exec or one of the actions created in fillMatches
+         * what happens when run or one of the actions created in fillMatches
          * is called, the runner should return true
          */
         bool hasRunOptions();
@@ -139,7 +139,7 @@
          * Called whenever an exact or possible match associated with this
          * runner is triggered.
          */
-        virtual void exec(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
+        virtual void run(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
 
         /**
          * The nominal speed of the runner.
--- trunk/KDE/kdebase/workspace/libs/plasma/scripting/runnerscript.cpp #802142:802143
@@ -57,7 +57,7 @@
     Q_UNUSED(search)
 }
 
-void RunnerScript::exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
+void RunnerScript::run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
 {
     Q_UNUSED(search)
     Q_UNUSED(action)
--- trunk/KDE/kdebase/workspace/libs/plasma/scripting/runnerscript.h #802142:802143
@@ -68,7 +68,7 @@
      * Called whenever an exact or possible match associated with this
      * runner is triggered.
      */
-    virtual void exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action);
+    virtual void run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action);
 
 protected:
     /**
--- trunk/KDE/kdebase/workspace/libs/plasma/searchmatch.cpp #802142:802143
@@ -142,14 +142,14 @@
     return d->relevance < other.d->relevance;
 }
 
-void SearchMatch::exec(const SearchContext *context) const
+void SearchMatch::run(const SearchContext *context) const
 {
     Q_ASSERT(context);
 
     //kDebug() << "we have" << context->searchTerm() << context->mimetype();
     if (d->runner) {
         //TODO: this could be dangerous if the runner is deleted behind our backs.
-        d->runner->exec(context, this);
+        d->runner->run(context, this);
     }
 }
 
--- trunk/KDE/kdebase/workspace/libs/plasma/searchmatch.h #802142:802143
@@ -106,7 +106,7 @@
 
         bool operator<(const SearchMatch& other) const;
 
-        void exec(const SearchContext *context) const;
+        void run(const SearchContext *context) const;
 
     private:
         class Private;
--- trunk/KDE/kdebase/workspace/plasma/runners/bookmarks/bookmarksrunner.cpp #802142:802143
@@ -142,11 +142,11 @@
     return icon;
 }
 
-void BookmarksRunner::exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
+void BookmarksRunner::run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
 {
     Q_UNUSED(search);
     KUrl url = (KUrl)action->data().toString();
-    //kDebug() << "BookmarksRunner::exec opening: " << url.url();
+    //kDebug() << "BookmarksRunner::run opening: " << url.url();
     KToolInvocation::invokeBrowser(url.url());
 }
 
--- trunk/KDE/kdebase/workspace/plasma/runners/bookmarks/bookmarksrunner.h #802142:802143
@@ -39,7 +39,7 @@
         ~BookmarksRunner();
 
         void match(Plasma::SearchContext *context);
-        void exec(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
+        void run(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
 
     private:
         KIcon getFavicon(const KUrl &url);
--- trunk/KDE/kdebase/workspace/plasma/runners/locations/locationrunner.cpp #802142:802143
@@ -111,7 +111,7 @@
     }
 }
 
-void LocationsRunner::exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
+void LocationsRunner::run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
 {
     QString data = action->data().toString();
     const QString location = search->searchTerm();
--- trunk/KDE/kdebase/workspace/plasma/runners/locations/locationrunner.h #802142:802143
@@ -31,7 +31,7 @@
         ~LocationsRunner();
 
         void match(Plasma::SearchContext *search);
-        void exec(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
+        void run(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
 
     private:
         Plasma::SearchContext::Type m_type;
--- trunk/KDE/kdebase/workspace/plasma/runners/services/servicerunner.cpp #802142:802143
@@ -112,7 +112,7 @@
     search->addMatches(term, matches);
 }
 
-void ServiceRunner::exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
+void ServiceRunner::run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
 {
     Q_UNUSED(search);
     QMutexLocker lock(bigLock());
--- trunk/KDE/kdebase/workspace/plasma/runners/services/servicerunner.h #802142:802143
@@ -43,7 +43,7 @@
         ~ServiceRunner();
 
         void match(Plasma::SearchContext *context);
-        void exec(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
+        void run(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
 
     protected:
         void setupAction(const KService::Ptr &service, Plasma::SearchMatch *action);
--- trunk/KDE/kdebase/workspace/plasma/runners/sessions/sessionrunner.cpp #802142:802143
@@ -183,7 +183,7 @@
     search->addMatches(term, matches);
 }
 
-void SessionRunner::exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
+void SessionRunner::run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
 {
     Q_UNUSED(search);
     if (action->data().type() == QVariant::Int) {
--- trunk/KDE/kdebase/workspace/plasma/runners/sessions/sessionrunner.h #802142:802143
@@ -37,7 +37,7 @@
         ~SessionRunner();
 
         void match(Plasma::SearchContext *context);
-        void exec(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
+        void run(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
 
         enum { LogoutAction = 1, ShutdownAction, RestartAction, LockAction };
 
--- trunk/KDE/kdebase/workspace/plasma/runners/shell/shellrunner.cpp #802142:802143
@@ -81,7 +81,7 @@
     m_inTerminal = inTerminal;
 }
 
-void ShellRunner::exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
+void ShellRunner::run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
 {
     Q_UNUSED(action);
     if (!m_enabled) {
--- trunk/KDE/kdebase/workspace/plasma/runners/shell/shellrunner.h #802142:802143
@@ -38,7 +38,7 @@
 
         void createMatchOptions(QWidget* parent);
         void match(Plasma::SearchContext *search);
-        void exec(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
+        void run(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
 
 
     public slots:
--- trunk/KDE/kdebase/workspace/plasma/runners/webshortcuts/webshortcutrunner.cpp #802142:802143
@@ -127,7 +127,7 @@
     return icon;
 }
 
-void WebshortcutRunner::exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
+void WebshortcutRunner::run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
 {
     QString location = getSearchQuery(action->data().toString(), search->searchTerm());
 
--- trunk/KDE/kdebase/workspace/plasma/runners/webshortcuts/webshortcutrunner.h #802142:802143
@@ -31,7 +31,7 @@
         ~WebshortcutRunner();
 
         void match(Plasma::SearchContext *search);
-        void exec(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
+        void run(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
 
     private:
         QString getSearchQuery(const QString &query, const QString &searchWord);
--- trunk/KDE/kdebase/workspace/plasma/runners/xesam/xesamrunner.cpp #802142:802143
@@ -106,7 +106,7 @@
     }
 }
 
-void XesamRunner::exec(const Plasma::SearchContext *context,
+void XesamRunner::run(const Plasma::SearchContext *context,
                        const Plasma::SearchMatch *match)
 {
     QMutexLocker lock(bigLock());
--- trunk/KDE/kdebase/workspace/plasma/runners/xesam/xesamrunner.h #802142:802143
@@ -31,7 +31,7 @@
         ~XesamRunner();
 
         void match(Plasma::SearchContext *context);
-        void exec(const Plasma::SearchContext *context,
+        void run(const Plasma::SearchContext *context,
                   const Plasma::SearchMatch *match);
 };
 


More information about the Panel-devel mailing list