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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/tools/engineexplorer
From:       Laurent Montel <montel () kde ! org>
Date:       2009-06-26 11:42:02
Message-ID: 1246016522.133649.28527.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 987576 by mlaurent:

const'ify
fix include


 M  +3 -3      engineexplorer.cpp  
 M  +2 -1      ktreeviewsearchline.cpp  
 M  +2 -2      serviceviewer.cpp  


--- trunk/KDE/kdebase/workspace/plasma/tools/engineexplorer/engineexplorer.cpp \
#987575:987576 @@ -131,7 +131,7 @@
 {
     QList<QStandardItem*> items = m_dataModel->findItems(source, 0);
 
-    if (items.count() < 1) {
+    if (!items.isEmpty()) {
         return;
     }
 
@@ -184,7 +184,7 @@
         return;
     }
 
-    QStringList sources = m_engine->sources();
+    const QStringList sources = m_engine->sources();
 
     //kDebug() << "showing engine " << m_engine->objectName();
     //kDebug() << "we have " << sources.count() << " data sources";
@@ -268,7 +268,7 @@
             index = m_dataModel->index(index.row(), 0);
         }
 
-        QString source = index.data().toString();
+        const QString source = index.data().toString();
         KMenu menu;
         menu.addTitle(source);
         QAction *service = menu.addAction(i18n("Get associated service"));
--- trunk/KDE/kdebase/workspace/plasma/tools/engineexplorer/ktreeviewsearchline.cpp \
#987575:987576 @@ -36,7 +36,9 @@
 #include <kiconloader.h>
 #include <klocale.h>
 #include <ktoolbar.h>
+#include <kvbox.h>
 
+
 class KTreeViewSearchLine::Private
 {
   public:
@@ -175,7 +177,6 @@
 #endif
 }
 
-#include <kvbox.h>
 
 /** Check whether \p item, its siblings and their descendents should be shown. Show \
                or hide the items as necessary.
  *
--- trunk/KDE/kdebase/workspace/plasma/tools/engineexplorer/serviceviewer.cpp \
#987575:987576 @@ -88,7 +88,7 @@
     m_operationDescription->clear();
 
     if (m_service) {
-        QStringList operations = m_service->operationNames();
+        const QStringList operations = m_service->operationNames();
 
         if (!operations.isEmpty()) {
             enable = true;
@@ -142,7 +142,7 @@
 
     KConfigGroup desc = m_service->operationDescription(operation);
     int i = 0;
-    QStringList keys = desc.keyList();
+    const QStringList keys = desc.keyList();
     m_operationDescription->setRowCount(keys.count());
     foreach (const QString &key, keys) {
         QTableWidgetItem *item = new QTableWidgetItem(key);


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

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