]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix some compile warnings
authorRoman Inflianskas <infroma@gmail.com>
Thu, 8 Mar 2018 09:21:13 +0000 (12:21 +0300)
committerRoman Inflianskas <infroma@gmail.com>
Sat, 10 Mar 2018 15:07:47 +0000 (18:07 +0300)
Reviewers: markg, elvisangelaccio

Reviewed By: markg, elvisangelaccio

Subscribers: chehrlic, rkflx, elvisangelaccio, #dolphin

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

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

index a1dd08c50cd6774e97e417d59c056b695e6ed4e0..677d1bc160fa6cf76a894cc168702e0dbc145845 100644 (file)
@@ -7,7 +7,7 @@ set (KDE_APPLICATIONS_VERSION_MICRO "70")
 set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
 project(Dolphin VERSION ${KDE_APPLICATIONS_VERSION})
 
-set(QT_MIN_VERSION "5.5.0")
+set(QT_MIN_VERSION "5.8.0")
 set(KF5_MIN_VERSION "5.43.0")
 set(ECM_MIN_VERSION "1.6.0")
 
index 94c1d7ce89bbb061b9662756138e8de7633a66bd..c35f442cba8422dbaecd74f13bd09026c13e537b 100644 (file)
@@ -428,6 +428,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 762e21f940834951423357f070e2302bd898fd79..87f974fc1513f363074ca717c5bc86eaf73f5b65 100644 (file)
@@ -410,6 +410,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event)
             case QDialogButtonBox::No:
                 // Close only the current tab
                 m_tabWidget->closeTab();
+                Q_FALLTHROUGH();
             default:
                 event->ignore();
                 return;
index d4f3561257445375bb635e1ac3c9f854d700b6b2..b6a0016428a2110ce443e78e113e96784edfc408 100644 (file)
@@ -246,7 +246,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) {
@@ -269,9 +268,6 @@ QMimeData* KFileItemModel::createMimeData(const KItemSet& indexes) const
 
             bool isLocal;
             mostLocalUrls << item.mostLocalUrl(isLocal);
-            if (!isLocal) {
-                canUseMostLocalUrls = false;
-            }
         }
     }
 
index 672c31ae4f28b3c8cfd2d710733b1a3db8005cec..bde2bb26c14b1985faf5d015398ec2258240a191 100644 (file)
@@ -433,8 +433,7 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
                 }
             }
         }
-        // Fall through to the default case and add the Space to the current search string.
-
+        Q_FALLTHROUGH();  // 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 fed6b0ee2850870cc242c2817ae0737392a68381..494429b8c23cbd6595b8b9ca82907698ecc6d931 100644 (file)
@@ -167,7 +167,7 @@ void PhononWidget::stateChanged(Phonon::State newstate)
             m_videoPlayer->hide();
         }
         emit hasVideoChanged(false);
-        // fall through
+        Q_FALLTHROUGH();
     default:
         m_stopButton->hide();
         m_playButton->show();