]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/information/informationpanel.cpp
Make global view properties the default setting
[dolphin.git] / src / panels / information / informationpanel.cpp
index 850d94d92234ace1a7b1b8fe4f758d1647a2b2ac..a0aeaaa37651444331e02b867ce99327dd599e1b 100644 (file)
 #include "informationpanel.h"
 
 #include "informationpanelcontent.h"
+
 #include <KIO/Job>
 #include <KIO/JobUiDelegate>
 #include <KJobWidgets>
 #include <KDirNotify>
+
 #include <QApplication>
 #include <QShowEvent>
 #include <QVBoxLayout>
@@ -89,7 +91,7 @@ void InformationPanel::requestDelayedItemInfo(const KFileItem& item)
     if (item.isNull()) {
         // The cursor is above the viewport. If files are selected,
         // show information regarding the selection.
-        if (m_selection.size() > 0) {
+        if (!m_selection.isEmpty()) {
             m_fileItem = KFileItem();
             m_infoTimer->start();
         }
@@ -156,7 +158,7 @@ void InformationPanel::resizeEvent(QResizeEvent* event)
 void InformationPanel::contextMenuEvent(QContextMenuEvent* event)
 {
     // TODO: Move code from InformationPanelContent::configureSettings() here
-    m_content->configureSettings(customContextMenuActions());
+    m_content->configureSettings(customContextMenuActions(), event->globalPos());
     Panel::contextMenuEvent(event);
 }
 
@@ -198,7 +200,7 @@ void InformationPanel::showItemInfo()
 
 void InformationPanel::slotFolderStatFinished(KJob* job)
 {
-    m_folderStatJob = 0;
+    m_folderStatJob = nullptr;
     const KIO::UDSEntry entry = static_cast<KIO::StatJob*>(job)->statResult();
     m_content->showItem(KFileItem(entry, m_shownUrl));
 }
@@ -296,7 +298,7 @@ void InformationPanel::slotLeftDirectory(const QString& directory)
 void InformationPanel::cancelRequest()
 {
     delete m_folderStatJob;
-    m_folderStatJob = 0;
+    m_folderStatJob = nullptr;
 
     m_infoTimer->stop();
     m_resetUrlTimer->stop();