]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Mount partitions when you open them in a new tab.
authorEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Thu, 24 Apr 2014 19:44:28 +0000 (21:44 +0200)
committerEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Sat, 26 Apr 2014 11:07:04 +0000 (13:07 +0200)
Instead of just emitting the slotItemMiddleClicked signal in
PlacesPanel::slotItemContextMenuRequested we now use triggerItem with
Qt::MiddleButton, which does set up the storage first and emit
the slotItemMiddleClicked signal afterwards.

BUG: 311226
FIXED-IN: 4.13.1
REVIEW: 117755

src/panels/places/placespanel.cpp

index d5308eabe1ccf366978d00a2b800cd9f5be60199..f19fa1e259f7e6fa203ffa8419f7c18038a77418 100644 (file)
@@ -283,8 +283,9 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
             } else if (action == hideAction) {
                 item->setHidden(hideAction->isChecked());
             } else if (action == openInNewTabAction) {
-                const KUrl url = m_model->item(index)->dataValue("url").value<KUrl>();
-                emit placeMiddleClicked(url);
+                // TriggerItem does set up the storage first and then it will
+                // emit the slotItemMiddleClicked signal, because of Qt::MiddleButton.
+                triggerItem(index, Qt::MiddleButton);
             } else if (action == teardownAction) {
                 m_model->requestTeardown(index);
             } else if (action == ejectAction) {