]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix some compile warnings
authorRoman Inflianskas <infroma@gmail.com>
Sat, 3 Mar 2018 17:39:43 +0000 (20:39 +0300)
committerRoman Inflianskas <infroma@gmail.com>
Sun, 4 Mar 2018 07:27:31 +0000 (10:27 +0300)
Reviewers: #dolphin, markg

Reviewed By: markg

Subscribers: elvisangelaccio, #dolphin

Differential Revision: https://phabricator.kde.org/D10995

src/dolphincontextmenu.cpp
src/dolphinmainwindow.cpp
src/dolphintabwidget.cpp
src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kitemlistcontroller.cpp
src/panels/information/phononwidget.cpp

index de40d7eaa0356df55495d295774ffc818ea548f5..1f4e8f010054a30488588b21892df2fdb063ae2f 100644 (file)
@@ -431,6 +431,7 @@ 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 48e67733d3b031133937eabc212c29bf2695cc1c..abde14cdd9bd80ee98a612de7c367e5f22218e9b 100644 (file)
@@ -411,6 +411,8 @@ 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 d9b7d7e13eb2176fc8bd86f49544a1869bd349c4..da1ced4b31124cb86cf3242fabcf6f678352aea9 100644 (file)
@@ -91,7 +91,10 @@ 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 70014e1a758ba754570222abc70a3e0aa245bc89..ae0ad30b631fcf6d43adef4911c73cde144e49cd 100644 (file)
@@ -248,7 +248,6 @@ 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) {
@@ -271,9 +270,6 @@ QMimeData* KFileItemModel::createMimeData(const KItemSet& indexes) const
 
             bool isLocal;
             mostLocalUrls << item.mostLocalUrl(isLocal);
-            if (!isLocal) {
-                canUseMostLocalUrls = false;
-            }
         }
     }
 
index c8e109a05f00ca6046ef081b59dbaf3689f33cb2..cef58b643f37f4348de0c5da840a5176bd06cb80 100644 (file)
@@ -435,8 +435,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
index b8d3d6ef61a84f23499731657b77b05132dc7da6..94523c40dc1e8243853b3d72b02e7c07f27d7ee6 100644 (file)
 #include <Phonon/AudioOutput>
 #include <Phonon/MediaObject>
 #include <Phonon/SeekSlider>
+#pragma GCC diagnostic push                          // Phonon doesn't use C++11 compiler by default, so override
+#pragma GCC diagnostic ignored "-Wsuggest-override"  // specifier is not available. Remove this pragmas after fixing it.
 #include <Phonon/VideoWidget>
+#pragma GCC diagnostic pop
 
 #include <QVBoxLayout>
 #include <QShowEvent>