- connect(m_view, SIGNAL(directoryLoadingCompleted()), this, SIGNAL(completed()));
- connect(m_view, SIGNAL(directoryLoadingProgress(int)), this, SLOT(updateProgress(int)));
- connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(slotErrorMessage(QString)));
-
- setXMLFile("dolphinpart.rc");
-
- connect(m_view, SIGNAL(infoMessage(QString)),
- this, SLOT(slotMessage(QString)));
- connect(m_view, SIGNAL(operationCompletedMessage(QString)),
- this, SLOT(slotMessage(QString)));
- connect(m_view, SIGNAL(errorMessage(QString)),
- this, SLOT(slotErrorMessage(QString)));
- connect(m_view, SIGNAL(itemActivated(KFileItem)),
- this, SLOT(slotItemActivated(KFileItem)));
- connect(m_view, SIGNAL(itemsActivated(KFileItemList)),
- this, SLOT(slotItemsActivated(KFileItemList)));
- connect(m_view, SIGNAL(tabRequested(KUrl)),
- this, SLOT(createNewWindow(KUrl)));
- connect(m_view, SIGNAL(requestContextMenu(QPoint,KFileItem,KUrl,QList<QAction*>)),
- this, SLOT(slotOpenContextMenu(QPoint,KFileItem,KUrl,QList<QAction*>)));
- connect(m_view, SIGNAL(selectionChanged(KFileItemList)),
- m_extension, SIGNAL(selectionInfo(KFileItemList)));
- connect(m_view, SIGNAL(selectionChanged(KFileItemList)),
- this, SLOT(slotSelectionChanged(KFileItemList)));
- connect(m_view, SIGNAL(requestItemInfo(KFileItem)),
- this, SLOT(slotRequestItemInfo(KFileItem)));
- connect(m_view, SIGNAL(modeChanged(DolphinView::Mode,DolphinView::Mode)),
- this, SIGNAL(viewModeChanged())); // relay signal
- connect(m_view, SIGNAL(redirection(KUrl,KUrl)),
- this, SLOT(slotDirectoryRedirection(KUrl,KUrl)));
+ connect(&DolphinNewFileMenuObserver::instance(), &DolphinNewFileMenuObserver::errorMessage, this, &DolphinPart::slotErrorMessage);
+
+ connect(m_view, &DolphinView::directoryLoadingCompleted, this, &KParts::ReadOnlyPart::completed);
+ connect(m_view, &DolphinView::directoryLoadingCompleted, this, &DolphinPart::updatePasteAction);
+ connect(m_view, &DolphinView::directoryLoadingProgress, this, &DolphinPart::updateProgress);
+ connect(m_view, &DolphinView::errorMessage, this, &DolphinPart::slotErrorMessage);
+
+ setXMLFile(QStringLiteral("dolphinpart.rc"));
+
+ connect(m_view, &DolphinView::infoMessage, this, &DolphinPart::slotMessage);
+ connect(m_view, &DolphinView::operationCompletedMessage, this, &DolphinPart::slotMessage);
+ connect(m_view, &DolphinView::errorMessage, this, &DolphinPart::slotErrorMessage);
+ connect(m_view, &DolphinView::itemActivated, this, &DolphinPart::slotItemActivated);
+ connect(m_view, &DolphinView::itemsActivated, this, &DolphinPart::slotItemsActivated);
+ connect(m_view, &DolphinView::statusBarTextChanged, this, [this](const QString &text) {
+ const QString escapedText = Qt::convertFromPlainText(text);
+ Q_EMIT ReadOnlyPart::setStatusBarText(QStringLiteral("<qt>%1</qt>").arg(escapedText));
+ });
+ connect(m_view, &DolphinView::tabRequested, this, &DolphinPart::createNewWindow);
+ connect(m_view, &DolphinView::requestContextMenu, this, &DolphinPart::slotOpenContextMenu);
+ connect(m_view, &DolphinView::selectionChanged, m_extension, &KParts::NavigationExtension::selectionInfo);
+ connect(m_view, &DolphinView::selectionChanged, this, &DolphinPart::slotSelectionChanged);
+ connect(m_view, &DolphinView::requestItemInfo, this, &DolphinPart::slotRequestItemInfo);
+ connect(m_view, &DolphinView::modeChanged, this, &DolphinPart::viewModeChanged); // relay signal
+ connect(m_view, &DolphinView::redirection, this, &DolphinPart::slotDirectoryRedirection);