Commit f14c3ff8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compiles without deprecated methods

parent bc1c8514
......@@ -46,6 +46,10 @@ add_definitions(-DTRANSLATION_DOMAIN=\"plasmaintegration5\")
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
ki18n_install(po)
endif()
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
endif()
add_subdirectory(src)
add_subdirectory(autotests)
add_subdirectory(tests)
......
......@@ -54,6 +54,7 @@
#include <kurlcompletion.h>
#include <kurlpixmapprovider.h>
#include <kfilewidget.h>
#include <KFileUtils>
#include "kfiletreeview_p.h"
#include <kfileplacesview.h>
......@@ -131,7 +132,7 @@ void KDirSelectDialog::Private::slotMkdir()
QString where = m_parent->url().toDisplayString(QUrl::PreferLocalFile);
QString name = i18nc("folder name", "New Folder");
if (m_parent->url().isLocalFile() && QFileInfo::exists(m_parent->url().toLocalFile() + QLatin1Char('/') + name)) {
name = KIO::suggestName(m_parent->url(), name);
name = KFileUtils::suggestName(m_parent->url(), name);
}
QString directory = KIO::encodeFileName(QInputDialog::getText(m_parent, i18nc("@title:window", "New Folder"),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment