]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Dolphin: Remove unused code, fix clazy warnings
authorMéven Car <meven@kde.org>
Tue, 5 Dec 2023 15:46:52 +0000 (16:46 +0100)
committerMéven Car <meven@kde.org>
Thu, 14 Dec 2023 09:36:58 +0000 (10:36 +0100)
src/dolphinmainwindow.cpp
src/dolphinpart.h
src/kitemviews/kstandarditemlistwidget.cpp
src/kitemviews/kstandarditemlistwidget.h

index ccdd7fcc5b1e821b2eff6dac5d035cadb2c13c5a..449d7b4ffca0d75063156773eb070027b6715a20 100644 (file)
@@ -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<DolphinContextMenu> 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) {
index af0acb171ef5406d0549a3d5f9103aa8ce689928..aec427753198f2f89135ee4d12609899823be2b3 100644 (file)
@@ -88,6 +88,14 @@ public:
         return m_nameFilter;
     }
 
+    /**
+     * Don't use this. Always @returns an empty list. It only exists to silence moc.
+     */
+    QList<QUrl> filesToSelect() const
+    {
+        return QList<QUrl>();
+    }
+
 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<QUrl> &files);
-    QList<QUrl> filesToSelect() const
-    {
-        return QList<QUrl>();
-    } // silence moc
 
     bool eventFilter(QObject *, QEvent *) override;
 
index b3721aed9a3c66ea7145872ef94ad1db0c239df6..2a28d198ab5ad8d4a6cb9b9631a91e5d46b74b3e 100644 (file)
@@ -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) {
index a09f0c7a83090ae384f8d36dcff20c37a0c2fd03..ca3cf52e1cae27cd1c04d4edfcfb2f412ce315aa 100644 (file)
@@ -80,7 +80,6 @@ public:
     ~KStandardItemListWidget() override;
 
     void setLayout(Layout layout);
-    Layout layout() const;
 
     void setHighlightEntireRow(bool highlightEntireRow);
     bool highlightEntireRow() const;