From 513fe3bb428c9d10f40a93efeca60fbf95d89bec Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Tue, 14 Dec 2021 21:47:20 +0100 Subject: Port from KNewFileMenu::setPopupFiles to KNewFileMenu::setWorkingDirectory The former is deprecated --- src/dolphinpart.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/dolphinpart.cpp') diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index fdc550431..8f2279d45 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -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(); } -- cgit v1.3