diff options
| author | Nicolas Fella <[email protected]> | 2021-12-14 21:47:20 +0100 |
|---|---|---|
| committer | Nicolas Fella <[email protected]> | 2022-07-14 11:58:19 +0000 |
| commit | 513fe3bb428c9d10f40a93efeca60fbf95d89bec (patch) | |
| tree | dcfdc81250bb9565376fa249c6772dd9c3aa65fa /src/dolphinpart.cpp | |
| parent | 05941a522b8db4734b2601979e64a63b90049262 (diff) | |
Port from KNewFileMenu::setPopupFiles to KNewFileMenu::setWorkingDirectory
The former is deprecated
Diffstat (limited to 'src/dolphinpart.cpp')
| -rw-r--r-- | src/dolphinpart.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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 <KPluginMetaData> #include <KSharedConfig> #include <KTerminalLauncherJob> +#include <kio_version.h> #include <QActionGroup> #include <QApplication> @@ -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<QUrl>() << 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<QUrl>() << url()); +#endif m_newFileMenu->createDirectory(); } |
