Commit 8b04bbc9 authored by Michael Zhou's avatar Michael Zhou

Merge branch 'master' of https://anongit.kde.org/krita

parents 9570d827 df4cb29a
......@@ -5,7 +5,7 @@ project (krita-and-all-its-deps)
# Parameters: EXTERNALS_DOWNLOAD_DIR place to download all packages
# INSTALL_ROOT place to install everything to
# MXE_TOOLCHAIN: the toolchain file to cross-compile using MXE
#
#
# Example usage: cmake ..\kritadeposx -DEXTERNALS_DOWNLOAD_DIR=/dev2/d -DINSTALL_ROOT=/dev2/i -DWIN64_BUILD=TRUE -DBOOST_LIBRARYDIR=/dev2/i/lib -G "Visual Studio 11 Win64"
......@@ -37,11 +37,11 @@ set(EXTPREFIX "${TOP_INST_DIR}")
set(CMAKE_PREFIX_PATH "${EXTPREFIX}")
if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 2015 Win64")
SET(GLOBAL_PROFILE
-DCMAKE_MODULE_LINKER_FLAGS=/machine:x64
-DCMAKE_EXE_LINKER_FLAGS=/machine:x64
-DCMAKE_SHARED_LINKER_FLAGS=/machine:x64
-DCMAKE_STATIC_LINKER_FLAGS=/machine:x64
SET(GLOBAL_PROFILE
-DCMAKE_MODULE_LINKER_FLAGS=/machine:x64
-DCMAKE_EXE_LINKER_FLAGS=/machine:x64
-DCMAKE_SHARED_LINKER_FLAGS=/machine:x64
-DCMAKE_STATIC_LINKER_FLAGS=/machine:x64
)
endif ()
......@@ -105,16 +105,16 @@ endif()
if (MSYS)
set(PATCH_COMMAND patch)
set(GLOBAL_PROFILE ${GLOBAL_PROFILE}
set(GLOBAL_PROFILE ${GLOBAL_PROFILE}
-DCMAKE_TOOLCHAIN_FILE=${MXE_TOOLCHAIN}
-DCMAKE_FIND_PREFIX_PATH=${CMAKE_PREFIX_PATH}
-DCMAKE_SYSTEM_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include
-DCMAKE_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include
-DCMAKE_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include
-DCMAKE_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib
-DZLIB_ROOT=${CMAKE_PREFIX_PATH}
)
set(GLOBAL_AUTOMAKE_PROFILE --host=i686-pc-mingw32 )
endif()
endif()
if (APPLE)
set(GLOBAL_PROFILE ${GLOBAL_PROFILE} -DCMAKE_MACOSX_RPATH=ON -DKDE_SKIP_RPATH_SETTINGS=ON -DBUILD_WITH_INSTALL_RPATH=ON -DAPPLE_SUPPRESS_X11_WARNING=ON)
......@@ -144,8 +144,12 @@ endfunction()
if (MINGW)
option(ENABLE_PYTHON_DEPS "Enable Python deps (sip, pyqt)" ON)
if (ENABLE_PYTHON_DEPS)
find_package(PythonInterp 3.6 EXACT)
find_package(PythonLibs 3.6 EXACT)
if (ENABLE_PYTHON_2)
message(FATAL_ERROR "Python 2.7 is not supported on Windows at the moment.")
else(ENABLE_PYTHON_2)
find_package(PythonInterp 3.6 EXACT)
find_package(PythonLibs 3.6 EXACT)
endif(ENABLE_PYTHON_2)
if (PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
message(STATUS "Python requirements met.")
TestCompileLinkPythonLibs(CAN_USE_PYTHON_LIBS)
......@@ -203,6 +207,7 @@ endif (ENABLE_PYTHON_DEPS OR NOT MINGW)
if (MSVC OR MINGW)
add_subdirectory( ext_drmingw )
# add_subdirectory( ext_ffmpeg )
endif (MSVC OR MINGW)
if (NOT APPLE)
......
......@@ -2,7 +2,7 @@ SET(PREFIX_ext_exiv2 "${EXTPREFIX}" )
ExternalProject_Add( ext_exiv2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://www.exiv2.org/builds/exiv2-0.26-trunk.tar.gz
URL http://files.kde.org/krita/build/dependencies/exiv2-0.26-trunk.tar.gz
URL_MD5 5399e3b570d7f9205f0e76d47582da4c
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/tzname.patch
......
SET(PREFIX_ext_ffmpeg "${EXTPREFIX}" )
if(MSVC OR MINGW)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
ExternalProject_Add( ext_ffmpeg
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-4.0-win64-static.zip
URL_MD5 bf496481c6991c529e2e94a8e0fa3113
INSTALL_DIR ${PREFIX_ext_ffmpeg}
CONFIGURE_COMMAND ""
BUILD_COMMAND ${CMAKE_COMMAND} -E echo deploying ffmpeg3 64-bit binary
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/ffmpeg.exe ${PREFIX_ext_ffmpeg}/bin/ffmpeg.exe
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/LICENSE.txt ${PREFIX_ext_ffmpeg}/bin/ffmpeg_LICENSE.txt
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/README.txt ${PREFIX_ext_ffmpeg}/bin/ffmpeg_README.txt
UPDATE_COMMAND ""
)
else("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
ExternalProject_Add( ext_ffmpeg
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-4.0-win32-static.zip
URL_MD5 a969a969e3404fe35100e85a37186e5f
INSTALL_DIR ${PREFIX_ext_ffmpeg}
CONFIGURE_COMMAND ""
BUILD_COMMAND ${CMAKE_COMMAND} -E echo deploying ffmpeg3 32-bit binary
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/ffmpeg.exe ${PREFIX_ext_ffmpeg}/bin/ffmpeg.exe
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/LICENSE.txt ${PREFIX_ext_ffmpeg}/bin/ffmpeg_LICENSE.txt
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/README.txt ${PREFIX_ext_ffmpeg}/bin/ffmpeg_README.txt
UPDATE_COMMAND ""
)
endif("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
endif()
......@@ -18,8 +18,8 @@ SET(EXTPREFIX_frameworks "${EXTPREFIX}" )
ExternalProject_Add(
ext_extra_cmake_modules
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/extra-cmake-modules-5.24.0.zip
URL_MD5 e0c19ba97ebd964f9bdc9110c64ce96a
URL http://download.kde.org/stable/frameworks/5.44/extra-cmake-modules-5.44.0.zip
URL_MD5 74aa8fc501e27024390b01c81f2925eb
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/ecm_install_to_share.diff
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
......@@ -34,8 +34,8 @@ ExternalProject_Add(
ExternalProject_Add(
ext_karchive
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/karchive-5.24.0.zip
URL_MD5 739843accfe9bd85ab2f1582722cf01e
URL http://download.kde.org/stable/frameworks/5.44/karchive-5.44.0.zip
URL_MD5 c60a8e22b88cc7328610041638459689
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
......@@ -50,8 +50,8 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kconfig
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/kconfig-5.24.0.zip
URL_MD5 f87ecff795eb76e4ec6561758a5baf87
URL http://download.kde.org/stable/frameworks/5.44/kconfig-5.44.0.zip
URL_MD5 d0223ea471bbf463ec42c2a2355a5183
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/kconfig.diff
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
......@@ -67,8 +67,8 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kwidgetsaddons
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/kwidgetsaddons-5.24.0.zip
URL_MD5 0e399b427814a4814c65a3cf407f9d79
URL http://download.kde.org/stable/frameworks/5.44/kwidgetsaddons-5.44.0.zip
URL_MD5 a9911d8d0f8aaf7a7afd84c41c8f80a1
INSTALL_DIR ${EXTPREFIX_frameworks}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/kwidgetsaddons.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
......@@ -84,8 +84,8 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kcompletion
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/kcompletion-5.24.0.zip
URL_MD5 e8764251ab45005aa81dba242852300c
URL http://download.kde.org/stable/frameworks/5.44/kcompletion-5.44.0.zip
URL_MD5 0647885a702c338a1b656eb4f311ad16
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
......@@ -100,11 +100,10 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kcoreaddons
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/kcoreaddons-5.24.0.zip
URL_MD5 2885878625b19ad0300ef3770b897112
URL http://download.kde.org/stable/frameworks/5.44/kcoreaddons-5.44.0.zip
URL_MD5 16a7379f3e2941d1c19d6f80939f15e8
INSTALL_DIR ${EXTPREFIX_frameworks}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/desktoptojson.diff
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/kcoreaddons-compile-fix.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
${GLOBAL_PROFILE}
......@@ -118,8 +117,8 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kguiaddons
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/kguiaddons-5.24.0.zip
URL_MD5 9bdadbc57d0634816ef80ee9798c3d6c
URL http://download.kde.org/stable/frameworks/5.44/kguiaddons-5.44.0.zip
URL_MD5 440eefbf5abcafc492dcf857f7e4eaf5
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
......@@ -134,11 +133,10 @@ if(APPLE)
ExternalProject_Add(
ext_ki18n
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.17/ki18n-5.17.0.zip
URL_MD5 7d60380d09f98defbf878ea9daba0fbb
URL http://download.kde.org/stable/frameworks/5.44/ki18n-5.44.0.zip
URL_MD5 333ab0a3f65a298e928d746144d4dc8e
INSTALL_DIR ${EXTPREFIX_frameworks}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/ki18n.diff
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/ki18n-appdatalocation.diff
PATCH_COMMAND COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/ki18n-appdatalocation.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
${GLOBAL_PROFILE}
......@@ -151,11 +149,10 @@ else()
ExternalProject_Add(
ext_ki18n
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.17/ki18n-5.17.0.zip
URL_MD5 7d60380d09f98defbf878ea9daba0fbb
URL http://download.kde.org/stable/frameworks/5.44/ki18n-5.44.0.zip
URL_MD5 333ab0a3f65a298e928d746144d4dc8e
INSTALL_DIR ${EXTPREFIX_frameworks}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/ki18n.diff
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/ki18n-appdatalocation.diff
PATCH_COMMAND COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/ki18n-appdatalocation.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
${GLOBAL_PROFILE}
......@@ -165,11 +162,12 @@ ExternalProject_Add(
DEPENDS ext_kguiaddons
)
endif()
ExternalProject_Add(
ext_kitemmodels
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/kitemmodels-5.24.0.zip
URL_MD5 ff41589f48395fc01d5fc7887593779d
URL http://download.kde.org/stable/frameworks/5.44/kitemmodels-5.44.0.zip
URL_MD5 ea43a5e2cc7033eb672796b108d7403b
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
......@@ -183,8 +181,8 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kitemviews
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/kitemviews-5.24.0.zip
URL_MD5 33f638d027a3011a6a69f7484eee3287
URL http://download.kde.org/stable/frameworks/5.44/kitemviews-5.44.0.zip
URL_MD5 8b15c703313c7a790c7db897ef17de7d
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
......@@ -198,8 +196,8 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kimageformats
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/kimageformats-5.24.0.zip
URL_MD5 c1964516bcb2bfe882858f0c0913deb5
URL http://download.kde.org/stable/frameworks/5.44/kimageformats-5.44.0.zip
URL_MD5 02a98b682f9cb655592148d7ebcc05e7
INSTALL_DIR ${EXTPREFIX_frameworks}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/kimageformats.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
......@@ -214,8 +212,8 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kwindowsystem
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/kwindowsystem-5.24.0.zip
URL_MD5 5915e4f63ded983af6db7db3a6cbae1a
URL http://download.kde.org/stable/frameworks/5.44/kwindowsystem-5.44.0.zip
URL_MD5 75329f47cf8cd413fa1d15a57c298563
INSTALL_DIR ${EXTPREFIX_frameworks}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/kwindowsystem-x11.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
......@@ -230,8 +228,8 @@ ExternalProject_Add(
ExternalProject_Add(
ext_kcrash
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/Attic/frameworks/5.24/kcrash-5.24.0.zip
URL_MD5 a2e41e6650105fc3ac8fbd44afbae4fe
URL http://download.kde.org/stable/frameworks/5.44/kcrash-5.44.0.zip
URL_MD5 61adc0e125c65288968d958acf25f4aa
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
......
diff --git a/autotests/kconfigtest.cpp b/autotests/kconfigtest.cpp
index 2b905b5..8c72d58 100644
index 3e0578f..6c4408d 100644
--- a/autotests/kconfigtest.cpp
+++ b/autotests/kconfigtest.cpp
@@ -570,7 +570,7 @@ void KConfigTest::testPathQtHome()
@@ -587,7 +587,7 @@ void KConfigTest::testPathQtHome()
qunsetenv("QT_CACHE_HOME");
qunsetenv("QT_CONFIG_HOME");
QVERIFY(group.hasKey("dataDir"));
......@@ -12,10 +12,10 @@ index 2b905b5..8c72d58 100644
QCOMPARE(group.readEntry("cacheDir", QString()), QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation).append(QStringLiteral("/kconfigtest")));
QVERIFY(group.hasKey("configDir"));
diff --git a/autotests/kdesktopfiletest.cpp b/autotests/kdesktopfiletest.cpp
index 393a6a0..083626d 100644
index fd4a5c9..db08f22 100644
--- a/autotests/kdesktopfiletest.cpp
+++ b/autotests/kdesktopfiletest.cpp
@@ -201,7 +201,7 @@ void KDesktopFileTest::testIsAuthorizedDesktopFile()
@@ -222,7 +222,7 @@ void KDesktopFileTest::testIsAuthorizedDesktopFile()
QVERIFY(QFile::exists(fileName));
QVERIFY(!KDesktopFile::isAuthorizedDesktopFile(fileName));
......@@ -24,8 +24,19 @@ index 393a6a0..083626d 100644
if (!installedFile.isEmpty()) {
QVERIFY(KDesktopFile::isAuthorizedDesktopFile(installedFile));
} else {
@@ -281,8 +281,8 @@ void KDesktopFileTest::testLocateLocal_data()
{
QString systemConfigLocation = QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation).last();
QString writableConfigLocation = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
- QString systemDataLocation = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).last();
- QString writableDataLocation = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
+ QString systemDataLocation = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).last();
+ QString writableDataLocation = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
QTest::addColumn<QString>("path");
QTest::addColumn<QString>("result");
diff --git a/autotests/test_kconf_update.cpp b/autotests/test_kconf_update.cpp
index 4180619..32cd88a 100644
index 3353061..a80ae1e 100644
--- a/autotests/test_kconf_update.cpp
+++ b/autotests/test_kconf_update.cpp
@@ -625,7 +625,7 @@ void TestKConfUpdate::testScript()
......@@ -38,20 +49,20 @@ index 4180619..32cd88a 100644
QString scriptPath = scriptDir + "/test.sh";
writeFile(scriptPath, updScript);
diff --git a/docs/options.md b/docs/options.md
index ba7e2d8..a960a7d 100644
index fab22e1..8823818 100644
--- a/docs/options.md
+++ b/docs/options.md
@@ -96,4 +96,4 @@ They are:
`$QT_CACHE_HOME` - QStandardPaths::GenericConfigLocation
`$QT_CONFIG_HOME` - QStandardPaths::GenericConfigLocation
- `$QT_DATA_HOME` - QStandardPaths::GenericDataLocation
+ `$QT_DATA_HOME` - QStandardPaths::AppDataLocation
* `$QT_CACHE_HOME` - QStandardPaths::GenericCacheLocation
* `$QT_CONFIG_HOME` - QStandardPaths::GenericConfigLocation
-* `$QT_DATA_HOME` - QStandardPaths::GenericDataLocation
+* `$QT_DATA_HOME` - QStandardPaths::AppDataLocation
diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp
index ad52da9..0401ced 100644
index c8eb90a..18d1b69 100644
--- a/src/core/kconfig.cpp
+++ b/src/core/kconfig.cpp
@@ -228,7 +228,7 @@ QString KConfigPrivate::expandString(const QString &value)
@@ -229,7 +229,7 @@ QString KConfigPrivate::expandString(const QString &value)
env = QString::fromLocal8Bit(pEnv.constData());
} else {
if (aVarName == QStringLiteral("QT_DATA_HOME")) {
......@@ -61,7 +72,7 @@ index ad52da9..0401ced 100644
env = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
} else if (aVarName == QStringLiteral("QT_CACHE_HOME")) {
diff --git a/src/core/kdesktopfile.cpp b/src/core/kdesktopfile.cpp
index 4a55030..e28e5df 100644
index b0b6a87..daddd54 100644
--- a/src/core/kdesktopfile.cpp
+++ b/src/core/kdesktopfile.cpp
@@ -88,7 +88,7 @@ QString KDesktopFile::locateLocal(const QString &path)
......@@ -71,7 +82,7 @@ index 4a55030..e28e5df 100644
- Q_FOREACH (const QString &dir, QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation)) {
+ Q_FOREACH (const QString &dir, QStandardPaths::standardLocations(QStandardPaths::AppDataLocation)) {
if (path.startsWith(dir + plus)) {
relativePath = dir.mid(path.length() + 1);
relativePath = path.mid(dir.length() + 1);
}
@@ -97,7 +97,7 @@ QString KDesktopFile::locateLocal(const QString &path)
// What now? The desktop file doesn't come from XDG_DATA_DIRS. Use filename only and hope for the best.
......@@ -92,7 +103,7 @@ index 4a55030..e28e5df 100644
const QString prefix = QFileInfo(xdgDataPrefix).canonicalFilePath();
if (realPath.startsWith(prefix + QLatin1Char('/') + servicesDir, sensitivity)) {
diff --git a/src/kconf_update/kconf_update.cpp b/src/kconf_update/kconf_update.cpp
index 2acd720..d89ae3d 100644
index ab7d946..eeaf6ca 100644
--- a/src/kconf_update/kconf_update.cpp
+++ b/src/kconf_update/kconf_update.cpp
@@ -125,7 +125,7 @@ KonfUpdate::KonfUpdate(QCommandLineParser *parser)
......
commit e0ea4199bc4da359eb91ab51274785d17a4f2909
Author: Ralf Habacker <ralf.habacker@freenet.de>
Date: Wed Sep 21 13:38:03 2016 +0200
Windows compile fix.
diff --git a/src/lib/util/kuser_win.cpp b/src/lib/util/kuser_win.cpp
index 1d77f89..5c3fa45 100644
--- a/src/lib/util/kuser_win.cpp
+++ b/src/lib/util/kuser_win.cpp
@@ -853,7 +853,7 @@ static std::unique_ptr<char[]> queryProcessInformation(TOKEN_INFORMATION_CLASS t
HANDLE _token;
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &_token)) {
qWarning("Failed to get the token for the current process: %d", (int)GetLastError());
- return false;
+ return nullptr;
}
ScopedHANDLE token(_token, handleCloser);
// query required size
diff --git a/src/kcatalog.cpp b/src/kcatalog.cpp
index 7711e9b..b6280ed 100644
index c18d40f..b0ed09d 100644
--- a/src/kcatalog.cpp
+++ b/src/kcatalog.cpp
@@ -112,7 +112,7 @@ QString KCatalog::catalogLocaleDir(const QByteArray &domain,
{
QString relpath = QString::fromLatin1("%1/LC_MESSAGES/%2.mo")
.arg(language, QFile::decodeName(domain));
@@ -128,7 +128,7 @@ QString KCatalog::catalogLocaleDir(const QByteArray &domain,
}
}
- QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
+ QString file = QStandardPaths::locate(QStandardPaths::AppDataLocation,
QString::fromLatin1("locale/") + relpath);
QStringLiteral("locale/") + relpath);
QString localeDir;
if (file.isEmpty()) {
@@ -127,7 +127,7 @@ QString KCatalog::catalogLocaleDir(const QByteArray &domain,
@@ -143,7 +143,7 @@ QString KCatalog::catalogLocaleDir(const QByteArray &domain,
QSet<QString> KCatalog::availableCatalogLanguages(const QByteArray &domain_)
{
QString domain = QFile::decodeName(domain_);
- QStringList localeDirPaths = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
+ QStringList localeDirPaths = QStandardPaths::locateAll(QStandardPaths::AppDataLocation,
QString::fromLatin1("locale"),
QStringLiteral("locale"),
QStandardPaths::LocateDirectory);
QSet<QString> availableLanguages;
diff --git a/src/kcollapsiblegroupbox.cpp b/src/kcollapsiblegroupbox.cpp
index edda7af..3ae7d86 100644
--- a/src/kcollapsiblegroupbox.cpp
+++ b/src/kcollapsiblegroupbox.cpp
@@ -94,9 +94,9 @@ void KCollapsibleGroupBox::setTitle(const QString& title)
}
d->shortcutId = grabShortcut(QKeySequence::mnemonic(title));
-
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleName(title);
-
+#endif
emit titleChanged();
}
diff --git a/src/kled.cpp b/src/kled.cpp
index 1e46929..63a817b 100644
--- a/src/kled.cpp
+++ b/src/kled.cpp
@@ -57,7 +57,9 @@ KLed::KLed(const QColor &color, QWidget *parent)
d(new Private)
{
setColor(color);
+#ifndef QT_NO_ACCESSIBILITY
updateAccessibleName();
+#endif
}
KLed::KLed(const QColor &color, State state, Look look, Shape shape,
@@ -70,7 +72,9 @@ KLed::KLed(const QColor &color, State state, Look look, Shape shape,
d->shape = shape;
setColor(color);
+#ifndef QT_NO_ACCESSIBILITY
updateAccessibleName();
+#endif
}
KLed::~KLed()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8baeda3..bd5491e 100755
index f7eb931..3f0f6d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,8 +36,8 @@ if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
@@ -39,8 +39,8 @@ if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
endif()
add_subdirectory(src)
......@@ -53,4 +13,3 @@ index 8baeda3..bd5491e 100755
# create a Config.cmake and a ConfigVersion.cmake file and install them
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5WidgetsAddons")
......@@ -3,8 +3,8 @@ SET(PREFIX_ext_gmic "${EXTPREFIX}" )
# Download the gmic sources
ExternalProject_Add( ext_gmic_base
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://gmic.eu/files/source/gmic_2.2.0.tar.gz
URL_HASH SHA1=caf72b80da8bd3e31111cff8407b005e7115d2c2
URL https://gmic.eu/files/source/gmic_2.2.3.tar.gz
URL_HASH SHA1=43f975a462a842be5eeff70d8d372476547163b0
SOURCE_DIR gmic
......@@ -19,8 +19,8 @@ ExternalProject_Add( ext_gmic_base
# FIXME: Forcing CMAKE_BUILD_TYPE to Release
ExternalProject_Add( ext_gmic_qt
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://github.com/c-koi/gmic-qt/archive/v.220.tar.gz
URL_HASH SHA1=2b3731e7c90c79d298758b7702a68c1468035429
URL https://github.com/c-koi/gmic-qt/archive/v.2.2.3.tar.gz
URL_HASH SHA1=a3c889de09031d34754c9bb3bd1004a2f67713c6
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/desktop_icon.diff
SOURCE_DIR gmic-qt
......
......@@ -5,12 +5,8 @@ message(STATUS "Using CMake version: ${CMAKE_VERSION}")
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(MIN_QT_VERSION 5.6.0)
option(OVERRIDE_QT_VERSION "Use this to make it possible to build with Qt < 5.6.0. There will be bugs." OFF)
if (OVERRIDE_QT_VERSION)
set(MIN_QT_VERSION 5.4.0)
endif()
set(MIN_FRAMEWORKS_VERSION 5.7.0)
set(MIN_FRAMEWORKS_VERSION 5.18.0)
if (POLICY CMP0002)
cmake_policy(SET CMP0002 OLD)
......@@ -61,10 +57,8 @@ if (APPLE)
add_definitions(-mmacosx-version-min=10.11 -Wno-macro-redefined -Wno-deprecated-register)
endif()
if (LINUX)
if (CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9 AND NOT WINDOWS)
add_definitions(-Werror=delete-incomplete)
endif()
if (CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9 AND NOT WIN32)
add_definitions(-Werror=delete-incomplete)
endif()
######################
......@@ -194,6 +188,7 @@ add_feature_info("Foundation Build" FOUNDATION_BUILD "A Foundation build is a bi
option(KRITA_ENABLE_BROKEN_TESTS "Enable tests that are marked as broken" OFF)
add_feature_info("Enable Broken Tests" KRITA_ENABLE_BROKEN_TESTS "Runs broken test when \"make test\" is invoked (use -DKRITA_ENABLE_BROKEN_TESTS=ON to enable).")
option(ENABLE_PYTHON_2 "Enables the compiler to look for Python 2.7 instead of Python 3. Some packaged scripts are not compatible with Python 2 and this should only be used if you really have to use 2.7." OFF)
include(MacroJPEG)
......@@ -218,18 +213,31 @@ int main(int argc, char *argv[]) {
endfunction()
if(MINGW)
find_package(PythonInterp 3.6 EXACT)
find_package(PythonLibs 3.6 EXACT)
if(ENABLE_PYTHON_2)
message(FATAL_ERROR "Python 2.7 is not supported on Windows at the moment.")
else(ENABLE_PYTHON_2)
find_package(PythonInterp 3.6 EXACT)
find_package(PythonLibs 3.6 EXACT)
endif(ENABLE_PYTHON_2)
if (PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
find_package(PythonLibrary 3.6)
if(ENABLE_PYTHON_2)
find_package(PythonLibrary 2.7)
else(ENABLE_PYTHON_2)
find_package(PythonLibrary 3.6)
endif(ENABLE_PYTHON_2)
TestCompileLinkPythonLibs(CAN_USE_PYTHON_LIBS)
if (NOT CAN_USE_PYTHON_LIBS)
message(FATAL_ERROR "Compiling with Python library failed, please check whether the architecture is correct. Python will be disabled.")
endif (NOT CAN_USE_PYTHON_LIBS)
endif (PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
else(MINGW)
find_package(PythonInterp 3.0)
find_package(PythonLibrary 3.0)
if(ENABLE_PYTHON_2)
find_package(PythonInterp 2.7)
find_package(PythonLibrary 2.7)
else(ENABLE_PYTHON_2)
find_package(PythonInterp 3.0)
find_package(PythonLibrary 3.0)
endif(ENABLE_PYTHON_2)
endif(MINGW)
########################
......@@ -238,7 +246,7 @@ endif(MINGW)
#########################
########################
find_package(ECM 5.19 REQUIRED NOMODULE)
find_package(ECM 5.22 REQUIRED NOMODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(ECMOptionalAddSubdirectory)
include(ECMAddAppIcon)
......@@ -314,6 +322,7 @@ set_package_properties(Qt5Multimedia PROPERTIES
macro_bool_to_01(Qt5Multimedia_FOUND HAVE_QT_MULTIMEDIA)
configure_file(config-qtmultimedia.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-qtmultimedia.h )
if (NOT APPLE)
find_package(Qt5Quick ${MIN_QT_VERSION})
set_package_properties(Qt5Quick PROPERTIES
DESCRIPTION "QtQuick"
......@@ -329,7 +338,7 @@ set_package_properties(Qt5QuickWidgets PROPERTIES
URL "http://www.qt.io/"
TYPE OPTIONAL
PURPOSE "Optionally used for the touch gui for Krita")
endif()
if (NOT WIN32 AND NOT APPLE)
......@@ -458,7 +467,7 @@ if (APPLE)
endif()
add_definitions(-DBOOST_ALL_NO_LIB)
find_package(Boost 1.55 REQUIRED COMPONENTS system)
find_package(Boost 1.55 REQUIRED COMPONENTS system)
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
##