]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.h
Reuse KFileItemActions instance during lifetime of dolphin
[dolphin.git] / src / dolphinmainwindow.h
index 40101852bab369f9ace27040ebab9fd5d12cbeb7..594c75691f72970aaa71971332fd4637b81203a1 100644 (file)
@@ -11,8 +11,8 @@
 
 #include "dolphintabwidget.h"
 #include <config-baloo.h>
+#include <KFileItemActions>
 #include <kio/fileundomanager.h>
-#include <KSortableList>
 #include <kxmlguiwindow.h>
 
 #ifdef HAVE_BALOO
@@ -225,6 +225,9 @@ protected:
     /** Handles QWhatsThisClickedEvent and passes all others on. */
     bool eventFilter(QObject*, QEvent*) override;
 
+    /** Sets a sane initial window size **/
+    QSize sizeHint() const override;
+
 protected Q_SLOTS:
     /**
      * Calls the base method KXmlGuiWindow::saveNewToolbarConfig().
@@ -470,6 +473,11 @@ private Q_SLOTS:
 
     /**
      * Updates the menu that is by default at the right end of the toolbar.
+     *
+     * In true "simple by default" fashion, the menu only contains the most important
+     * and necessary actions to be able to use Dolphin. This is supposed to hold true even
+     * if the user does not know how to open a context menu. More advanced actions can be
+     * discovered through a sub-menu (@see KConfigWidgets::KHamburgerMenu::setMenuBarAdvertised()).
      */
     void updateHamburgerMenu();
 
@@ -663,10 +671,9 @@ private:
     KToolBarPopupAction* m_backAction;
     KToolBarPopupAction* m_forwardAction;
 
-    /** Makes sure that only one object is ever connected to the history. */
-    QMetaObject::Connection m_updateHistoryConnection;
-
     QMenu m_searchTools;
+    KFileItemActions m_fileItemActions;
+
 };
 
 inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const