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/dolphinmainwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/dolphinmainwindow.cpp') 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() << 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() << activeViewContainer()->url()); +#endif m_newFileMenu->createDirectory(); } -- cgit v1.3