]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Revert "Fix some compile warnings"
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Mon, 5 Mar 2018 20:56:15 +0000 (21:56 +0100)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Mon, 5 Mar 2018 20:56:15 +0000 (21:56 +0100)
This reverts commit 533f050855a50212bba7be57a1590f9ce743e26d.

D10995 has not been approved.

src/dolphincontextmenu.cpp
src/dolphinmainwindow.cpp
src/dolphintabwidget.cpp
src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kitemlistcontroller.cpp

index c35f442cba8422dbaecd74f13bd09026c13e537b..94c1d7ce89bbb061b9662756138e8de7633a66bd 100644 (file)
@@ -428,7 +428,6 @@ void DolphinContextMenu::addShowMenuBarAction()
 
 bool DolphinContextMenu::placeExists(const QUrl& url) const
 {
-    Q_UNUSED(url)
     // Creating up a PlacesItemModel to find out if 'url' is one of the Places
     // can be expensive because the model asks Solid for the devices which are
     // available, which can take some time.
index 462675c09a41be884bd6c565214e5f72f2c41803..762e21f940834951423357f070e2302bd898fd79 100644 (file)
@@ -410,8 +410,6 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event)
             case QDialogButtonBox::No:
                 // Close only the current tab
                 m_tabWidget->closeTab();
-                // Do not quit, ignore quit event
-                // fall through
             default:
                 event->ignore();
                 return;
index 8b13cebe6258c1510f5786ec92c6fcfb08cff5d6..0271ed5688af9259b6f999c359a8a4be33b5667c 100644 (file)
@@ -92,10 +92,7 @@ void DolphinTabWidget::readProperties(const KConfigGroup& group)
         } else {
             // Tab state created with Dolphin <= 4.14.x
             const QByteArray state = group.readEntry("Tab " % QString::number(i), QByteArray());
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
             tabPageAt(i)->restoreStateV1(state);
-#pragma GCC diagnostic pop
         }
     }
 
index b6a0016428a2110ce443e78e113e96784edfc408..d4f3561257445375bb635e1ac3c9f854d700b6b2 100644 (file)
@@ -246,6 +246,7 @@ QMimeData* KFileItemModel::createMimeData(const KItemSet& indexes) const
     // Copyright (C) 2006 David Faure <faure@kde.org>
     QList<QUrl> urls;
     QList<QUrl> mostLocalUrls;
+    bool canUseMostLocalUrls = true;
     const ItemData* lastAddedItem = nullptr;
 
     for (int index : indexes) {
@@ -268,6 +269,9 @@ QMimeData* KFileItemModel::createMimeData(const KItemSet& indexes) const
 
             bool isLocal;
             mostLocalUrls << item.mostLocalUrl(isLocal);
+            if (!isLocal) {
+                canUseMostLocalUrls = false;
+            }
         }
     }
 
index 36d8e4671b3ad5626e77f0502bcc5ed355eb17ab..672c31ae4f28b3c8cfd2d710733b1a3db8005cec 100644 (file)
@@ -433,8 +433,8 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
                 }
             }
         }
-        // fall through
-        // to the default case and add the Space to the current search string.
+        // Fall through to the default case and add the Space to the current search string.
+
     default:
         m_keyboardManager->addKeys(event->text());
         // Make sure unconsumed events get propagated up the chain. #302329