]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
get rid of unused warnings
[dolphin.git] / src / dolphinmainwindow.cpp
index f44d3236fc7fccc0b577090b6f42ce04e951ea22..eece5b8785892779e4926d7dccb3c1450de5c24c 100644 (file)
@@ -64,7 +64,6 @@
 #include <KFileItemListProperties>
 #include <KRun>
 #include <KShell>
-#include <kstatusbar.h>
 #include <KStandardAction>
 #include <KToggleAction>
 #include <KUrlNavigator>
@@ -498,6 +497,11 @@ void DolphinMainWindow::updatePasteAction()
     pasteAction->setText(pasteInfo.second);
 }
 
+void DolphinMainWindow::slotDirectoryLoadingCompleted()
+{
+    updatePasteAction();
+}
+
 void DolphinMainWindow::selectAll()
 {
     clearStatusBar();
@@ -619,7 +623,7 @@ void DolphinMainWindow::goHome()
 void DolphinMainWindow::goBack(Qt::MouseButtons buttons)
 {
     // The default case (left button pressed) is handled in goBack().
-    if (buttons == Qt::MidButton) {
+    if (buttons == Qt::MiddleButton) {
         KUrlNavigator* urlNavigator = activeViewContainer()->urlNavigator();
         const int index = urlNavigator->historyIndex() + 1;
         openNewTab(urlNavigator->locationUrl(index));
@@ -629,7 +633,7 @@ void DolphinMainWindow::goBack(Qt::MouseButtons buttons)
 void DolphinMainWindow::goForward(Qt::MouseButtons buttons)
 {
     // The default case (left button pressed) is handled in goForward().
-    if (buttons == Qt::MidButton) {
+    if (buttons == Qt::MiddleButton) {
         KUrlNavigator* urlNavigator = activeViewContainer()->urlNavigator();
         const int index = urlNavigator->historyIndex() - 1;
         openNewTab(urlNavigator->locationUrl(index));
@@ -639,7 +643,7 @@ void DolphinMainWindow::goForward(Qt::MouseButtons buttons)
 void DolphinMainWindow::goUp(Qt::MouseButtons buttons)
 {
     // The default case (left button pressed) is handled in goUp().
-    if (buttons == Qt::MidButton) {
+    if (buttons == Qt::MiddleButton) {
         openNewTab(KIO::upUrl(activeViewContainer()->url()));
     }
 }
@@ -647,7 +651,7 @@ void DolphinMainWindow::goUp(Qt::MouseButtons buttons)
 void DolphinMainWindow::goHome(Qt::MouseButtons buttons)
 {
     // The default case (left button pressed) is handled in goHome().
-    if (buttons == Qt::MidButton) {
+    if (buttons == Qt::MiddleButton) {
         openNewTab(GeneralSettings::self()->homeUrl());
     }
 }
@@ -1114,12 +1118,10 @@ void DolphinMainWindow::setupActions()
     KStandardAction::preferences(this, SLOT(editSettings()), actionCollection());
 
     // not in menu actions
-    QList<QKeySequence> nextTabKeys;
-    nextTabKeys.append(KStandardShortcut::tabNext().first()); //TODO: is this correct
+    QList<QKeySequence> nextTabKeys = KStandardShortcut::tabNext();
     nextTabKeys.append(QKeySequence(Qt::CTRL | Qt::Key_Tab));
 
-    QList<QKeySequence> prevTabKeys;
-    prevTabKeys.append(KStandardShortcut::tabPrev().first()); //TODO: is this correct
+    QList<QKeySequence> prevTabKeys = KStandardShortcut::tabPrev();
     prevTabKeys.append(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_Tab));
 
     QAction* activateNextTab = actionCollection()->addAction("activate_next_tab");
@@ -1428,6 +1430,8 @@ void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container)
             this, &DolphinMainWindow::enableStopAction);
     connect(view, &DolphinView::directoryLoadingCompleted,
             this, &DolphinMainWindow::disableStopAction);
+    connect(view, &DolphinView::directoryLoadingCompleted,
+            this, &DolphinMainWindow::slotDirectoryLoadingCompleted);
     connect(view, &DolphinView::goBackRequested,
             this, static_cast<void(DolphinMainWindow::*)()>(&DolphinMainWindow::goBack));
     connect(view, &DolphinView::goForwardRequested,