diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index 6889c8d..01185bf 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -1,100 +1,101 @@ include(ECMAddTests) include(ConfigureChecks.cmake) #configure checks for QFileSystemWatcher find_package(Qt5Test ${REQUIRED_QT_VERSION} CONFIG QUIET) if(NOT Qt5Test_FOUND) message(STATUS "Qt5Test not found, autotests will not be built.") return() endif() if(NOT CMAKE_BUILD_TYPE MATCHES "[Dd]ebug$") set(ENABLE_BENCHMARKS 1) endif() configure_file(config-tests.h.in config-tests.h) macro(build_plugin pname) add_library(${pname} MODULE ${ARGN}) ecm_mark_as_test(${pname}) target_link_libraries(${pname} KF5::CoreAddons) endmacro() # Build some sample plugins build_plugin(jsonplugin jsonplugin.cpp) build_plugin(jsonplugin2 jsonplugin2.cpp) build_plugin(versionedplugin versionedplugin.cpp) build_plugin(unversionedplugin unversionedplugin.cpp) build_plugin(multiplugin multiplugin.cpp) build_plugin(alwaysunloadplugin alwaysunloadplugin.cpp) add_definitions( -DKDELIBS4CONFIGMIGRATOR_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" ) ecm_add_tests( kaboutdatatest.cpp kaboutdataapplicationdatatest.cpp kautosavefiletest.cpp kcompositejobtest.cpp kformattest.cpp kjobtest.cpp kosreleasetest.cpp kpluginfactorytest.cpp kpluginloadertest.cpp kpluginmetadatatest.cpp kprocesstest.cpp krandomtest.cpp kshareddatacachetest.cpp kshelltest.cpp kurlmimedatatest.cpp kstringhandlertest.cpp kusertest.cpp kdelibs4migrationtest.cpp kdelibs4configmigratortest.cpp kprocesslisttest.cpp + kfileutilstest.cpp LINK_LIBRARIES Qt5::Test KF5::CoreAddons ) if(NOT CMAKE_CROSSCOMPILING) ecm_add_tests(desktoptojsontest.cpp LINK_LIBRARIES Qt5::Test KF5::CoreAddons) target_compile_definitions(desktoptojsontest PRIVATE DESKTOP_TO_JSON_EXE="$" ) endif() set(ktexttohtmltest_SRCS ktexttohtmltest.cpp ${CMAKE_SOURCE_DIR}/src/lib/text/ktexttohtml.cpp) ecm_add_test(${ktexttohtmltest_SRCS} TEST_NAME ktexttohtmltest LINK_LIBRARIES Qt5::Test) # include the binary dir in order to get kcoreaddons_export.h target_include_directories(ktexttohtmltest PRIVATE ${KCoreAddons_BINARY_DIR}/src/lib) # fake static linking to prevent the export macros on Windows from kicking in target_compile_definitions(ktexttohtmltest PRIVATE -DKCOREADDONS_STATIC_DEFINE=1) target_compile_definitions(kpluginloadertest PRIVATE JSONPLUGIN_FILE="$" VERSIONEDPLUGIN_FILE="$" UNVERSIONEDPLUGIN_FILE="$" MULTIPLUGIN_FILE="$" ALWAYSUNLOADPLUGIN_FILE="$" ) set(KDIRWATCH_BACKENDS_TO_TEST Stat)#Stat is always compiled if (HAVE_SYS_INOTIFY_H) list(APPEND KDIRWATCH_BACKENDS_TO_TEST INotify) endif() if (HAVE_FAM) list(APPEND KDIRWATCH_BACKENDS_TO_TEST Fam) endif() if (HAVE_QFILESYSTEMWATCHER) list(APPEND KDIRWATCH_BACKENDS_TO_TEST QFSWatch) endif() foreach(_backendName ${KDIRWATCH_BACKENDS_TO_TEST}) string(TOLOWER ${_backendName} _lowercaseBackendName) set(BACKEND_TEST_TARGET kdirwatch_${_lowercaseBackendName}_unittest) add_executable(${BACKEND_TEST_TARGET} kdirwatch_unittest.cpp) target_link_libraries(${BACKEND_TEST_TARGET} Qt5::Test KF5::CoreAddons) ecm_mark_as_test(${BACKEND_TEST_TARGET}) add_test(NAME ${BACKEND_TEST_TARGET} COMMAND ${BACKEND_TEST_TARGET}) target_compile_definitions(${BACKEND_TEST_TARGET} PUBLIC -DKDIRWATCH_TEST_METHOD=\"${_backendName}\") endforeach() diff --git a/autotests/kfileutilstest.cpp b/autotests/kfileutilstest.cpp new file mode 100644 index 0000000..791edde --- /dev/null +++ b/autotests/kfileutilstest.cpp @@ -0,0 +1,65 @@ +/* This file is part of the KDE libraries + Copyright (c) 2000-2005 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "kfileutilstest.h" + +#include + +#include + +QTEST_MAIN(KFileUtilsTest) + +void KFileUtilsTest::testSuggestName_data() +{ + QTest::addColumn("oldName"); + QTest::addColumn("existingFiles"); + QTest::addColumn("expectedOutput"); + + QTest::newRow("non-existing") << "foobar" << QStringList() << "foobar (1)"; + QTest::newRow("existing") << "foobar" << QStringList(QStringLiteral("foobar")) << "foobar (1)"; + QTest::newRow("existing_1") << "foobar" << (QStringList() << QStringLiteral("foobar") << QStringLiteral("foobar (1)")) << "foobar (2)"; + QTest::newRow("extension") << "foobar.txt" << QStringList() << "foobar (1).txt"; + QTest::newRow("extension_exists") << "foobar.txt" << (QStringList() << QStringLiteral("foobar.txt")) << "foobar (1).txt"; + QTest::newRow("extension_exists_1") << "foobar.txt" << (QStringList() << QStringLiteral("foobar.txt") << QStringLiteral("foobar (1).txt")) << "foobar (2).txt"; + QTest::newRow("two_extensions") << "foobar.tar.gz" << QStringList() << "foobar (1).tar.gz"; + QTest::newRow("two_extensions_exists") << "foobar.tar.gz" << (QStringList() << QStringLiteral("foobar.tar.gz")) << "foobar (1).tar.gz"; + QTest::newRow("two_extensions_exists_1") << "foobar.tar.gz" << (QStringList() << QStringLiteral("foobar.tar.gz") << QStringLiteral("foobar (1).tar.gz")) << "foobar (2).tar.gz"; + QTest::newRow("with_space") << "foo bar" << QStringList(QStringLiteral("foo bar")) << "foo bar (1)"; + QTest::newRow("dot_at_beginning") << ".aFile.tar.gz" << QStringList() << ".aFile (1).tar.gz"; + QTest::newRow("dots_at_beginning") << "..aFile.tar.gz" << QStringList() << "..aFile (1).tar.gz"; + QTest::newRow("empty_basename") << ".txt" << QStringList() << ". (1).txt"; + QTest::newRow("empty_basename_2dots") << "..txt" << QStringList() << ". (1).txt"; + QTest::newRow("basename_with_dots") << "filename.5.3.2.tar.gz" << QStringList() << "filename.5.3.2 (1).tar.gz"; + QTest::newRow("unknown_extension_trashinfo") << "fileFromHome.trashinfo" << QStringList() << "fileFromHome (1).trashinfo"; +} + +void KFileUtilsTest::testSuggestName() +{ + QFETCH(QString, oldName); + QFETCH(QStringList, existingFiles); + QFETCH(QString, expectedOutput); + + QTemporaryDir dir; + const QUrl baseUrl = QUrl::fromLocalFile(dir.path()); + for (const QString &localFile : qAsConst(existingFiles)) { + QFile file(dir.path() + QLatin1Char('/') + localFile); + QVERIFY(file.open(QIODevice::WriteOnly)); + } + QCOMPARE(KFileUtils::suggestName(baseUrl, oldName), expectedOutput); +} diff --git a/autotests/kfileutilstest.h b/autotests/kfileutilstest.h new file mode 100644 index 0000000..9cd1e36 --- /dev/null +++ b/autotests/kfileutilstest.h @@ -0,0 +1,34 @@ +/* This file is part of the KDE libraries + Copyright (c) 2000-2005 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KFILEUTILSTEST_H +#define KFILEUTILSTEST_H + +#include + +class KFileUtilsTest : public QObject +{ + Q_OBJECT +private Q_SLOTS: + void testSuggestName_data(); + void testSuggestName(); +}; + +#endif + diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index d6d3879..62c24c5 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -1,294 +1,296 @@ # Configure checks for the caching subdir include(CheckIncludeFiles) check_include_files("sys/types.h;sys/mman.h" HAVE_SYS_MMAN_H) configure_file(caching/config-caching.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-caching.h) include(CheckSymbolExists) check_symbol_exists("getgrouplist" "grp.h" HAVE_GETGROUPLIST) configure_file(util/config-getgrouplist.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-getgrouplist.h) set (KDE4_DEFAULT_HOME ".kde${_KDE4_DEFAULT_HOME_POSTFIX}" CACHE STRING "The default KDE home directory" ) configure_file(util/config-kde4home.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kde4home.h) set (ACCOUNTS_SERVICE_ICON_DIR "/var/lib/AccountsService/icons" CACHE STRING "Accounts Services icon storage directory") configure_file(util/config-accountsservice.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-accountsservice.h) ecm_create_qm_loader(kcoreaddons_QM_LOADER kcoreaddons5_qt) set(kcoreaddons_OPTIONAL_SRCS ) set(kcoreaddons_OPTIONAL_LIBS ) if (FAM_FOUND) include_directories(${FAM_INCLUDE_DIR}) set(kcoreaddons_OPTIONAL_LIBS ${kcoreaddons_OPTIONAL_LIBS} ${FAM_LIBRARIES}) endif () if (Inotify_FOUND) include_directories(${Inotify_INCLUDE_DIRS}) set(kcoreaddons_OPTIONAL_LIBS ${kcoreaddons_OPTIONAL_LIBS} ${Inotify_LIBRARIES}) endif () if(NOT WIN32) set(kcoreaddons_OPTIONAL_SRCS caching/kshareddatacache.cpp) set(kcoreaddons_OPTIONAL_LIBS ${kcoreaddons_OPTIONAL_LIBS} ${CMAKE_THREAD_LIBS_INIT}) set_source_files_properties(caching/kshareddatacache.cpp PROPERTIES COMPILE_FLAGS -fexceptions) else() set(kcoreaddons_OPTIONAL_SRCS caching/kshareddatacache_win.cpp ) endif() if (WIN32) set(kcoreaddons_OPTIONAL_SRCS ${kcoreaddons_OPTIONAL_SRCS} text/kmacroexpander_win.cpp util/kprocesslist_win.cpp util/kshell_win.cpp util/kuser_win.cpp ) endif () if (UNIX) set(kcoreaddons_OPTIONAL_SRCS ${kcoreaddons_OPTIONAL_SRCS} text/kmacroexpander_unix.cpp util/kprocesslist_unix.cpp util/kuser_unix.cpp util/kshell_unix.cpp ) endif () set(libkcoreaddons_SRCS kaboutdata.cpp kcoreaddons.cpp io/kautosavefile.cpp io/kdirwatch.cpp io/kfilesystemtype.cpp io/kmessage.cpp io/kprocess.cpp io/kbackup.cpp io/kurlmimedata.cpp + io/kfileutils.cpp jobs/kcompositejob.cpp jobs/kjob.cpp jobs/kjobtrackerinterface.cpp jobs/kjobuidelegate.cpp plugin/kpluginfactory.cpp plugin/kpluginloader.cpp plugin/kpluginmetadata.cpp plugin/desktopfileparser.cpp randomness/krandom.cpp randomness/krandomsequence.cpp text/kmacroexpander.cpp text/kstringhandler.cpp text/ktexttohtml.cpp util/kdelibs4migration.cpp util/kdelibs4configmigrator.cpp util/kformat.cpp util/kformatprivate.cpp util/kosrelease.cpp util/kprocesslist.cpp util/kshell.cpp ${kcoreaddons_OPTIONAL_SRCS} ${kcoreaddons_QM_LOADER} ) set(kcoreaddons_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/../.. # for kcoreaddons_version.h ${CMAKE_CURRENT_SOURCE_DIR}/caching/ ${CMAKE_CURRENT_BINARY_DIR}/io/ ${CMAKE_CURRENT_SOURCE_DIR}/io/ ${CMAKE_CURRENT_SOURCE_DIR}/jobs/ ${CMAKE_CURRENT_SOURCE_DIR}/plugin/ ${CMAKE_CURRENT_SOURCE_DIR}/randomness/ ${CMAKE_CURRENT_SOURCE_DIR}/text/ ${CMAKE_CURRENT_SOURCE_DIR}/util/ ) ecm_qt_declare_logging_category(libkcoreaddons_SRCS HEADER kcoreaddons_debug.h IDENTIFIER KCOREADDONS_DEBUG CATEGORY_NAME org.kde.kcoreaddons) add_library(KF5CoreAddons ${libkcoreaddons_SRCS}) generate_export_header(KF5CoreAddons BASE_NAME KCoreAddons) add_library(KF5::CoreAddons ALIAS KF5CoreAddons) target_include_directories(KF5CoreAddons PUBLIC "$") target_link_libraries(KF5CoreAddons PUBLIC Qt5::Core PRIVATE ${kcoreaddons_OPTIONAL_LIBS} ) target_link_libraries(KF5CoreAddons PRIVATE ${CMAKE_THREAD_LIBS_INIT}) if(WIN32) target_link_libraries(KF5CoreAddons PRIVATE netapi32 userenv) endif() target_include_directories(KF5CoreAddons INTERFACE "$" ) target_compile_definitions(KF5CoreAddons INTERFACE "$") set_target_properties(KF5CoreAddons PROPERTIES VERSION ${KCOREADDONS_VERSION_STRING} SOVERSION ${KCOREADDONS_SOVERSION} EXPORT_NAME CoreAddons ) ecm_generate_headers(KCoreAddons_HEADERS HEADER_NAMES KAboutData KCoreAddons REQUIRED_HEADERS KCoreAddons_HEADERS ) ecm_generate_headers(KCoreAddons_HEADERS HEADER_NAMES KSharedDataCache RELATIVE caching REQUIRED_HEADERS KCoreAddons_HEADERS ) ecm_generate_headers(KCoreAddons_HEADERS HEADER_NAMES KAutoSaveFile KDirWatch KMessage KProcess KBackup KUrlMimeData KFileSystemType + KFileUtils RELATIVE io REQUIRED_HEADERS KCoreAddons_HEADERS ) ecm_generate_headers(KCoreAddons_HEADERS HEADER_NAMES KCompositeJob KJob KJobTrackerInterface KJobUiDelegate RELATIVE jobs REQUIRED_HEADERS KCoreAddons_HEADERS ) ecm_generate_headers(KCoreAddons_HEADERS HEADER_NAMES KExportPlugin KPluginFactory KPluginLoader KPluginMetaData RELATIVE plugin REQUIRED_HEADERS KCoreAddons_HEADERS ) ecm_generate_headers(KCoreAddons_HEADERS HEADER_NAMES KRandom KRandomSequence RELATIVE randomness REQUIRED_HEADERS KCoreAddons_HEADERS ) ecm_generate_headers(KCoreAddons_HEADERS HEADER_NAMES KMacroExpander KStringHandler KTextToHTML KTextToHTMLEmoticonsInterface RELATIVE text REQUIRED_HEADERS KCoreAddons_HEADERS ) ecm_generate_headers(KCoreAddons_HEADERS HEADER_NAMES KFormat KOSRelease KUser KShell KProcessList Kdelibs4Migration Kdelibs4ConfigMigrator RELATIVE util REQUIRED_HEADERS KCoreAddons_HEADERS ) find_package(PythonModuleGeneration) if (PythonModuleGeneration_FOUND) ecm_generate_python_binding( TARGET KF5::CoreAddons PYTHONNAMESPACE PyKF5 MODULENAME KCoreAddons RULES_FILE "${CMAKE_SOURCE_DIR}/cmake/rules_PyKF5.py" SIP_DEPENDS QtCore/QtCoremod.sip HEADERS kaboutdata.h kcoreaddons.h caching/kshareddatacache.h io/kautosavefile.h io/kdirwatch.h io/kmessage.h io/kprocess.h io/kbackup.h io/kurlmimedata.h io/kfilesystemtype.h jobs/kcompositejob.h jobs/kjob.h jobs/kjobtrackerinterface.h jobs/kjobuidelegate.h plugin/kexportplugin.h plugin/kpluginfactory.h plugin/kpluginloader.h plugin/kpluginmetadata.h randomness/krandom.h randomness/krandomsequence.h text/kmacroexpander.h text/kstringhandler.h text/ktexttohtml.h text/ktexttohtmlemoticonsinterface.h util/kformat.h util/kosrelease.h util/kprocesslist.h util/kuser.h util/kshell.h util/kdelibs4migration.h util/kdelibs4configmigrator.h ) endif() install(TARGETS KF5CoreAddons EXPORT KF5CoreAddonsTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES ${KCoreAddons_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KCoreAddons COMPONENT Devel ) # Includes CMake code to install open-source license texts for KAboutData. add_subdirectory(licenses) if(BUILD_QCH) ecm_add_qch( KF5CoreAddons_QCH NAME KCoreAddons BASE_NAME KF5CoreAddons VERSION ${KF5_VERSION} ORG_DOMAIN org.kde SOURCES # using only public headers, to cover only public API ${KCoreAddons_HEADERS} MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md" LINK_QCHS Qt5Core_QCH BLANK_MACROS KCOREADDONS_EXPORT KCOREADDONS_DEPRECATED KCOREADDONS_DEPRECATED_EXPORT TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} COMPONENT Devel ) endif() include(ECMGeneratePriFile) ecm_generate_pri_file(BASE_NAME KCoreAddons LIB_NAME KF5CoreAddons DEPS "core" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/KCoreAddons) install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR}) diff --git a/src/lib/io/kfileutils.cpp b/src/lib/io/kfileutils.cpp new file mode 100644 index 0000000..53362f0 --- /dev/null +++ b/src/lib/io/kfileutils.cpp @@ -0,0 +1,73 @@ +/* This file is part of the KDE libraries + Copyright (C) 2000-2005 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "kfileutils.h" + +#include +#include + +QString KFileUtils::suggestName(const QUrl &baseURL, const QString &oldName) +{ + QString basename; + + // Extract the original file extension from the filename + QMimeDatabase db; + QString nameSuffix = db.suffixForFileName(oldName); + + if (oldName.lastIndexOf(QLatin1Char('.')) == 0) { + basename = QStringLiteral("."); + nameSuffix = oldName; + } else if (nameSuffix.isEmpty()) { + const int lastDot = oldName.lastIndexOf(QLatin1Char('.')); + if (lastDot == -1) { + basename = oldName; + } else { + basename = oldName.left(lastDot); + nameSuffix = oldName.mid(lastDot); + } + } else { + nameSuffix.prepend(QLatin1Char('.')); + basename = oldName.left(oldName.length() - nameSuffix.length()); + } + + // check if (number) exists from the end of the oldName and increment that number + QRegExp numSearch(QStringLiteral("\\(\\d+\\)")); + int start = numSearch.lastIndexIn(oldName); + if (start != -1) { + QString numAsStr = numSearch.cap(0); + QString number = QString::number(numAsStr.midRef(1, numAsStr.size() - 2).toInt() + 1); + basename = basename.leftRef(start) + QLatin1Char('(') + number + QLatin1Char(')'); + } else { + // number does not exist, so just append " (1)" to filename + basename += QLatin1String(" (1)"); + } + const QString suggestedName = basename + nameSuffix; + + // Check if suggested name already exists + bool exists = false; + + if (baseURL.isLocalFile()) { + exists = QFileInfo::exists(baseURL.toLocalFile() + QLatin1Char('/') + suggestedName); + } + + if (!exists) { + return suggestedName; + } else { // already exists -> recurse + return suggestName(baseURL, suggestedName); + } +} diff --git a/src/lib/io/kfileutils.h b/src/lib/io/kfileutils.h new file mode 100644 index 0000000..ccff785 --- /dev/null +++ b/src/lib/io/kfileutils.h @@ -0,0 +1,43 @@ +/* This file is part of the KDE libraries + Copyright (C) 2000-2005 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KFILEUTILS_H +#define KFILEUTILS_H + +#include "kcoreaddons_export.h" + +#include +#include + +/** + * @short A namespace for KFileUtils globals + * + */ +namespace KFileUtils +{ + +/** + * Given a directory path and a filename (which usually exists already), + * this function returns a suggested name for a file that doesn't exist + * in that directory. The existence is only checked for local urls though. + * The suggested file name is of the form "foo 1", "foo 2" etc. + * @since 5.61 + */ +KCOREADDONS_EXPORT QString suggestName(const QUrl &baseURL, const QString &oldName); + +} +#endif