+void StatusBarSpaceInfo::mousePressEvent(QMouseEvent* event)
+{
+ if (event->button() == Qt::LeftButton) {
+ // Creates a menu with tools that help to find out more about free
+ // disk space for the given url.
+
+ // Note that this object must live long enough in case the user opens
+ // the "Configure..." dialog
+ KMoreToolsMenuFactory menuFactory(QStringLiteral("dolphin/statusbar-diskspace-menu"));
+ menuFactory.setParentWidget(this);
+ auto menu = menuFactory.createMenuFromGroupingNames(
+ { "disk-usage", "more:", "disk-partitions" }, m_url);
+
+ menu->exec(QCursor::pos());
+ }
+}
+