X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/0fc218fd264adf0f67396409cdd1d44265c71f07..40cc5f665d:/src/dolphinpart.cpp diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index fdc550431..575c30417 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -109,7 +110,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, 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); @@ -589,7 +590,11 @@ void DolphinPart::updateNewMenu() // 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() << url()); +#endif } void DolphinPart::updateStatusBar() @@ -604,7 +609,11 @@ void DolphinPart::updateProgress(int percent) void DolphinPart::createDirectory() { +#if KIO_VERSION >= QT_VERSION_CHECK(5, 97, 0) + m_newFileMenu->setWorkingDirectory(url()); +#else m_newFileMenu->setPopupFiles(QList() << url()); +#endif m_newFileMenu->createDirectory(); }