From: Emmanuel Pescosta Date: Thu, 10 Jul 2014 20:49:05 +0000 (+0200) Subject: Merge branch 'master' into frameworks X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/fc4315d57e8fe64d05aad2a1c24800f0149b21da Merge branch 'master' into frameworks Conflicts: dolphin/src/dolphinmainwindow.cpp dolphin/src/dolphinviewcontainer.cpp --- fc4315d57e8fe64d05aad2a1c24800f0149b21da diff --cc src/dolphinmainwindow.cpp index 75cc12f46,41bd626ee..3b084ac8b --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@@ -75,10 -76,9 +77,8 @@@ #include #include #include - #include #include #include --#include #include #include @@@ -114,12 -111,8 +114,8 @@@ DolphinMainWindow::DolphinMainWindow() { setObjectName("Dolphin#"); - m_viewTab.append(ViewTab()); - ViewTab& viewTab = m_viewTab[m_tabIndex]; - viewTab.wasActive = true; // The first opened tab is automatically active - - connect(&DolphinNewFileMenuObserver::instance(), SIGNAL(errorMessage(QString)), - this, SLOT(showErrorMessage(QString))); + connect(&DolphinNewFileMenuObserver::instance(), &DolphinNewFileMenuObserver::errorMessage, + this, &DolphinMainWindow::showErrorMessage); KIO::FileUndoManager* undoManager = KIO::FileUndoManager::self(); undoManager->setUiInterface(new UndoUiInterface()); @@@ -141,50 -134,32 +137,32 @@@ setAcceptDrops(true); - viewTab.splitter = new QSplitter(this); - viewTab.splitter->setChildrenCollapsible(false); - setupActions(); - const KUrl homeUrl(generalSettings->homeUrl()); - setUrlAsCaption(homeUrl); m_actionHandler = new DolphinViewActionHandler(actionCollection(), this); - connect(m_actionHandler, SIGNAL(actionBeingHandled()), SLOT(clearStatusBar())); - connect(m_actionHandler, SIGNAL(createDirectory()), SLOT(createDirectory())); + connect(m_actionHandler, &DolphinViewActionHandler::actionBeingHandled, this, &DolphinMainWindow::clearStatusBar); + connect(m_actionHandler, &DolphinViewActionHandler::createDirectory, this, &DolphinMainWindow::createDirectory); - viewTab.primaryView = createViewContainer(homeUrl, viewTab.splitter); - - m_activeViewContainer = viewTab.primaryView; - connectViewSignals(m_activeViewContainer); - DolphinView* view = m_activeViewContainer->view(); - m_activeViewContainer->show(); - m_actionHandler->setCurrentView(view); - m_remoteEncoding = new DolphinRemoteEncoding(this, m_actionHandler); - connect(this, SIGNAL(urlChanged(KUrl)), - m_remoteEncoding, SLOT(slotAboutToOpenUrl())); + connect(this, &DolphinMainWindow::urlChanged, + m_remoteEncoding, &DolphinRemoteEncoding::slotAboutToOpenUrl); - m_tabBar = new KTabBar(this); - m_tabBar->setMovable(true); - m_tabBar->setTabsClosable(true); - connect(m_tabBar, &KTabBar::currentChanged, - this, &DolphinMainWindow::setActiveTab); - connect(m_tabBar, &KTabBar::tabCloseRequested, - this, static_cast(&DolphinMainWindow::closeTab)); - connect(m_tabBar, &KTabBar::contextMenu, - this, &DolphinMainWindow::openTabContextMenu); - connect(m_tabBar, &KTabBar::newTabRequest, - this, static_cast(&DolphinMainWindow::openNewTab)); - connect(m_tabBar, &KTabBar::testCanDecode, - this, &DolphinMainWindow::slotTestCanDecode); - connect(m_tabBar, &KTabBar::mouseMiddleClick, - this, static_cast(&DolphinMainWindow::closeTab)); - connect(m_tabBar, &KTabBar::tabMoved, - this, &DolphinMainWindow::slotTabMoved); - connect(m_tabBar, &KTabBar::receivedDropEvent, - this, &DolphinMainWindow::tabDropEvent); + m_tabBar = new DolphinTabBar(this); + connect(m_tabBar, SIGNAL(currentChanged(int)), + this, SLOT(setActiveTab(int))); + connect(m_tabBar, SIGNAL(tabCloseRequested(int)), + this, SLOT(closeTab(int))); + connect(m_tabBar, SIGNAL(openNewActivatedTab(int)), + this, SLOT(openNewActivatedTab(int))); + connect(m_tabBar, SIGNAL(tabMoved(int,int)), + this, SLOT(slotTabMoved(int,int))); + connect(m_tabBar, SIGNAL(tabDropEvent(int,QDropEvent*)), + this, SLOT(tabDropEvent(int,QDropEvent*))); + connect(m_tabBar, SIGNAL(tabDetachRequested(int)), + this, SLOT(detachTab(int))); m_tabBar->blockSignals(true); // signals get unblocked after at least 2 tabs are open + m_tabBar->hide(); QWidget* centralWidget = new QWidget(this); m_centralWidgetLayout = new QVBoxLayout(centralWidget); @@@ -201,17 -174,9 +177,9 @@@ stateChanged("new_file"); QClipboard* clipboard = QApplication::clipboard(); - connect(clipboard, SIGNAL(dataChanged()), - this, SLOT(updatePasteAction())); + connect(clipboard, &QClipboard::dataChanged, + this, &DolphinMainWindow::updatePasteAction); - if (generalSettings->splitView()) { - toggleSplitView(); - } - updateEditActions(); - updatePasteAction(); - updateViewActions(); - updateGoActions(); - QAction* showFilterBarAction = actionCollection()->action("show_filter_bar"); showFilterBarAction->setChecked(generalSettings->filterBar()); @@@ -352,11 -295,11 +298,11 @@@ void DolphinMainWindow::changeUrl(cons updateViewActions(); updateGoActions(); setUrlAsCaption(url); - if (m_viewTab.count() > 1) { - m_tabBar->setTabText(m_tabIndex, squeezedText(tabName(m_activeViewContainer->url()))); - } + - const QString iconName = KMimeType::iconNameForUrl(url); - m_tabBar->setTabIcon(m_tabIndex, KIcon(iconName)); + const QString iconName = KIO::iconNameForUrl(url); + m_tabBar->setTabIcon(m_tabIndex, QIcon::fromTheme(iconName)); + m_tabBar->setTabText(m_tabIndex, squeezedText(tabName(view->url()))); + emit urlChanged(url); } } @@@ -452,37 -391,37 +394,37 @@@ void DolphinMainWindow::openNewTab(cons { QWidget* focusWidget = QApplication::focusWidget(); - if (m_viewTab.count() == 1) { - // Only one view is open currently and hence no tab is shown at - // all. Before creating a tab for 'url', provide a tab for the current URL. - const KUrl currentUrl = m_activeViewContainer->url(); - m_tabBar->addTab(QIcon::fromTheme(KIO::iconNameForUrl(currentUrl)), - squeezedText(tabName(currentUrl))); - m_tabBar->blockSignals(false); - } + DolphinTabPage* tabPage = new DolphinTabPage(primaryUrl, secondaryUrl, this); + m_viewTab.append(tabPage); - m_tabBar->addTab(QIcon::fromTheme(KIO::iconNameForUrl(url)), - squeezedText(tabName(url))); + connect(tabPage, SIGNAL(activeViewChanged()), + this, SLOT(activeViewChanged())); - ViewTab viewTab; - viewTab.splitter = new QSplitter(this); - viewTab.splitter->setChildrenCollapsible(false); - viewTab.primaryView = createViewContainer(url, viewTab.splitter); - viewTab.primaryView->setActive(false); - connectViewSignals(viewTab.primaryView); + // The places-selector from the URL navigator should only be shown + // if the places dock is invisible + QDockWidget* placesDock = findChild("placesDock"); + const bool placesSelectorVisible = !placesDock || !placesDock->isVisible(); + tabPage->setPlacesSelectorVisible(placesSelectorVisible); + + DolphinViewContainer* primaryContainer = tabPage->primaryViewContainer(); + connectViewSignals(primaryContainer); + + if (tabPage->splitViewEnabled()) { + DolphinViewContainer* secondaryContainer = tabPage->secondaryViewContainer(); + connectViewSignals(secondaryContainer); + } - m_viewTab.append(viewTab); + tabPage->hide(); - actionCollection()->action("close_tab")->setEnabled(true); - actionCollection()->action("activate_prev_tab")->setEnabled(true); - actionCollection()->action("activate_next_tab")->setEnabled(true); - m_tabBar->addTab(KIcon(KMimeType::iconNameForUrl(primaryUrl)), ++ m_tabBar->addTab(QIcon::fromTheme(KIO::iconNameForUrl(primaryUrl)), + squeezedText(tabName(primaryUrl))); - // Provide a split view, if the startup settings are set this way - if (GeneralSettings::splitView()) { - const int newTabIndex = m_viewTab.count() - 1; - createSecondaryView(newTabIndex); - m_viewTab[newTabIndex].secondaryView->setActive(true); - m_viewTab[newTabIndex].isPrimaryViewActive = false; + if (m_viewTab.count() > 1) { + actionCollection()->action("close_tab")->setEnabled(true); + actionCollection()->action("activate_prev_tab")->setEnabled(true); + actionCollection()->action("activate_next_tab")->setEnabled(true); + m_tabBar->show(); + m_tabBar->blockSignals(false); } if (focusWidget) { @@@ -1442,10 -1239,8 +1244,8 @@@ void DolphinMainWindow::setActiveViewCo const KUrl url = m_activeViewContainer->url(); setUrlAsCaption(url); - if (m_viewTab.count() > 1) { - m_tabBar->setTabText(m_tabIndex, tabName(url)); - m_tabBar->setTabIcon(m_tabIndex, QIcon::fromTheme(KIO::iconNameForUrl(url))); - } + m_tabBar->setTabText(m_tabIndex, squeezedText(tabName(url))); - m_tabBar->setTabIcon(m_tabIndex, KIcon(KMimeType::iconNameForUrl(url))); ++ m_tabBar->setTabIcon(m_tabIndex, QIcon::fromTheme(KIO::iconNameForUrl(url))); emit urlChanged(url); } @@@ -1527,22 -1310,21 +1315,21 @@@ void DolphinMainWindow::setupActions( // setup 'View' menu // (note that most of it is set up in DolphinViewActionHandler) - KAction* split = actionCollection()->addAction("split_view"); + QAction* split = actionCollection()->addAction("split_view"); split->setShortcut(Qt::Key_F3); - updateSplitAction(); - connect(split, SIGNAL(triggered()), this, SLOT(toggleSplitView())); + connect(split, &QAction::triggered, this, &DolphinMainWindow::toggleSplitView); - KAction* reload = actionCollection()->addAction("reload"); + QAction* reload = actionCollection()->addAction("reload"); reload->setText(i18nc("@action:inmenu View", "Reload")); reload->setShortcut(Qt::Key_F5); - reload->setIcon(KIcon("view-refresh")); - connect(reload, SIGNAL(triggered()), this, SLOT(reloadView())); + reload->setIcon(QIcon::fromTheme("view-refresh")); + connect(reload, &QAction::triggered, this, &DolphinMainWindow::reloadView); - KAction* stop = actionCollection()->addAction("stop"); + QAction* stop = actionCollection()->addAction("stop"); stop->setText(i18nc("@action:inmenu View", "Stop")); stop->setToolTip(i18nc("@info", "Stop loading")); - stop->setIcon(KIcon("process-stop")); - connect(stop, SIGNAL(triggered()), this, SLOT(stopLoading())); + stop->setIcon(QIcon::fromTheme("process-stop")); + connect(stop, &QAction::triggered, this, &DolphinMainWindow::stopLoading); KToggleAction* editableLocation = actionCollection()->add("editable_location"); editableLocation->setText(i18nc("@action:inmenu Navigation Bar", "Editable Location")); @@@ -1565,30 -1348,35 +1352,30 @@@ connect(this, SIGNAL(rememberClosedTab(KUrl,KUrl)), recentTabsMenu, SLOT(rememberClosedTab(KUrl,KUrl))); connect(recentTabsMenu, SIGNAL(restoreClosedTab(KUrl,KUrl)), - this, SLOT(restoreClosedTab(KUrl,KUrl))); + this, SLOT(openNewActivatedTab(KUrl,KUrl))); - KAction* forwardAction = KStandardAction::forward(this, SLOT(goForward()), actionCollection()); - connect(forwardAction, SIGNAL(triggered(Qt::MouseButtons,Qt::KeyboardModifiers)), this, SLOT(goForward(Qt::MouseButtons))); - - KAction* upAction = KStandardAction::up(this, SLOT(goUp()), actionCollection()); - connect(upAction, SIGNAL(triggered(Qt::MouseButtons,Qt::KeyboardModifiers)), this, SLOT(goUp(Qt::MouseButtons))); - - KAction* homeAction = KStandardAction::home(this, SLOT(goHome()), actionCollection()); - connect(homeAction, SIGNAL(triggered(Qt::MouseButtons,Qt::KeyboardModifiers)), this, SLOT(goHome(Qt::MouseButtons))); + KStandardAction::forward(this, SLOT(goForward()), actionCollection()); + KStandardAction::up(this, SLOT(goUp()), actionCollection()); + KStandardAction::home(this, SLOT(goHome()), actionCollection()); // setup 'Tools' menu - KAction* showFilterBar = actionCollection()->addAction("show_filter_bar"); + QAction* showFilterBar = actionCollection()->addAction("show_filter_bar"); showFilterBar->setText(i18nc("@action:inmenu Tools", "Show Filter Bar")); - showFilterBar->setIcon(KIcon("view-filter")); + showFilterBar->setIcon(QIcon::fromTheme("view-filter")); showFilterBar->setShortcut(Qt::CTRL | Qt::Key_I); - connect(showFilterBar, SIGNAL(triggered()), this, SLOT(showFilterBar())); + connect(showFilterBar, &QAction::triggered, this, &DolphinMainWindow::showFilterBar); - KAction* compareFiles = actionCollection()->addAction("compare_files"); + QAction* compareFiles = actionCollection()->addAction("compare_files"); compareFiles->setText(i18nc("@action:inmenu Tools", "Compare Files")); - compareFiles->setIcon(KIcon("kompare")); + compareFiles->setIcon(QIcon::fromTheme("kompare")); compareFiles->setEnabled(false); - connect(compareFiles, SIGNAL(triggered()), this, SLOT(compareFiles())); + connect(compareFiles, &QAction::triggered, this, &DolphinMainWindow::compareFiles); - KAction* openTerminal = actionCollection()->addAction("open_terminal"); + QAction* openTerminal = actionCollection()->addAction("open_terminal"); openTerminal->setText(i18nc("@action:inmenu Tools", "Open Terminal")); - openTerminal->setIcon(KIcon("utilities-terminal")); + openTerminal->setIcon(QIcon::fromTheme("utilities-terminal")); openTerminal->setShortcut(Qt::SHIFT | Qt::Key_F4); - connect(openTerminal, SIGNAL(triggered()), this, SLOT(openTerminal())); + connect(openTerminal, &QAction::triggered, this, &DolphinMainWindow::openTerminal); // setup 'Settings' menu KToggleAction* showMenuBar = KStandardAction::showMenubar(0, 0, actionCollection()); @@@ -1679,17 -1467,17 +1466,17 @@@ void DolphinMainWindow::setupDockWidget foldersDock->setWidget(foldersPanel); QAction* foldersAction = foldersDock->toggleViewAction(); - createPanelAction(KIcon("folder"), Qt::Key_F7, foldersAction, "show_folders_panel"); + createPanelAction(QIcon::fromTheme("folder"), Qt::Key_F7, foldersAction, "show_folders_panel"); addDockWidget(Qt::LeftDockWidgetArea, foldersDock); - connect(this, SIGNAL(urlChanged(KUrl)), - foldersPanel, SLOT(setUrl(KUrl))); - connect(foldersPanel, SIGNAL(folderActivated(KUrl)), - this, SLOT(changeUrl(KUrl))); + connect(this, &DolphinMainWindow::urlChanged, + foldersPanel, &FoldersPanel::setUrl); + connect(foldersPanel, &FoldersPanel::folderActivated, + this, &DolphinMainWindow::changeUrl); - connect(foldersPanel, &FoldersPanel::folderMiddleClicked, - this, static_cast(&DolphinMainWindow::openNewTab)); + connect(foldersPanel, SIGNAL(folderMiddleClicked(KUrl)), + this, SLOT(openNewTab(KUrl))); - connect(foldersPanel, SIGNAL(errorMessage(QString)), - this, SLOT(slotPanelErrorMessage(QString))); + connect(foldersPanel, &FoldersPanel::errorMessage, + this, &DolphinMainWindow::slotPanelErrorMessage); // Setup "Terminal" #ifndef Q_OS_WIN @@@ -1733,21 -1521,21 +1520,21 @@@ placesDock->setWidget(placesPanel); QAction* placesAction = placesDock->toggleViewAction(); - createPanelAction(KIcon("bookmarks"), Qt::Key_F9, placesAction, "show_places_panel"); + createPanelAction(QIcon::fromTheme("bookmarks"), Qt::Key_F9, placesAction, "show_places_panel"); addDockWidget(Qt::LeftDockWidgetArea, placesDock); - connect(placesPanel, SIGNAL(placeActivated(KUrl)), - this, SLOT(slotPlaceActivated(KUrl))); + connect(placesPanel, &PlacesPanel::placeActivated, + this, &DolphinMainWindow::slotPlaceActivated); - connect(placesPanel, &PlacesPanel::placeMiddleClicked, - this, static_cast(&DolphinMainWindow::openNewTab)); + connect(placesPanel, SIGNAL(placeMiddleClicked(KUrl)), + this, SLOT(openNewTab(KUrl))); - connect(placesPanel, SIGNAL(errorMessage(QString)), - this, SLOT(slotPanelErrorMessage(QString))); - connect(this, SIGNAL(urlChanged(KUrl)), - placesPanel, SLOT(setUrl(KUrl))); - connect(placesDock, SIGNAL(visibilityChanged(bool)), - this, SLOT(slotPlacesPanelVisibilityChanged(bool))); - connect(this, SIGNAL(settingsChanged()), - placesPanel, SLOT(readSettings())); + connect(placesPanel, &PlacesPanel::errorMessage, + this, &DolphinMainWindow::slotPanelErrorMessage); + connect(this, &DolphinMainWindow::urlChanged, + placesPanel, &PlacesPanel::setUrl); + connect(placesDock, &DolphinDockWidget::visibilityChanged, + this, &DolphinMainWindow::slotPlacesPanelVisibilityChanged); + connect(this, &DolphinMainWindow::settingsChanged, + placesPanel, &PlacesPanel::readSettings); // Add actions into the "Panels" menu KActionMenu* panelsMenu = new KActionMenu(i18nc("@action:inmenu View", "Panels"), this); @@@ -1910,40 -1681,38 +1680,38 @@@ void DolphinMainWindow::clearStatusBar( void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container) { - connect(container, SIGNAL(showFilterBarChanged(bool)), - this, SLOT(updateFilterBarAction(bool))); - connect(container, SIGNAL(writeStateChanged(bool)), - this, SLOT(slotWriteStateChanged(bool))); + connect(container, &DolphinViewContainer::showFilterBarChanged, + this, &DolphinMainWindow::updateFilterBarAction); + connect(container, &DolphinViewContainer::writeStateChanged, + this, &DolphinMainWindow::slotWriteStateChanged); - DolphinView* view = container->view(); + const DolphinView* view = container->view(); - connect(view, SIGNAL(selectionChanged(KFileItemList)), - this, SLOT(slotSelectionChanged(KFileItemList))); - connect(view, SIGNAL(requestItemInfo(KFileItem)), - this, SLOT(slotRequestItemInfo(KFileItem))); + connect(view, &DolphinView::selectionChanged, + this, &DolphinMainWindow::slotSelectionChanged); + connect(view, &DolphinView::requestItemInfo, + this, &DolphinMainWindow::slotRequestItemInfo); - connect(view, &DolphinView::activated, - this, &DolphinMainWindow::toggleActiveView); - connect(view, &DolphinView::tabRequested, - this, static_cast(&DolphinMainWindow::openNewTab)); + connect(view, SIGNAL(tabRequested(KUrl)), + this, SLOT(openNewTab(KUrl))); - connect(view, SIGNAL(requestContextMenu(QPoint,KFileItem,KUrl,QList)), - this, SLOT(openContextMenu(QPoint,KFileItem,KUrl,QList))); - connect(view, SIGNAL(directoryLoadingStarted()), - this, SLOT(enableStopAction())); - connect(view, SIGNAL(directoryLoadingCompleted()), - this, SLOT(disableStopAction())); - connect(view, SIGNAL(goBackRequested()), - this, SLOT(goBack())); - connect(view, SIGNAL(goForwardRequested()), - this, SLOT(goForward())); + connect(view, &DolphinView::requestContextMenu, + this, &DolphinMainWindow::openContextMenu); + connect(view, &DolphinView::directoryLoadingStarted, + this, &DolphinMainWindow::enableStopAction); + connect(view, &DolphinView::directoryLoadingCompleted, + this, &DolphinMainWindow::disableStopAction); + connect(view, &DolphinView::goBackRequested, + this, static_cast(&DolphinMainWindow::goBack)); + connect(view, &DolphinView::goForwardRequested, + this, static_cast(&DolphinMainWindow::goForward)); const KUrlNavigator* navigator = container->urlNavigator(); - connect(navigator, SIGNAL(urlChanged(KUrl)), - this, SLOT(changeUrl(KUrl))); - connect(navigator, SIGNAL(historyChanged()), - this, SLOT(updateHistory())); - connect(navigator, SIGNAL(editableStateChanged(bool)), - this, SLOT(slotEditableStateChanged(bool))); + connect(navigator, &KUrlNavigator::urlChanged, + this, &DolphinMainWindow::changeUrl); + connect(navigator, &KUrlNavigator::historyChanged, + this, &DolphinMainWindow::updateHistory); + connect(navigator, &KUrlNavigator::editableStateChanged, + this, &DolphinMainWindow::slotEditableStateChanged); - connect(navigator, &KUrlNavigator::tabRequested, - this, static_cast(&DolphinMainWindow::openNewTab)); + connect(navigator, SIGNAL(tabRequested(KUrl)), + this, SLOT(openNewTab(KUrl))); } void DolphinMainWindow::updateSplitAction() diff --cc src/dolphinmainwindow.h index 4fe13d29f,9c7f185bc..4816837fc --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@@ -29,6 -29,6 +29,7 @@@ #include #include #include ++#include #include #include @@@ -45,8 -47,7 +48,6 @@@ class KFileItem class KFileItemList; class KJob; class KNewFileMenu; - class KTabBar; --class KUrl; class QSplitter; class QToolButton; class QVBoxLayout; diff --cc src/dolphinviewcontainer.cpp index c1677dc43,2a45152bd..87a2ceb4d --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@@ -109,49 -108,33 +109,51 @@@ DolphinViewContainer::DolphinViewContai m_messageWidget->hide(); m_view = new DolphinView(url, this); - connect(m_view, SIGNAL(urlChanged(KUrl)), m_urlNavigator, SLOT(setUrl(KUrl))); - connect(m_view, SIGNAL(urlChanged(KUrl)), m_messageWidget, SLOT(hide())); - connect(m_view, SIGNAL(writeStateChanged(bool)), this, SIGNAL(writeStateChanged(bool))); - connect(m_view, SIGNAL(requestItemInfo(KFileItem)), this, SLOT(showItemInfo(KFileItem))); - connect(m_view, SIGNAL(itemActivated(KFileItem)), this, SLOT(slotItemActivated(KFileItem))); - connect(m_view, SIGNAL(itemsActivated(KFileItemList)), this, SLOT(slotItemsActivated(KFileItemList))); - connect(m_view, SIGNAL(redirection(KUrl,KUrl)), this, SLOT(redirect(KUrl,KUrl))); - connect(m_view, SIGNAL(directoryLoadingStarted()), this, SLOT(slotDirectoryLoadingStarted())); - connect(m_view, SIGNAL(directoryLoadingCompleted()), this, SLOT(slotDirectoryLoadingCompleted())); - connect(m_view, SIGNAL(directoryLoadingCanceled()), this, SLOT(slotDirectoryLoadingCanceled())); - connect(m_view, SIGNAL(itemCountChanged()), this, SLOT(delayedStatusBarUpdate())); - connect(m_view, SIGNAL(directoryLoadingProgress(int)), this, SLOT(updateDirectoryLoadingProgress(int))); - connect(m_view, SIGNAL(directorySortingProgress(int)), this, SLOT(updateDirectorySortingProgress(int))); - connect(m_view, SIGNAL(selectionChanged(KFileItemList)), this, SLOT(delayedStatusBarUpdate())); - connect(m_view, SIGNAL(urlAboutToBeChanged(KUrl)), this, SLOT(slotViewUrlAboutToBeChanged(KUrl))); - connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(showErrorMessage(QString))); - connect(m_view, SIGNAL(urlIsFileError(KUrl)), this, SLOT(slotUrlIsFileError(KUrl))); - connect(m_view, SIGNAL(activated()), this, SLOT(activate())); - - connect(m_urlNavigator, SIGNAL(urlAboutToBeChanged(KUrl)), - this, SLOT(slotUrlNavigatorLocationAboutToBeChanged(KUrl))); - connect(m_urlNavigator, SIGNAL(urlChanged(KUrl)), - this, SLOT(slotUrlNavigatorLocationChanged(KUrl))); - connect(m_urlNavigator, SIGNAL(historyChanged()), - this, SLOT(slotHistoryChanged())); - connect(m_urlNavigator, SIGNAL(returnPressed()), - this, SLOT(slotReturnPressed())); + connect(m_view, &DolphinView::urlChanged, + m_urlNavigator, &KUrlNavigator::setUrl); + connect(m_view, &DolphinView::urlChanged, + m_messageWidget, &KMessageWidget::hide); + connect(m_view, &DolphinView::writeStateChanged, + this, &DolphinViewContainer::writeStateChanged); + connect(m_view, &DolphinView::requestItemInfo, + this, &DolphinViewContainer::showItemInfo); + connect(m_view, &DolphinView::itemActivated, + this, &DolphinViewContainer::slotItemActivated); + connect(m_view, &DolphinView::itemsActivated, + this, &DolphinViewContainer::slotItemsActivated); + connect(m_view, &DolphinView::redirection, + this, &DolphinViewContainer::redirect); + connect(m_view, &DolphinView::directoryLoadingStarted, + this, &DolphinViewContainer::slotDirectoryLoadingStarted); + connect(m_view, &DolphinView::directoryLoadingCompleted, + this, &DolphinViewContainer::slotDirectoryLoadingCompleted); + connect(m_view, &DolphinView::directoryLoadingCanceled, + this, &DolphinViewContainer::slotDirectoryLoadingCanceled); + connect(m_view, &DolphinView::itemCountChanged, + this, &DolphinViewContainer::delayedStatusBarUpdate); + connect(m_view, &DolphinView::directoryLoadingProgress, + this, &DolphinViewContainer::updateDirectoryLoadingProgress); + connect(m_view, &DolphinView::directorySortingProgress, + this, &DolphinViewContainer::updateDirectorySortingProgress); + connect(m_view, &DolphinView::selectionChanged, + this, &DolphinViewContainer::delayedStatusBarUpdate); + connect(m_view, &DolphinView::urlAboutToBeChanged, + this, &DolphinViewContainer::slotViewUrlAboutToBeChanged); + connect(m_view, &DolphinView::errorMessage, + this, &DolphinViewContainer::showErrorMessage); + connect(m_view, &DolphinView::urlIsFileError, + this, &DolphinViewContainer::slotUrlIsFileError); ++ connect(m_view, &DolphinView::activated, ++ this, &DolphinViewContainer::activate); + + connect(m_urlNavigator, &KUrlNavigator::urlAboutToBeChanged, + this, &DolphinViewContainer::slotUrlNavigatorLocationAboutToBeChanged); + connect(m_urlNavigator, &KUrlNavigator::urlChanged, + this, &DolphinViewContainer::slotUrlNavigatorLocationChanged); + connect(m_urlNavigator, &KUrlNavigator::historyChanged, + this, &DolphinViewContainer::slotHistoryChanged); + connect(m_urlNavigator, &KUrlNavigator::returnPressed, + this, &DolphinViewContainer::slotReturnPressed); // Initialize status bar m_statusBar = new DolphinStatusBar(this);