]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
Add i18 call to untranslated string
[dolphin.git] / src / views / dolphinview.cpp
index 035d3dc5589e88d2228873a0986a40f465333672..57c94a33befc59821bc37e912226d199dba5cfc5 100644 (file)
@@ -801,7 +801,7 @@ void DolphinView::slotItemsActivated(const QSet<int>& indexes)
     }
 
     if (items.count() > 5) {
-        QString question = QString("Are you sure you want to open %1 items?").arg(items.count());
+        QString question = i18np("Are you sure you want to open 1 item?", "Are you sure you want to open %1 items?", items.count());
         const int answer = KMessageBox::warningYesNo(this, question);
         if (answer != KMessageBox::Yes) {
             return;
@@ -851,7 +851,7 @@ void DolphinView::slotHeaderContextMenuRequested(const QPointF& pos)
     nepomukRunning = (Nepomuk2::ResourceManager::instance()->initialized());
     if (nepomukRunning) {
         KConfig config("nepomukserverrc");
-        indexingEnabled = config.group("Service-nepomukfileindexer").readEntry("autostart", false);
+        indexingEnabled = config.group("Service-nepomukfileindexer").readEntry("autostart", true);
     }
 #endif
 
@@ -1236,11 +1236,14 @@ void DolphinView::updateViewState()
 
         QSet<int> selectedItems = selectionManager->selectedItems();
 
-        for (QList<KUrl>::iterator it = m_selectedUrls.begin(); it != m_selectedUrls.end(); ++it) {
+        QList<KUrl>::iterator it = m_selectedUrls.begin();
+        while (it != m_selectedUrls.end()) {
             const int index = m_model->index(*it);
             if (index >= 0) {
                 selectedItems.insert(index);
-                m_selectedUrls.erase(it);
+                it = m_selectedUrls.erase(it);
+            } else {
+                 ++it;
             }
         }