mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Merge remote-tracking branch 'origin/KDE/4.11'
This commit is contained in:
commit
70cd04df40
|
@ -1421,6 +1421,19 @@ void DolphinMainWindow::slotPanelErrorMessage(const QString& error)
|
|||
activeViewContainer()->showMessage(error, DolphinViewContainer::Error);
|
||||
}
|
||||
|
||||
void DolphinMainWindow::slotPlaceActivated(const KUrl& url)
|
||||
{
|
||||
DolphinViewContainer* view = activeViewContainer();
|
||||
|
||||
if (view->url() == url) {
|
||||
// We can end up here if the user clicked a device in the Places Panel
|
||||
// which had been unmounted earlier, see https://bugs.kde.org/show_bug.cgi?id=161385.
|
||||
reloadView();
|
||||
} else {
|
||||
changeUrl(url);
|
||||
}
|
||||
}
|
||||
|
||||
void DolphinMainWindow::setActiveViewContainer(DolphinViewContainer* viewContainer)
|
||||
{
|
||||
Q_ASSERT(viewContainer);
|
||||
|
@ -1753,7 +1766,7 @@ void DolphinMainWindow::setupDockWidgets()
|
|||
|
||||
addDockWidget(Qt::LeftDockWidgetArea, placesDock);
|
||||
connect(placesPanel, SIGNAL(placeActivated(KUrl)),
|
||||
this, SLOT(changeUrl(KUrl)));
|
||||
this, SLOT(slotPlaceActivated(KUrl)));
|
||||
connect(placesPanel, SIGNAL(placeMiddleClicked(KUrl)),
|
||||
this, SLOT(openNewTab(KUrl)));
|
||||
connect(placesPanel, SIGNAL(errorMessage(QString)),
|
||||
|
|
|
@ -466,6 +466,13 @@ private slots:
|
|||
*/
|
||||
void slotPanelErrorMessage(const QString& error);
|
||||
|
||||
/**
|
||||
* Is called if the user clicked an item in the Places Panel.
|
||||
* Reloads the view if \a url is the current URL already, and changes the
|
||||
* current URL otherwise.
|
||||
*/
|
||||
void slotPlaceActivated(const KUrl& url);
|
||||
|
||||
private:
|
||||
/**
|
||||
* Activates the given view, which means that
|
||||
|
|
|
@ -372,10 +372,6 @@ void DolphinViewContainer::setUrl(const KUrl& newUrl)
|
|||
{
|
||||
if (newUrl != m_urlNavigator->locationUrl()) {
|
||||
m_urlNavigator->setLocationUrl(newUrl);
|
||||
} else if (m_view->itemsCount() == 0) {
|
||||
// Maybe a previously unmounted device has been mounted again.
|
||||
// Let's reload the view to be safe (see https://bugs.kde.org/show_bug.cgi?id=161385).
|
||||
m_view->reload();
|
||||
}
|
||||
|
||||
#ifdef KActivities_FOUND
|
||||
|
|
Loading…
Reference in a new issue