From: Méven Car Date: Tue, 5 Dec 2023 15:46:52 +0000 (+0100) Subject: Dolphin: Remove unused code, fix clazy warnings X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/2aa5477ccfaf9aeb9e0d6241f62da94b08f363ea?ds=sidebyside Dolphin: Remove unused code, fix clazy warnings --- diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index ccdd7fcc5..449d7b4ff 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1309,7 +1309,7 @@ void DolphinMainWindow::slotWriteStateChanged(bool isFolderWritable) void DolphinMainWindow::openContextMenu(const QPoint &pos, const KFileItem &item, const KFileItemList &selectedItems, const QUrl &url) { QPointer contextMenu = new DolphinContextMenu(this, item, selectedItems, url, &m_fileItemActions); - contextMenu.data()->exec(pos); + contextMenu->exec(pos); // Delete the menu, unless it has been deleted in its own nested event loop already. if (contextMenu) { diff --git a/src/dolphinpart.h b/src/dolphinpart.h index af0acb171..aec427753 100644 --- a/src/dolphinpart.h +++ b/src/dolphinpart.h @@ -88,6 +88,14 @@ public: return m_nameFilter; } + /** + * Don't use this. Always @returns an empty list. It only exists to silence moc. + */ + QList filesToSelect() const + { + return QList(); + } + protected: /** * We reimplement openUrl so no need to implement openFile. @@ -214,10 +222,6 @@ private Q_SLOTS: * Called by konqueror --select */ void setFilesToSelect(const QList &files); - QList filesToSelect() const - { - return QList(); - } // silence moc bool eventFilter(QObject *, QEvent *) override; diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index b3721aed9..2a28d198a 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -295,11 +295,6 @@ void KStandardItemListWidget::setLayout(Layout layout) } } -KStandardItemListWidget::Layout KStandardItemListWidget::layout() const -{ - return m_layout; -} - void KStandardItemListWidget::setHighlightEntireRow(bool highlightEntireRow) { if (m_highlightEntireRow != highlightEntireRow) { diff --git a/src/kitemviews/kstandarditemlistwidget.h b/src/kitemviews/kstandarditemlistwidget.h index a09f0c7a8..ca3cf52e1 100644 --- a/src/kitemviews/kstandarditemlistwidget.h +++ b/src/kitemviews/kstandarditemlistwidget.h @@ -80,7 +80,6 @@ public: ~KStandardItemListWidget() override; void setLayout(Layout layout); - Layout layout() const; void setHighlightEntireRow(bool highlightEntireRow); bool highlightEntireRow() const;