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/dolphinmainwindow.cpp | |
| parent | 05941a522b8db4734b2601979e64a63b90049262 (diff) | |
Port from KNewFileMenu::setPopupFiles to KNewFileMenu::setWorkingDirectory
The former is deprecated
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 2a2ac3637..39b820387 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -661,12 +661,20 @@ void DolphinMainWindow::readProperties(const KConfigGroup& group) void DolphinMainWindow::updateNewMenu() { m_newFileMenu->checkUpToDate(); +#if KIO_VERSION >= QT_VERSION_CHECK(5, 97, 0) + m_newFileMenu->setWorkingDirectory(activeViewContainer()->url()); +#else m_newFileMenu->setPopupFiles(QList<QUrl>() << activeViewContainer()->url()); +#endif } void DolphinMainWindow::createDirectory() { +#if KIO_VERSION >= QT_VERSION_CHECK(5, 97, 0) + m_newFileMenu->setWorkingDirectory(activeViewContainer()->url()); +#else m_newFileMenu->setPopupFiles(QList<QUrl>() << activeViewContainer()->url()); +#endif m_newFileMenu->createDirectory(); } |
