]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/information/informationpanel.cpp
Correctly position context menu of the information panel under wayland with a seconda...
[dolphin.git] / src / panels / information / informationpanel.cpp
index ac987c9b4426a77cb791833ecc02240bb0cae825..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);
 }