]> cloud.milkyroute.net Git - dolphin.git/commitdiff
replace list.count() > 0 by !list.isEmpty()
authorPeter Penz <peter.penz19@gmail.com>
Thu, 23 Jul 2009 06:14:57 +0000 (06:14 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 23 Jul 2009 06:14:57 +0000 (06:14 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1001386

src/dolphincontextmenu.cpp
src/dolphincontroller.cpp
src/draganddrophelper.cpp
src/panels/information/informationpanelcontent.cpp
src/revisioncontrolobserver.cpp

index cd3195e9ae4bffc5ada6806674e1b43b554dbfc5..6d5e24dc5f06b01f055e980c3ce8349561b15e92 100644 (file)
@@ -88,7 +88,7 @@ void DolphinContextMenu::open()
         m_context |= TrashContext;
     }
 
-    if (!m_fileInfo.isNull() && (m_selectedItems.count() > 0)) {
+    if (!m_fileInfo.isNull() && !m_selectedItems.isEmpty()) {
         m_context |= ItemContext;
         // TODO: handle other use cases like devices + desktop files
     }
@@ -394,7 +394,7 @@ void DolphinContextMenu::addRevisionControlActions(KMenu* menu)
 {
     const DolphinView* view = m_mainWindow->activeViewContainer()->view();
     const QList<QAction*> revControlActions = view->revisionControlActions(m_selectedItems);
-    if (revControlActions.count() > 0) {
+    if (!revControlActions.isEmpty()) {
         foreach (QAction* action, revControlActions) {
             menu->addAction(action);
         }
index 85ff5039f79582363031ee4d92b91ed2cd3b7bf5..eaa27c0f468e7802bcad5c434573d738efb126e4 100644 (file)
@@ -138,7 +138,7 @@ void DolphinController::handleKeyPressEvent(QKeyEvent* event)
     const bool trigger = currentIndex.isValid()
                          && ((event->key() == Qt::Key_Return)
                             || (event->key() == Qt::Key_Enter))
-                         && (selModel->selectedIndexes().count() > 0);
+                         && !selModel->selectedIndexes().isEmpty();
     if (trigger) {
         const QModelIndexList indexList = selModel->selectedIndexes();
         foreach (const QModelIndex& index, indexList) {
index fa4c9856612c839ba18ea0086e3c5f5350e3c31f..637117a2b72a3af586dcc614173271fbb9969aa1 100644 (file)
@@ -64,7 +64,7 @@ void DragAndDropHelper::startDrag(QAbstractItemView* itemView,
     isDragging = true;
 
     QModelIndexList indexes = itemView->selectionModel()->selectedIndexes();
-    if (indexes.count() > 0) {
+    if (!indexes.isEmpty()) {
         QMimeData *data = itemView->model()->mimeData(indexes);
         if (data == 0) {
             return;
index d4c52a04794ed52acb28e294c72139e7aba5329d..9f417a379db07f367a916b2aa684aab844245ffe 100644 (file)
@@ -424,7 +424,7 @@ void InformationPanelContent::configureSettings()
         ++it;
     }
 
-    if (actions.count() > 0) {
+    if (!actions.isEmpty()) {
         popup.addSeparator();
 
         // add all items alphabetically sorted to the popup
index d6c2cb675d78ed7691001253186e428bb28661e4..5b3c38947af190ae0b469c323f4c77105a8781e6 100644 (file)
@@ -63,7 +63,7 @@ void UpdateItemStatesThread::setData(RevisionControlPlugin* plugin,
 
 void UpdateItemStatesThread::run()
 {
-    Q_ASSERT(m_itemStates.count() > 0);
+    Q_ASSERT(!m_itemStates.isEmpty());
     Q_ASSERT(m_plugin != 0);
     
     // it is assumed that all items have the same parent directory