]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
kconfig_add_kcfg_files: Fix warnings about including empty moc file
[dolphin.git] / src / dolphinmainwindow.cpp
index 8816164801808ce19007ccbc2b85a394ddb0f6c1..f14849e6d437eeac1c877da122881b6d9ae32493 100644 (file)
@@ -24,7 +24,6 @@
 #include "panels/folders/folderspanel.h"
 #include "panels/places/placesitemmodel.h"
 #include "panels/places/placespanel.h"
-#include "panels/information/informationpanel.h"
 #include "panels/terminal/terminalpanel.h"
 #include "settings/dolphinsettingsdialog.h"
 #include "statusbar/dolphinstatusbar.h"
@@ -178,7 +177,7 @@ DolphinMainWindow::DolphinMainWindow() :
     if (firstRun) {
         menuBar()->setVisible(false);
         // Assure a proper default size if Dolphin runs the first time
-        resize(750, 500);
+        resize(760, 550);
     }
 
     const bool showMenu = !menuBar()->isHidden();
@@ -257,7 +256,11 @@ bool DolphinMainWindow::isFoldersPanelEnabled() const
 
 bool DolphinMainWindow::isInformationPanelEnabled() const
 {
+#ifdef HAVE_BALOO
     return actionCollection()->action(QStringLiteral("show_information_panel"))->isChecked();
+#else
+    return false;
+#endif
 }
 
 void DolphinMainWindow::openFiles(const QStringList& files, bool splitView)
@@ -1032,7 +1035,7 @@ void DolphinMainWindow::openTerminal()
     const QUrl url = m_activeViewContainer->url();
 
     if (url.isLocalFile()) {
-        KToolInvocation::invokeTerminal(QString(), url.toLocalFile());
+        KToolInvocation::invokeTerminal(QString(), {}, url.toLocalFile());
         return;
     }
 
@@ -1046,14 +1049,14 @@ void DolphinMainWindow::openTerminal()
                 statUrl = job->mostLocalUrl();
             }
 
-            KToolInvocation::invokeTerminal(QString(), statUrl.isLocalFile() ? statUrl.toLocalFile() : QDir::homePath());
+            KToolInvocation::invokeTerminal(QString(), {}, statUrl.isLocalFile() ? statUrl.toLocalFile() : QDir::homePath());
         });
 
         return;
     }
 
     // Nothing worked, just use $HOME
-    KToolInvocation::invokeTerminal(QString(), QDir::homePath());
+    KToolInvocation::invokeTerminal(QString(), {}, QDir::homePath());
 }
 
 void DolphinMainWindow::editSettings()
@@ -1239,7 +1242,9 @@ void DolphinMainWindow::slotPlaceActivated(const QUrl& url)
         // which had been unmounted earlier, see https://bugs.kde.org/show_bug.cgi?id=161385.
         reloadView();
     } else {
+        view->disableUrlNavigatorSelectionRequests();
         changeUrl(url);
+        view->enableUrlNavigatorSelectionRequests();
     }
 }
 
@@ -1782,6 +1787,8 @@ void DolphinMainWindow::setupDockWidgets()
             infoPanel, &InformationPanel::setSelection);
     connect(this, &DolphinMainWindow::requestItemInfo,
             infoPanel, &InformationPanel::requestDelayedItemInfo);
+    connect(this, &DolphinMainWindow::fileItemsChanged,
+            infoPanel, &InformationPanel::slotFilesItemChanged);
 #endif
 
     // i18n: This is the last paragraph for the "What's This"-texts of all four panels.
@@ -2167,6 +2174,8 @@ void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container)
             this, &DolphinMainWindow::slotSelectionChanged);
     connect(view, &DolphinView::requestItemInfo,
             this, &DolphinMainWindow::requestItemInfo);
+    connect(view, &DolphinView::fileItemsChanged,
+            this, &DolphinMainWindow::fileItemsChanged);
     connect(view, &DolphinView::tabRequested,
             this, &DolphinMainWindow::openNewTab);
     connect(view, &DolphinView::requestContextMenu,