diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-19 22:58:41 +0100 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-19 23:09:17 +0100 |
commit | 6841b6d9bb78af28c4d89c936c5663b31aa4fd5a (patch) | |
tree | 4e1106c00da7192c5617681b6dce0493eac335a3 /src/library | |
parent | 2d45cd84e262d7a4c6b977e7c6c26ce8d92c2615 (diff) |
Do not return void expressions
Fixes a bunch of `-Wclazy-returning-void-expression` warnings, since
returning void expressions is confusing and may hide subtle bugs. See
https://github.com/KDE/clazy/blob/master/docs/checks/README-returning-void-expression.md
for details.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/browse/browsethread.cpp | 3 | ||||
-rw-r--r-- | src/library/librarycontrol.cpp | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/library/browse/browsethread.cpp b/src/library/browse/browsethread.cpp index e3badf5d3d..774e56f9fc 100644 --- a/src/library/browse/browsethread.cpp +++ b/src/library/browse/browsethread.cpp @@ -142,7 +142,8 @@ void BrowseThread::populateModel() { if (thisPath.dir() != newPath.dir()) { qDebug() << "Abort populateModel()"; - return populateModel(); + populateModel(); + return; } QList<QStandardItem*> row_data; diff --git a/src/library/librarycontrol.cpp b/src/library/librarycontrol.cpp index 4366962e71..dc2f648ecc 100644 --- a/src/library/librarycontrol.cpp +++ b/src/library/librarycontrol.cpp @@ -643,7 +643,8 @@ void LibraryControl::slotGoToItem(double v) { // expanding those root items via controllers is considered dispensable // because the subfeatures' actions can't be accessed by controllers anyway. if (m_pSidebarWidget->isLeafNodeSelected()) { - return setLibraryFocus(); + setLibraryFocus(); + return; } else { // Otherwise toggle the sidebar item expanded state slotToggleSelectedSidebarItem(v); @@ -653,7 +654,8 @@ void LibraryControl::slotGoToItem(double v) { // Load current track if a LibraryView object has focus LibraryView* activeView = m_pLibraryWidget->getActiveView(); if (activeView && activeView->hasFocus()) { - return activeView->loadSelectedTrack(); + activeView->loadSelectedTrack(); + return; } // Clear the search if the searchbox has focus |