#include <KPluginMetaData>
#include <KSharedConfig>
#include <KTerminalLauncherJob>
+#include <kio_version.h>
#include <QActionGroup>
#include <QApplication>
connect(m_view, &DolphinView::itemCountChanged, this, &DolphinPart::updateStatusBar);
connect(m_view, &DolphinView::selectionChanged, this, &DolphinPart::updateStatusBar);
- m_actionHandler = new DolphinViewActionHandler(actionCollection(), this);
+ m_actionHandler = new DolphinViewActionHandler(actionCollection(), nullptr, this);
m_actionHandler->setCurrentView(m_view);
connect(m_actionHandler, &DolphinViewActionHandler::createDirectoryTriggered, this, &DolphinPart::createDirectory);
// As requested by KNewFileMenu :
m_newFileMenu->checkUpToDate();
// And set the files that the menu apply on :
+#if KIO_VERSION >= QT_VERSION_CHECK(5, 97, 0)
+ m_newFileMenu->setWorkingDirectory(url());
+#else
m_newFileMenu->setPopupFiles(QList<QUrl>() << url());
+#endif
}
void DolphinPart::updateStatusBar()
void DolphinPart::createDirectory()
{
+#if KIO_VERSION >= QT_VERSION_CHECK(5, 97, 0)
+ m_newFileMenu->setWorkingDirectory(url());
+#else
m_newFileMenu->setPopupFiles(QList<QUrl>() << url());
+#endif
m_newFileMenu->createDirectory();
}