|
|
|
@@ -76,6 +76,22 @@ index 5cc5a20f71..d9a51835d8 100644
|
|
|
|
|
|
|
|
|
|
NDK_LLVM_PATH = $$NDK_ROOT/toolchains/llvm/prebuilt/$$NDK_HOST
|
|
|
|
|
QMAKE_CC = $$NDK_LLVM_PATH/bin/clang
|
|
|
|
|
diff --git a/mkspecs/common/android/qplatformdefs.h b/mkspecs/common/android/qplatformdefs.h
|
|
|
|
|
index f75bc4093b..2bd59410d4 100644
|
|
|
|
|
--- a/mkspecs/common/android/qplatformdefs.h
|
|
|
|
|
+++ b/mkspecs/common/android/qplatformdefs.h
|
|
|
|
|
@@ -144,11 +144,7 @@
|
|
|
|
|
#define QT_SIGNAL_ARGS int
|
|
|
|
|
#define QT_SIGNAL_IGNORE SIG_IGN
|
|
|
|
|
|
|
|
|
|
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
|
|
|
|
|
#define QT_SOCKLEN_T socklen_t
|
|
|
|
|
-#else
|
|
|
|
|
-#define QT_SOCKLEN_T int
|
|
|
|
|
-#endif
|
|
|
|
|
|
|
|
|
|
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
|
|
|
|
|
#define QT_SNPRINTF ::snprintf
|
|
|
|
|
diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf
|
|
|
|
|
index d16b77acb8..61a1300860 100644
|
|
|
|
|
--- a/mkspecs/common/macx.conf
|
|
|
|
@@ -166,6 +182,129 @@ index efbe7c1e55..11ecd6b2a5 100644
|
|
|
|
|
isEmpty(dir): \
|
|
|
|
|
error("Failed to find the Visual Studio installation directory.")
|
|
|
|
|
cmd += $$system_quote($$dir\\VC\\Auxiliary\\Build\\vcvarsall.bat) $$arch
|
|
|
|
|
diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf
|
|
|
|
|
index 088b39ff3f..46f21ac092 100644
|
|
|
|
|
--- a/mkspecs/features/uikit/default_post.prf
|
|
|
|
|
+++ b/mkspecs/features/uikit/default_post.prf
|
|
|
|
|
@@ -28,7 +28,7 @@ macx-xcode {
|
|
|
|
|
device_family.value = $$QMAKE_APPLE_TARGETED_DEVICE_FAMILY
|
|
|
|
|
QMAKE_MAC_XCODE_SETTINGS += device_family
|
|
|
|
|
|
|
|
|
|
- ios {
|
|
|
|
|
+ equals(TEMPLATE, app):ios {
|
|
|
|
|
# Set up default 4-inch iPhone/iPod launch image so that our apps
|
|
|
|
|
# support the full screen resolution of those devices.
|
|
|
|
|
qmake_launch_image = Default-568h@2x.png
|
|
|
|
|
diff --git a/mkspecs/linux-clang/qplatformdefs.h b/mkspecs/linux-clang/qplatformdefs.h
|
|
|
|
|
index a818d973f0..c1ab72fbc6 100644
|
|
|
|
|
--- a/mkspecs/linux-clang/qplatformdefs.h
|
|
|
|
|
+++ b/mkspecs/linux-clang/qplatformdefs.h
|
|
|
|
|
@@ -79,14 +79,6 @@
|
|
|
|
|
#define QT_USE_XOPEN_LFS_EXTENSIONS
|
|
|
|
|
#include "../common/posix/qplatformdefs.h"
|
|
|
|
|
|
|
|
|
|
-#undef QT_SOCKLEN_T
|
|
|
|
|
-
|
|
|
|
|
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
|
|
|
|
|
-#define QT_SOCKLEN_T socklen_t
|
|
|
|
|
-#else
|
|
|
|
|
-#define QT_SOCKLEN_T int
|
|
|
|
|
-#endif
|
|
|
|
|
-
|
|
|
|
|
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
|
|
|
|
|
#define QT_SNPRINTF ::snprintf
|
|
|
|
|
#define QT_VSNPRINTF ::vsnprintf
|
|
|
|
|
diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
|
|
|
|
|
index 13523f0702..4d2750d9ec 100644
|
|
|
|
|
--- a/mkspecs/linux-g++/qplatformdefs.h
|
|
|
|
|
+++ b/mkspecs/linux-g++/qplatformdefs.h
|
|
|
|
|
@@ -79,14 +79,6 @@
|
|
|
|
|
#define QT_USE_XOPEN_LFS_EXTENSIONS
|
|
|
|
|
#include "../common/posix/qplatformdefs.h"
|
|
|
|
|
|
|
|
|
|
-#undef QT_SOCKLEN_T
|
|
|
|
|
-
|
|
|
|
|
-#if defined(__GLIBC__) && (__GLIBC__ < 2)
|
|
|
|
|
-#define QT_SOCKLEN_T int
|
|
|
|
|
-#else
|
|
|
|
|
-#define QT_SOCKLEN_T socklen_t
|
|
|
|
|
-#endif
|
|
|
|
|
-
|
|
|
|
|
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
|
|
|
|
|
#define QT_SNPRINTF ::snprintf
|
|
|
|
|
#define QT_VSNPRINTF ::vsnprintf
|
|
|
|
|
diff --git a/mkspecs/linux-llvm/qplatformdefs.h b/mkspecs/linux-llvm/qplatformdefs.h
|
|
|
|
|
index dc750ab1ef..d3cc39b47f 100644
|
|
|
|
|
--- a/mkspecs/linux-llvm/qplatformdefs.h
|
|
|
|
|
+++ b/mkspecs/linux-llvm/qplatformdefs.h
|
|
|
|
|
@@ -80,14 +80,6 @@
|
|
|
|
|
#define QT_USE_XOPEN_LFS_EXTENSIONS
|
|
|
|
|
#include "../common/posix/qplatformdefs.h"
|
|
|
|
|
|
|
|
|
|
-#undef QT_SOCKLEN_T
|
|
|
|
|
-
|
|
|
|
|
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
|
|
|
|
|
-#define QT_SOCKLEN_T socklen_t
|
|
|
|
|
-#else
|
|
|
|
|
-#define QT_SOCKLEN_T int
|
|
|
|
|
-#endif
|
|
|
|
|
-
|
|
|
|
|
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
|
|
|
|
|
#define QT_SNPRINTF ::snprintf
|
|
|
|
|
#define QT_VSNPRINTF ::vsnprintf
|
|
|
|
|
diff --git a/mkspecs/linux-lsb-g++/qplatformdefs.h b/mkspecs/linux-lsb-g++/qplatformdefs.h
|
|
|
|
|
index 4c4e53da2a..83baffb3e3 100644
|
|
|
|
|
--- a/mkspecs/linux-lsb-g++/qplatformdefs.h
|
|
|
|
|
+++ b/mkspecs/linux-lsb-g++/qplatformdefs.h
|
|
|
|
|
@@ -85,16 +85,9 @@
|
|
|
|
|
#include "../common/posix/qplatformdefs.h"
|
|
|
|
|
|
|
|
|
|
#undef QT_OPEN_LARGEFILE
|
|
|
|
|
-#undef QT_SOCKLEN_T
|
|
|
|
|
|
|
|
|
|
#define QT_OPEN_LARGEFILE 0
|
|
|
|
|
|
|
|
|
|
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
|
|
|
|
|
-#define QT_SOCKLEN_T socklen_t
|
|
|
|
|
-#else
|
|
|
|
|
-#define QT_SOCKLEN_T int
|
|
|
|
|
-#endif
|
|
|
|
|
-
|
|
|
|
|
#ifndef SIOCGIFBRDADDR
|
|
|
|
|
# define SIOCGIFBRDADDR 0x8919
|
|
|
|
|
#endif
|
|
|
|
|
diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h
|
|
|
|
|
index 4339ea2b23..6007af0055 100644
|
|
|
|
|
--- a/mkspecs/lynxos-g++/qplatformdefs.h
|
|
|
|
|
+++ b/mkspecs/lynxos-g++/qplatformdefs.h
|
|
|
|
|
@@ -72,14 +72,6 @@
|
|
|
|
|
|
|
|
|
|
#include "../common/posix/qplatformdefs.h"
|
|
|
|
|
|
|
|
|
|
-#undef QT_SOCKLEN_T
|
|
|
|
|
-
|
|
|
|
|
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
|
|
|
|
|
-#define QT_SOCKLEN_T socklen_t
|
|
|
|
|
-#else
|
|
|
|
|
-#define QT_SOCKLEN_T int
|
|
|
|
|
-#endif
|
|
|
|
|
-
|
|
|
|
|
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
|
|
|
|
|
#define QT_SNPRINTF ::snprintf
|
|
|
|
|
#define QT_VSNPRINTF ::vsnprintf
|
|
|
|
|
diff --git a/mkspecs/macx-xcode/WorkspaceSettings.xcsettings b/mkspecs/macx-xcode/WorkspaceSettings.xcsettings
|
|
|
|
|
index a3f43a8b38..08de0be8d3 100644
|
|
|
|
|
--- a/mkspecs/macx-xcode/WorkspaceSettings.xcsettings
|
|
|
|
|
+++ b/mkspecs/macx-xcode/WorkspaceSettings.xcsettings
|
|
|
|
|
@@ -2,8 +2,6 @@
|
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
|
<plist version="1.0">
|
|
|
|
|
<dict>
|
|
|
|
|
- <key>BuildSystemType</key>
|
|
|
|
|
- <string>Original</string>
|
|
|
|
|
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
|
|
|
|
|
<false/>
|
|
|
|
|
</dict>
|
|
|
|
|
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
|
|
|
|
|
index 05116b7b1b..a96b84e63b 100644
|
|
|
|
|
--- a/qmake/doc/src/qmake-manual.qdoc
|
|
|
|
@@ -228,6 +367,56 @@ index 05116b7b1b..a96b84e63b 100644
|
|
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
\snippet code/doc_src_qmake-manual.pro 63
|
|
|
|
|
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
|
|
|
|
|
index c2f6df7787..a9d0125825 100644
|
|
|
|
|
--- a/qmake/generators/mac/pbuilder_pbx.cpp
|
|
|
|
|
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
|
|
|
|
|
@@ -778,6 +778,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
|
|
|
|
{
|
|
|
|
|
QString mkfile = pbx_dir + Option::dir_sep + "qt_preprocess.mak";
|
|
|
|
|
QFile mkf(mkfile);
|
|
|
|
|
+ ProStringList outputPaths;
|
|
|
|
|
+ ProStringList inputPaths;
|
|
|
|
|
if(mkf.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
|
|
|
|
writingUnixMakefileGenerator = true;
|
|
|
|
|
debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData());
|
|
|
|
|
@@ -827,8 +829,11 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
|
|
|
|
++added;
|
|
|
|
|
const QString file_name = fileFixify(fn, FileFixifyFromOutdir);
|
|
|
|
|
const QString tmpOut = fileFixify(tmp_out.first().toQString(), FileFixifyFromOutdir);
|
|
|
|
|
- mkt << ' ' << escapeDependencyPath(Option::fixPathToTargetOS(
|
|
|
|
|
+ QString path = escapeDependencyPath(Option::fixPathToTargetOS(
|
|
|
|
|
replaceExtraCompilerVariables(tmpOut, file_name, QString(), NoShell)));
|
|
|
|
|
+ mkt << ' ' << path;
|
|
|
|
|
+ inputPaths << fn;
|
|
|
|
|
+ outputPaths << path;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -839,6 +844,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
|
|
|
|
mkt.flush();
|
|
|
|
|
mkf.close();
|
|
|
|
|
}
|
|
|
|
|
+ // Remove duplicates from build steps with "combine"
|
|
|
|
|
+ outputPaths.removeDuplicates();
|
|
|
|
|
+
|
|
|
|
|
+ // Don't create cycles. We only have one qt_preprocess.mak which runs different compilers
|
|
|
|
|
+ // whose inputs may depend on the output of another. The "compilers" step will run all
|
|
|
|
|
+ // compilers anyway
|
|
|
|
|
+ inputPaths.removeEach(outputPaths);
|
|
|
|
|
+
|
|
|
|
|
mkfile = fileFixify(mkfile);
|
|
|
|
|
QString phase_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET");
|
|
|
|
|
// project->values("QMAKE_PBX_BUILDPHASES").append(phase_key);
|
|
|
|
|
@@ -849,6 +862,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
|
|
|
|
<< "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n"
|
|
|
|
|
<< "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
|
|
|
|
|
<< "\t\t\t" << writeSettings("name", "Qt Preprocessors") << ";\n"
|
|
|
|
|
+ << "\t\t\t" << writeSettings("inputPaths", inputPaths, SettingsAsList, 4) << ";\n"
|
|
|
|
|
+ << "\t\t\t" << writeSettings("outputPaths", outputPaths, SettingsAsList, 4) << ";\n"
|
|
|
|
|
<< "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";\n"
|
|
|
|
|
<< "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(Option::output_dir)
|
|
|
|
|
+ " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";\n"
|
|
|
|
|
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
|
|
|
|
|
index 5c61a3c65c..a901332312 100644
|
|
|
|
|
--- a/qmake/generators/makefile.cpp
|
|
|
|
@@ -20016,7 +20205,7 @@ index 742505c39a..b06ccc5ec6 100644
|
|
|
|
|
|
|
|
|
|
public void onWindowFocusChanged(boolean hasFocus) {
|
|
|
|
|
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
|
|
|
|
|
index 563fc7bce6..39f1220722 100644
|
|
|
|
|
index 563fc7bce6..23beccbf74 100644
|
|
|
|
|
--- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
|
|
|
|
|
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
|
|
|
|
|
@@ -43,6 +43,7 @@ package org.qtproject.qt5.android;
|
|
|
|
@@ -20027,17 +20216,64 @@ index 563fc7bce6..39f1220722 100644
|
|
|
|
|
import java.util.concurrent.Semaphore;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
@@ -111,7 +112,6 @@ public class QtNative
|
|
|
|
|
@@ -111,9 +112,9 @@ public class QtNative
|
|
|
|
|
private static Boolean m_tabletEventSupported = null;
|
|
|
|
|
private static boolean m_usePrimaryClip = false;
|
|
|
|
|
public static QtThread m_qtThread = new QtThread();
|
|
|
|
|
- private static Method m_addItemMethod = null;
|
|
|
|
|
private static HashMap<String, Uri> m_cachedUris = new HashMap<String, Uri>();
|
|
|
|
|
private static ArrayList<String> m_knownDirs = new ArrayList<String>();
|
|
|
|
|
+ private static final String NoPermissionErrorMessage = "No permissions to open Uri";
|
|
|
|
|
|
|
|
|
|
private static final Runnable runPendingCppRunnablesRunnable = new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
@@ -191,11 +192,10 @@ public class QtNative
|
|
|
|
|
return iterUri;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- // Android 6 and earlier could still manage to open the file so we can return the
|
|
|
|
|
- // parsed uri here
|
|
|
|
|
- if (Build.VERSION.SDK_INT < 24)
|
|
|
|
|
- return parsedUri;
|
|
|
|
|
- return null;
|
|
|
|
|
+ // if we only have transient permissions on uri all the above will fail,
|
|
|
|
|
+ // but we will be able to read the file anyway, so continue with uri here anyway
|
|
|
|
|
+ // and check for SecurityExceptions later
|
|
|
|
|
+ return parsedUri;
|
|
|
|
|
} catch (SecurityException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
return null;
|
|
|
|
|
@@ -242,7 +242,7 @@ public class QtNative
|
|
|
|
|
int error = -1;
|
|
|
|
|
|
|
|
|
|
@@ -270,8 +270,8 @@ public class QtNative
|
|
|
|
|
if (uri == null) {
|
|
|
|
|
Log.e(QtTAG, "getSize(): No permissions to open Uri");
|
|
|
|
|
- Log.e(QtTAG, "openFdForContentUrl(): No permissions to open Uri");
|
|
|
|
|
+ Log.e(QtTAG, "openFdForContentUrl(): " + NoPermissionErrorMessage);
|
|
|
|
|
return error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -252,12 +252,13 @@ public class QtNative
|
|
|
|
|
return fdDesc.detachFd();
|
|
|
|
|
} catch (FileNotFoundException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
- return error;
|
|
|
|
|
} catch (IllegalArgumentException e) {
|
|
|
|
|
Log.e(QtTAG, "openFdForContentUrl(): Invalid Uri");
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
- return error;
|
|
|
|
|
+ } catch (SecurityException e) {
|
|
|
|
|
+ Log.e(QtTAG, NoPermissionErrorMessage);
|
|
|
|
|
}
|
|
|
|
|
+ return error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static long getSize(Context context, String contentUrl)
|
|
|
|
|
@@ -268,10 +269,10 @@ public class QtNative
|
|
|
|
|
uri = getUriWithValidPermission(context, contentUrl, "r");
|
|
|
|
|
|
|
|
|
|
if (uri == null) {
|
|
|
|
|
- Log.e(QtTAG, "getSize(): No permissions to open Uri");
|
|
|
|
|
+ Log.e(QtTAG, NoPermissionErrorMessage);
|
|
|
|
|
return size;
|
|
|
|
|
- } else {
|
|
|
|
|
- m_cachedUris.putIfAbsent(contentUrl, uri);
|
|
|
|
@@ -20046,7 +20282,73 @@ index 563fc7bce6..39f1220722 100644
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
@@ -709,7 +709,7 @@ public class QtNative
|
|
|
|
|
@@ -286,12 +287,13 @@ public class QtNative
|
|
|
|
|
} catch (IllegalArgumentException e) {
|
|
|
|
|
Log.e(QtTAG, "getSize(): Invalid Uri");
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
- return size;
|
|
|
|
|
} catch (UnsupportedOperationException e) {
|
|
|
|
|
Log.e(QtTAG, "getSize(): Unsupported operation for given Uri");
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
- return size;
|
|
|
|
|
+ } catch (SecurityException e) {
|
|
|
|
|
+ Log.e(QtTAG, NoPermissionErrorMessage);
|
|
|
|
|
}
|
|
|
|
|
+ return size;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static boolean checkFileExists(Context context, String contentUrl)
|
|
|
|
|
@@ -301,7 +303,7 @@ public class QtNative
|
|
|
|
|
if (uri == null)
|
|
|
|
|
uri = getUriWithValidPermission(context, contentUrl, "r");
|
|
|
|
|
if (uri == null) {
|
|
|
|
|
- Log.e(QtTAG, "checkFileExists(): No permissions to open Uri");
|
|
|
|
|
+ Log.e(QtTAG, NoPermissionErrorMessage);
|
|
|
|
|
return exists;
|
|
|
|
|
} else {
|
|
|
|
|
if (!m_cachedUris.containsKey(contentUrl))
|
|
|
|
|
@@ -319,12 +321,13 @@ public class QtNative
|
|
|
|
|
} catch (IllegalArgumentException e) {
|
|
|
|
|
Log.e(QtTAG, "checkFileExists(): Invalid Uri");
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
- return exists;
|
|
|
|
|
} catch (UnsupportedOperationException e) {
|
|
|
|
|
Log.e(QtTAG, "checkFileExists(): Unsupported operation for given Uri");
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
- return false;
|
|
|
|
|
+ } catch (SecurityException e) {
|
|
|
|
|
+ Log.e(QtTAG, NoPermissionErrorMessage);
|
|
|
|
|
}
|
|
|
|
|
+ return exists;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static boolean checkIfWritable(Context context, String contentUrl)
|
|
|
|
|
@@ -342,7 +345,7 @@ public class QtNative
|
|
|
|
|
uri = getUriWithValidPermission(context, contentUrl, "r");
|
|
|
|
|
}
|
|
|
|
|
if (uri == null) {
|
|
|
|
|
- Log.e(QtTAG, "isDir(): No permissions to open Uri");
|
|
|
|
|
+ Log.e(QtTAG, NoPermissionErrorMessage);
|
|
|
|
|
return isDir;
|
|
|
|
|
} else {
|
|
|
|
|
if (!m_cachedUris.containsKey(contentUrl))
|
|
|
|
|
@@ -372,12 +375,13 @@ public class QtNative
|
|
|
|
|
} catch (IllegalArgumentException e) {
|
|
|
|
|
Log.e(QtTAG, "checkIfDir(): Invalid Uri");
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
- return false;
|
|
|
|
|
} catch (UnsupportedOperationException e) {
|
|
|
|
|
Log.e(QtTAG, "checkIfDir(): Unsupported operation for given Uri");
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
- return false;
|
|
|
|
|
+ } catch (SecurityException e) {
|
|
|
|
|
+ Log.e(QtTAG, NoPermissionErrorMessage);
|
|
|
|
|
}
|
|
|
|
|
+ return false;
|
|
|
|
|
}
|
|
|
|
|
public static String[] listContentsFromTreeUri(Context context, String contentUrl)
|
|
|
|
|
{
|
|
|
|
|
@@ -709,7 +713,7 @@ public class QtNative
|
|
|
|
|
}
|
|
|
|
|
if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_POINTER_DOWN && index == event.getActionIndex()) {
|
|
|
|
|
return 0;
|
|
|
|
@@ -20055,7 +20357,7 @@ index 563fc7bce6..39f1220722 100644
|
|
|
|
|
return 3;
|
|
|
|
|
}
|
|
|
|
|
return 2;
|
|
|
|
|
@@ -929,6 +929,42 @@ public class QtNative
|
|
|
|
|
@@ -929,6 +933,42 @@ public class QtNative
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -20098,7 +20400,7 @@ index 563fc7bce6..39f1220722 100644
|
|
|
|
|
private static void registerClipboardManager()
|
|
|
|
|
{
|
|
|
|
|
if (m_service == null || m_activity != null) { // Avoid freezing if only service
|
|
|
|
|
@@ -958,9 +994,8 @@ public class QtNative
|
|
|
|
|
@@ -958,9 +998,8 @@ public class QtNative
|
|
|
|
|
|
|
|
|
|
private static void clearClipData()
|
|
|
|
|
{
|
|
|
|
@@ -20109,7 +20411,7 @@ index 563fc7bce6..39f1220722 100644
|
|
|
|
|
}
|
|
|
|
|
private static void setClipboardText(String text)
|
|
|
|
|
{
|
|
|
|
|
@@ -1006,25 +1041,9 @@ public class QtNative
|
|
|
|
|
@@ -1006,25 +1045,9 @@ public class QtNative
|
|
|
|
|
if (m_usePrimaryClip) {
|
|
|
|
|
ClipData clip = m_clipboardManager.getPrimaryClip();
|
|
|
|
|
if (Build.VERSION.SDK_INT >= 26) {
|
|
|
|
@@ -20137,7 +20439,7 @@ index 563fc7bce6..39f1220722 100644
|
|
|
|
|
}
|
|
|
|
|
m_clipboardManager.setPrimaryClip(clip);
|
|
|
|
|
} else {
|
|
|
|
|
@@ -1049,7 +1068,7 @@ public class QtNative
|
|
|
|
|
@@ -1049,7 +1072,7 @@ public class QtNative
|
|
|
|
|
try {
|
|
|
|
|
if (m_clipboardManager != null && m_clipboardManager.hasPrimaryClip()) {
|
|
|
|
|
ClipData primaryClip = m_clipboardManager.getPrimaryClip();
|
|
|
|
@@ -67927,7 +68229,7 @@ index f076ea06a7..c960eaeef4 100644
|
|
|
|
|
|
|
|
|
|
static const char language_name_list[] =
|
|
|
|
|
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
|
|
|
|
|
index f9ec7678fe..02a9fe3a30 100644
|
|
|
|
|
index f9ec7678fe..e6e7cbaad4 100644
|
|
|
|
|
--- a/src/corelib/text/qstring.cpp
|
|
|
|
|
+++ b/src/corelib/text/qstring.cpp
|
|
|
|
|
@@ -1331,11 +1331,11 @@ const QString::Null QString::null = { };
|
|
|
|
@@ -68001,22 +68303,6 @@ index f9ec7678fe..02a9fe3a30 100644
|
|
|
|
|
break;
|
|
|
|
|
// The call to replace_helper just moved what index points at:
|
|
|
|
|
index += pos*(after.d->size - 1);
|
|
|
|
|
@@ -4563,13 +4558,13 @@ int QString::lastIndexOf(const QRegularExpression &re, int from, QRegularExpress
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- int endpos = (from < 0) ? (size() + from + 1) : (from + 1);
|
|
|
|
|
+ int endpos = (from < 0) ? (size() + from + 1) : (from);
|
|
|
|
|
QRegularExpressionMatchIterator iterator = re.globalMatch(*this);
|
|
|
|
|
int lastIndex = -1;
|
|
|
|
|
while (iterator.hasNext()) {
|
|
|
|
|
QRegularExpressionMatch match = iterator.next();
|
|
|
|
|
int start = match.capturedStart();
|
|
|
|
|
- if (start < endpos) {
|
|
|
|
|
+ if (start <= endpos) {
|
|
|
|
|
lastIndex = start;
|
|
|
|
|
if (rmatch)
|
|
|
|
|
*rmatch = std::move(match);
|
|
|
|
|
@@ -4626,10 +4621,16 @@ bool QString::contains(const QRegularExpression &re, QRegularExpressionMatch *rm
|
|
|
|
|
Returns the number of times the regular expression \a re matches
|
|
|
|
|
in the string.
|
|
|
|
@@ -75269,7 +75555,7 @@ index 5265568f42..7e9f0f1acc 100644
|
|
|
|
|
result.name = "{D-Bus type \"" + signature + "\"}";
|
|
|
|
|
type = registerComplexDBusType(result.name);
|
|
|
|
|
diff --git a/src/gui/configure.json b/src/gui/configure.json
|
|
|
|
|
index c8c4864eca..1f08795c57 100644
|
|
|
|
|
index c8c4864eca..12c95742d2 100644
|
|
|
|
|
--- a/src/gui/configure.json
|
|
|
|
|
+++ b/src/gui/configure.json
|
|
|
|
|
@@ -601,15 +601,6 @@
|
|
|
|
@@ -75297,7 +75583,17 @@ index c8c4864eca..1f08795c57 100644
|
|
|
|
|
},
|
|
|
|
|
"xcb_keysyms": {
|
|
|
|
|
"label": "XCB Keysyms >= 0.3.9",
|
|
|
|
|
@@ -1065,7 +1056,6 @@
|
|
|
|
|
@@ -843,7 +834,8 @@
|
|
|
|
|
"// embedded devices, are not intended to be used together with X. EGL support",
|
|
|
|
|
"// has to be disabled in plugins like xcb in this case since the native display,",
|
|
|
|
|
"// window and pixmap types will be different than what an X-based platform",
|
|
|
|
|
- "// plugin would expect."
|
|
|
|
|
+ "// plugin would expect.",
|
|
|
|
|
+ "#define USE_X11"
|
|
|
|
|
],
|
|
|
|
|
"include": [ "EGL/egl.h", "X11/Xlib.h" ],
|
|
|
|
|
"main": [
|
|
|
|
|
@@ -1065,7 +1057,6 @@
|
|
|
|
|
"tail": "#undef explicit",
|
|
|
|
|
"include": [
|
|
|
|
|
"xcb/xcb.h",
|
|
|
|
@@ -75305,7 +75601,7 @@ index c8c4864eca..1f08795c57 100644
|
|
|
|
|
"xcb/xcb_image.h",
|
|
|
|
|
"xcb/xcb_keysyms.h",
|
|
|
|
|
"xcb/randr.h",
|
|
|
|
|
@@ -1097,7 +1087,7 @@
|
|
|
|
|
@@ -1097,7 +1088,7 @@
|
|
|
|
|
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof(nullptr, 0, 0, 0, 0, 0, 0, 0, 0);"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
@@ -75381,6 +75677,23 @@ index 03ec43eaf7..eb44a0190d 100644
|
|
|
|
|
#pragma optimize("", on)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
|
|
|
|
|
index 6807ce937a..eedfe3e00e 100644
|
|
|
|
|
--- a/src/gui/image/qpnghandler.cpp
|
|
|
|
|
+++ b/src/gui/image/qpnghandler.cpp
|
|
|
|
|
@@ -649,10 +649,10 @@ bool QPngHandlerPrivate::readPngHeader()
|
|
|
|
|
}
|
|
|
|
|
if (primaries.areValid()) {
|
|
|
|
|
colorSpace = QColorSpace(primaries.whitePoint, primaries.redPoint, primaries.greenPoint, primaries.bluePoint,
|
|
|
|
|
- QColorSpace::TransferFunction::Gamma, fileGamma);
|
|
|
|
|
+ QColorSpace::TransferFunction::Gamma, 1.0f / fileGamma);
|
|
|
|
|
} else {
|
|
|
|
|
colorSpace = QColorSpace(QColorSpace::Primaries::SRgb,
|
|
|
|
|
- QColorSpace::TransferFunction::Gamma, fileGamma);
|
|
|
|
|
+ QColorSpace::TransferFunction::Gamma, 1.0f / fileGamma);
|
|
|
|
|
}
|
|
|
|
|
colorSpaceState = GammaChrm;
|
|
|
|
|
}
|
|
|
|
|
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
|
|
|
|
|
index 8acc80776c..16fd78f25f 100644
|
|
|
|
|
--- a/src/gui/image/qxpmhandler.cpp
|
|
|
|
@@ -75394,6 +75707,19 @@ index 8acc80776c..16fd78f25f 100644
|
|
|
|
|
if (((buf.length()-1) % 3) && (buf[0] == '#')) {
|
|
|
|
|
buf.truncate(((buf.length()-1) / 4 * 3) + 1); // remove alpha channel left by imagemagick
|
|
|
|
|
}
|
|
|
|
|
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
|
|
|
|
|
index fc736033c2..eb6b332a96 100644
|
|
|
|
|
--- a/src/gui/kernel/qplatformwindow.cpp
|
|
|
|
|
+++ b/src/gui/kernel/qplatformwindow.cpp
|
|
|
|
|
@@ -229,7 +229,7 @@ bool QPlatformWindow::isActive() const
|
|
|
|
|
*/
|
|
|
|
|
bool QPlatformWindow::isAncestorOf(const QPlatformWindow *child) const
|
|
|
|
|
{
|
|
|
|
|
- for (const QPlatformWindow *parent = child->parent(); parent; parent = child->parent()) {
|
|
|
|
|
+ for (const QPlatformWindow *parent = child->parent(); parent; parent = parent->parent()) {
|
|
|
|
|
if (parent == this)
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/gui/opengl/qopenglpaintdevice.cpp
|
|
|
|
|
index 3920a10467..9e7d2861fd 100644
|
|
|
|
|
--- a/src/gui/opengl/qopenglpaintdevice.cpp
|
|
|
|
@@ -75748,6 +76074,75 @@ index 54b0da4f57..3e364b7579 100644
|
|
|
|
|
// basic/rough clipping is done in floating point coordinates to avoid
|
|
|
|
|
// integer overflow problems.
|
|
|
|
|
if (x1 < xmin) {
|
|
|
|
|
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
|
|
|
|
|
index 5d8f89eadd..9fe510827a 100644
|
|
|
|
|
--- a/src/gui/painting/qpaintengineex.cpp
|
|
|
|
|
+++ b/src/gui/painting/qpaintengineex.cpp
|
|
|
|
|
@@ -385,7 +385,7 @@ QPainterState *QPaintEngineEx::createState(QPainterState *orig) const
|
|
|
|
|
|
|
|
|
|
Q_GUI_EXPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
|
|
|
|
|
|
|
|
|
|
-void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
|
|
|
|
|
+void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &inPen)
|
|
|
|
|
{
|
|
|
|
|
#ifdef QT_DEBUG_DRAW
|
|
|
|
|
qDebug() << "QPaintEngineEx::stroke()" << pen;
|
|
|
|
|
@@ -403,6 +403,38 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
|
|
|
|
|
d->stroker.setCubicToHook(qpaintengineex_cubicTo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+ QRectF clipRect;
|
|
|
|
|
+ QPen pen = inPen;
|
|
|
|
|
+ if (pen.style() > Qt::SolidLine) {
|
|
|
|
|
+ QRectF cpRect = path.controlPointRect();
|
|
|
|
|
+ const QTransform &xf = state()->matrix;
|
|
|
|
|
+ if (qt_pen_is_cosmetic(pen, state()->renderHints)){
|
|
|
|
|
+ clipRect = d->exDeviceRect;
|
|
|
|
|
+ cpRect.translate(xf.dx(), xf.dy());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ clipRect = xf.inverted().mapRect(QRectF(d->exDeviceRect));
|
|
|
|
|
+ }
|
|
|
|
|
+ // Check to avoid generating unwieldy amount of dashes that will not be visible anyway
|
|
|
|
|
+ qreal pw = pen.widthF() ? pen.widthF() : 1;
|
|
|
|
|
+ QRectF extentRect = cpRect.adjusted(-pw, -pw, pw, pw) & clipRect;
|
|
|
|
|
+ qreal extent = qMax(extentRect.width(), extentRect.height());
|
|
|
|
|
+ qreal patternLength = 0;
|
|
|
|
|
+ const QVector<qreal> pattern = pen.dashPattern();
|
|
|
|
|
+ const int patternSize = qMin(pattern.size(), 32);
|
|
|
|
|
+ for (int i = 0; i < patternSize; i++)
|
|
|
|
|
+ patternLength += qMax(pattern.at(i), qreal(0));
|
|
|
|
|
+ patternLength *= pw;
|
|
|
|
|
+ if (qFuzzyIsNull(patternLength)) {
|
|
|
|
|
+ pen.setStyle(Qt::NoPen);
|
|
|
|
|
+ } else if (extent / patternLength > 10000) {
|
|
|
|
|
+ // approximate stream of tiny dashes with semi-transparent solid line
|
|
|
|
|
+ pen.setStyle(Qt::SolidLine);
|
|
|
|
|
+ QColor color(pen.color());
|
|
|
|
|
+ color.setAlpha(color.alpha() / 2);
|
|
|
|
|
+ pen.setColor(color);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
if (!qpen_fast_equals(pen, d->strokerPen)) {
|
|
|
|
|
d->strokerPen = pen;
|
|
|
|
|
d->stroker.setJoinStyle(pen.joinStyle());
|
|
|
|
|
@@ -430,14 +462,8 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- if (pen.style() > Qt::SolidLine) {
|
|
|
|
|
- if (qt_pen_is_cosmetic(pen, state()->renderHints)){
|
|
|
|
|
- d->activeStroker->setClipRect(d->exDeviceRect);
|
|
|
|
|
- } else {
|
|
|
|
|
- QRectF clipRect = state()->matrix.inverted().mapRect(QRectF(d->exDeviceRect));
|
|
|
|
|
- d->activeStroker->setClipRect(clipRect);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
+ if (!clipRect.isNull())
|
|
|
|
|
+ d->activeStroker->setClipRect(clipRect);
|
|
|
|
|
|
|
|
|
|
if (d->activeStroker == &d->stroker)
|
|
|
|
|
d->stroker.setForceOpen(path.hasExplicitOpen());
|
|
|
|
|
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
|
|
|
|
|
index 01e581d2ed..254abf88c0 100644
|
|
|
|
|
--- a/src/gui/painting/qpen.cpp
|
|
|
|
@@ -75961,6 +76356,28 @@ index 0d87a2135d..053be89959 100644
|
|
|
|
|
const QVariant data = doc->resource(QTextDocument::ImageResource, url);
|
|
|
|
|
if (data.userType() == QMetaType::QImage) {
|
|
|
|
|
image = qvariant_cast<QImage>(data);
|
|
|
|
|
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
|
|
|
|
|
index 155ec43c50..b3ec43702c 100644
|
|
|
|
|
--- a/src/gui/text/qtextodfwriter.cpp
|
|
|
|
|
+++ b/src/gui/text/qtextodfwriter.cpp
|
|
|
|
|
@@ -455,7 +455,7 @@ void QTextOdfWriter::writeInlineCharacter(QXmlStreamWriter &writer, const QTextF
|
|
|
|
|
name.prepend(QLatin1String("qrc"));
|
|
|
|
|
QUrl url = QUrl(name);
|
|
|
|
|
const QVariant variant = m_document->resource(QTextDocument::ImageResource, url);
|
|
|
|
|
- if (variant.userType() == QMetaType::QImage) {
|
|
|
|
|
+ if (variant.userType() == QMetaType::QPixmap || variant.userType() == QMetaType::QImage) {
|
|
|
|
|
image = qvariant_cast<QImage>(variant);
|
|
|
|
|
} else if (variant.userType() == QMetaType::QByteArray) {
|
|
|
|
|
data = variant.toByteArray();
|
|
|
|
|
@@ -476,7 +476,7 @@ void QTextOdfWriter::writeInlineCharacter(QXmlStreamWriter &writer, const QTextF
|
|
|
|
|
QBuffer imageBytes;
|
|
|
|
|
|
|
|
|
|
int imgQuality = imageFormat.quality();
|
|
|
|
|
- if (imgQuality >= 100 || imgQuality < 0 || image.hasAlphaChannel()) {
|
|
|
|
|
+ if (imgQuality >= 100 || imgQuality <= 0 || image.hasAlphaChannel()) {
|
|
|
|
|
QImageWriter imageWriter(&imageBytes, "png");
|
|
|
|
|
imageWriter.write(image);
|
|
|
|
|
|
|
|
|
|
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
|
|
|
|
|
index 39f26d5d42..125b97a382 100644
|
|
|
|
|
--- a/src/gui/text/qtexttable.cpp
|
|
|
|
@@ -76469,6 +76886,23 @@ index f91709690a..c956ce3c2b 100644
|
|
|
|
|
// Can happen if called through QSslSocket::abort->QSslSocket::close->QSslSocket::flush->here
|
|
|
|
|
if (plainSocket->state() == QAbstractSocket::SocketState::UnconnectedState)
|
|
|
|
|
return;
|
|
|
|
|
diff --git a/src/platformsupport/eglconvenience/qt_egl_p.h b/src/platformsupport/eglconvenience/qt_egl_p.h
|
|
|
|
|
index bf37d07fd8..dbd42fb799 100644
|
|
|
|
|
--- a/src/platformsupport/eglconvenience/qt_egl_p.h
|
|
|
|
|
+++ b/src/platformsupport/eglconvenience/qt_egl_p.h
|
|
|
|
|
@@ -61,7 +61,11 @@
|
|
|
|
|
# if !defined(Q_OS_INTEGRITY)
|
|
|
|
|
# define WIN_INTERFACE_CUSTOM // NV
|
|
|
|
|
# endif // Q_OS_INTEGRITY
|
|
|
|
|
-#endif // QT_EGL_NO_X11
|
|
|
|
|
+#else // QT_EGL_NO_X11
|
|
|
|
|
+// If one has an eglplatform.h with https://github.com/KhronosGroup/EGL-Registry/pull/130
|
|
|
|
|
+// that needs USE_X11 to be defined.
|
|
|
|
|
+# define USE_X11
|
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
#ifdef QT_EGL_WAYLAND
|
|
|
|
|
# define WAYLAND // NV
|
|
|
|
|
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
|
|
|
|
|
index bf986aab77..69750bdbb0 100644
|
|
|
|
|
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
|
|
|
|
@@ -77487,7 +77921,7 @@ index 6814dbd844..fa708fbf26 100644
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp
|
|
|
|
|
index fe9ddfece7..0a4d675606 100644
|
|
|
|
|
index fe9ddfece7..dabdfcb6c5 100644
|
|
|
|
|
--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
|
|
|
|
|
+++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
|
|
|
|
|
@@ -781,6 +781,12 @@ xcb_generic_event_t *QXcbClipboard::waitForClipboardEvent(xcb_window_t window, i
|
|
|
|
@@ -77512,6 +77946,29 @@ index fe9ddfece7..0a4d675606 100644
|
|
|
|
|
} while (timer.elapsed() < clipboard_timeout);
|
|
|
|
|
|
|
|
|
|
return nullptr;
|
|
|
|
|
@@ -829,6 +835,8 @@ QByteArray QXcbClipboard::clipboardReadIncrementalProperty(xcb_window_t win, xcb
|
|
|
|
|
alloc_error = buf.size() != nbytes+1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+ QElapsedTimer timer;
|
|
|
|
|
+ timer.start();
|
|
|
|
|
for (;;) {
|
|
|
|
|
connection()->flush();
|
|
|
|
|
xcb_generic_event_t *ge = waitForClipboardEvent(win, XCB_PROPERTY_NOTIFY);
|
|
|
|
|
@@ -864,9 +872,11 @@ QByteArray QXcbClipboard::clipboardReadIncrementalProperty(xcb_window_t win, xcb
|
|
|
|
|
tmp_buf.resize(0);
|
|
|
|
|
offset += length;
|
|
|
|
|
}
|
|
|
|
|
- } else {
|
|
|
|
|
- break;
|
|
|
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ const auto elapsed = timer.elapsed();
|
|
|
|
|
+ if (elapsed > clipboard_timeout)
|
|
|
|
|
+ break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// timed out ... create a new requestor window, otherwise the requestor
|
|
|
|
|
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
|
|
|
|
|
index c557109bd1..9abdae6a7c 100644
|
|
|
|
|
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
|
|
|
|
@@ -77638,6 +78095,156 @@ index 9e7e1a5572..f0866a90ac 100644
|
|
|
|
|
// Default to client leader if there is no transient parent, else modal dialogs can
|
|
|
|
|
// be hidden by their parents.
|
|
|
|
|
if (!transientXcbParent)
|
|
|
|
|
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
|
|
|
|
|
index c4dc2da623..e6a3375b2b 100644
|
|
|
|
|
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
|
|
|
|
|
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
|
|
|
|
|
@@ -302,6 +302,7 @@ void QXdgDesktopPortalFileDialog::openPortal()
|
|
|
|
|
this,
|
|
|
|
|
SLOT(gotResponse(uint,QVariantMap)));
|
|
|
|
|
}
|
|
|
|
|
+ watcher->deleteLater();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
|
|
|
|
|
index fb324afbd8..2fc3167fd5 100644
|
|
|
|
|
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
|
|
|
|
|
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
|
|
|
|
|
@@ -111,6 +111,7 @@ QXdgDesktopPortalTheme::QXdgDesktopPortalTheme()
|
|
|
|
|
if (reply.isValid()) {
|
|
|
|
|
d->fileChooserPortalVersion = reply.value().toUInt();
|
|
|
|
|
}
|
|
|
|
|
+ watcher->deleteLater();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
|
|
|
|
|
index a641935dc5..ceee4a3a59 100644
|
|
|
|
|
--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
|
|
|
|
|
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
|
|
|
|
|
@@ -158,6 +158,20 @@ static inline QVariant qDateTimeFromString(QString &val)
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+// check if this client and server version of MySQL/MariaDB support prepared statements
|
|
|
|
|
+static inline bool checkPreparedQueries(MYSQL *mysql)
|
|
|
|
|
+{
|
|
|
|
|
+ std::unique_ptr<MYSQL_STMT, decltype(&mysql_stmt_close)> stmt(mysql_stmt_init(mysql), &mysql_stmt_close);
|
|
|
|
|
+ if (!stmt)
|
|
|
|
|
+ return false;
|
|
|
|
|
+
|
|
|
|
|
+ static const char dummyQuery[] = "SELECT ? + ?";
|
|
|
|
|
+ if (mysql_stmt_prepare(stmt.get(), dummyQuery, sizeof(dummyQuery) - 1))
|
|
|
|
|
+ return false;
|
|
|
|
|
+
|
|
|
|
|
+ return mysql_stmt_param_count(stmt.get()) == 2;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
class QMYSQLResultPrivate;
|
|
|
|
|
|
|
|
|
|
class QMYSQLResult : public QSqlResult
|
|
|
|
|
@@ -209,7 +223,7 @@ public:
|
|
|
|
|
struct QMyField
|
|
|
|
|
{
|
|
|
|
|
char *outField = nullptr;
|
|
|
|
|
- MYSQL_FIELD *myField = nullptr;
|
|
|
|
|
+ const MYSQL_FIELD *myField = nullptr;
|
|
|
|
|
QMetaType::Type type = QMetaType::UnknownType;
|
|
|
|
|
my_bool nullIndicator = false;
|
|
|
|
|
ulong bufLength = 0ul;
|
|
|
|
|
@@ -347,7 +361,7 @@ static bool qIsInteger(int t)
|
|
|
|
|
void QMYSQLResultPrivate::bindBlobs()
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
- MYSQL_FIELD *fieldInfo;
|
|
|
|
|
+ const MYSQL_FIELD *fieldInfo;
|
|
|
|
|
MYSQL_BIND *bind;
|
|
|
|
|
|
|
|
|
|
for(i = 0; i < fields.count(); ++i) {
|
|
|
|
|
@@ -378,35 +392,34 @@ bool QMYSQLResultPrivate::bindInValues()
|
|
|
|
|
inBinds = new MYSQL_BIND[fields.size()];
|
|
|
|
|
memset(inBinds, 0, fields.size() * sizeof(MYSQL_BIND));
|
|
|
|
|
|
|
|
|
|
- MYSQL_FIELD *fieldInfo;
|
|
|
|
|
+ const MYSQL_FIELD *fieldInfo;
|
|
|
|
|
|
|
|
|
|
while((fieldInfo = mysql_fetch_field(meta))) {
|
|
|
|
|
+ bind = &inBinds[i];
|
|
|
|
|
+
|
|
|
|
|
QMyField &f = fields[i];
|
|
|
|
|
f.myField = fieldInfo;
|
|
|
|
|
-
|
|
|
|
|
+ bind->buffer_length = f.bufLength = fieldInfo->length + 1;
|
|
|
|
|
+ bind->buffer_type = fieldInfo->type;
|
|
|
|
|
f.type = qDecodeMYSQLType(fieldInfo->type, fieldInfo->flags);
|
|
|
|
|
if (qIsBlob(fieldInfo->type)) {
|
|
|
|
|
// the size of a blob-field is available as soon as we call
|
|
|
|
|
// mysql_stmt_store_result()
|
|
|
|
|
// after mysql_stmt_exec() in QMYSQLResult::exec()
|
|
|
|
|
- fieldInfo->length = 0;
|
|
|
|
|
+ bind->buffer_length = f.bufLength = 0;
|
|
|
|
|
hasBlobs = true;
|
|
|
|
|
} else if (qIsInteger(f.type)) {
|
|
|
|
|
- fieldInfo->length = 8;
|
|
|
|
|
+ bind->buffer_length = f.bufLength = 8;
|
|
|
|
|
} else {
|
|
|
|
|
- fieldInfo->type = MYSQL_TYPE_STRING;
|
|
|
|
|
+ bind->buffer_type = MYSQL_TYPE_STRING;
|
|
|
|
|
}
|
|
|
|
|
- bind = &inBinds[i];
|
|
|
|
|
- field = new char[fieldInfo->length + 1];
|
|
|
|
|
- memset(field, 0, fieldInfo->length + 1);
|
|
|
|
|
|
|
|
|
|
- bind->buffer_type = fieldInfo->type;
|
|
|
|
|
- bind->buffer = field;
|
|
|
|
|
- bind->buffer_length = f.bufLength = fieldInfo->length + 1;
|
|
|
|
|
bind->is_null = &f.nullIndicator;
|
|
|
|
|
bind->length = &f.bufLength;
|
|
|
|
|
bind->is_unsigned = fieldInfo->flags & UNSIGNED_FLAG ? 1 : 0;
|
|
|
|
|
- f.outField=field;
|
|
|
|
|
+
|
|
|
|
|
+ char *field = new char[bind->buffer_length + 1]{};
|
|
|
|
|
+ bind->buffer = f.outField = field;
|
|
|
|
|
|
|
|
|
|
++i;
|
|
|
|
|
}
|
|
|
|
|
@@ -1355,24 +1368,23 @@ bool QMYSQLDriver::open(const QString& db,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if MYSQL_VERSION_ID >= 50007
|
|
|
|
|
- if (mysql_get_client_version() >= 50503 && mysql_get_server_version(d->mysql) >= 50503) {
|
|
|
|
|
- // force the communication to be utf8mb4 (only utf8mb4 supports 4-byte characters)
|
|
|
|
|
- mysql_set_character_set(d->mysql, "utf8mb4");
|
|
|
|
|
+ // force the communication to be utf8mb4 (only utf8mb4 supports 4-byte characters)
|
|
|
|
|
+ if (mysql_set_character_set(d->mysql, "utf8mb4")) {
|
|
|
|
|
+ // this failed, try forcing it to utf (BMP only)
|
|
|
|
|
+ if (mysql_set_character_set(d->mysql, "utf8"))
|
|
|
|
|
+ qWarning() << "MySQL: Unable to set the client character set to utf8.";
|
|
|
|
|
#if QT_CONFIG(textcodec)
|
|
|
|
|
- d->tc = QTextCodec::codecForName("UTF-8");
|
|
|
|
|
+ else
|
|
|
|
|
+ d->tc = codec(d->mysql);
|
|
|
|
|
#endif
|
|
|
|
|
- } else
|
|
|
|
|
- {
|
|
|
|
|
- // force the communication to be utf8
|
|
|
|
|
- mysql_set_character_set(d->mysql, "utf8");
|
|
|
|
|
+ }
|
|
|
|
|
#if QT_CONFIG(textcodec)
|
|
|
|
|
- d->tc = codec(d->mysql);
|
|
|
|
|
+ else
|
|
|
|
|
+ d->tc = QTextCodec::codecForName("UTF-8");
|
|
|
|
|
#endif
|
|
|
|
|
- }
|
|
|
|
|
#endif // MYSQL_VERSION_ID >= 50007
|
|
|
|
|
|
|
|
|
|
- d->preparedQuerysEnabled = mysql_get_client_version() >= 40108
|
|
|
|
|
- && mysql_get_server_version(d->mysql) >= 40100;
|
|
|
|
|
+ d->preparedQuerysEnabled = checkPreparedQueries(d->mysql);
|
|
|
|
|
|
|
|
|
|
#if QT_CONFIG(thread)
|
|
|
|
|
mysql_thread_init();
|
|
|
|
|
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
|
|
|
|
|
index d1febd81d4..67c045e8bd 100644
|
|
|
|
|
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
|
|
|
|
@@ -79616,18 +80223,9 @@ index c409494786..6ff6995440 100644
|
|
|
|
|
const QLocale bra("pt_BR");
|
|
|
|
|
QCOMPARE(bra.timeFormat(QLocale::ShortFormat), QLatin1String("HH:mm"));
|
|
|
|
|
diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp
|
|
|
|
|
index e8e578ac25..8f53824050 100644
|
|
|
|
|
index e8e578ac25..4c4a8f0416 100644
|
|
|
|
|
--- a/tests/auto/corelib/text/qstring/tst_qstring.cpp
|
|
|
|
|
+++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp
|
|
|
|
|
@@ -1674,7 +1674,7 @@ void tst_QString::lastIndexOf()
|
|
|
|
|
QCOMPARE(haystack.lastIndexOf(needle.toLatin1(), from, cs), expected);
|
|
|
|
|
QCOMPARE(haystack.lastIndexOf(needle.toLatin1().data(), from, cs), expected);
|
|
|
|
|
|
|
|
|
|
- if (from >= -1 && from < haystack.size()) {
|
|
|
|
|
+ if (from >= -1 && from < haystack.size() && needle.size() > 0) {
|
|
|
|
|
// unfortunately, QString and QRegExp don't have the same out of bound semantics
|
|
|
|
|
// I think QString is wrong -- See file log for contact information.
|
|
|
|
|
{
|
|
|
|
|
@@ -1765,6 +1765,7 @@ void tst_QString::count()
|
|
|
|
|
QCOMPARE(a.count( "", Qt::CaseInsensitive), 16);
|
|
|
|
|
QCOMPARE(a.count(QRegExp("[FG][HI]")),1);
|
|
|
|
@@ -79940,6 +80538,55 @@ index 37ad98b157..db7e261243 100644
|
|
|
|
|
-[childWindowPositioning:show]
|
|
|
|
|
-# QTBUG-69156
|
|
|
|
|
-android
|
|
|
|
|
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
|
|
|
|
|
index 42e98ce363..d7c3f95f1d 100644
|
|
|
|
|
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
|
|
|
|
|
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
|
|
|
|
|
@@ -308,6 +308,7 @@ private slots:
|
|
|
|
|
void fillPolygon();
|
|
|
|
|
|
|
|
|
|
void drawImageAtPointF();
|
|
|
|
|
+ void scaledDashes();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void fillData();
|
|
|
|
|
@@ -5468,6 +5469,36 @@ void tst_QPainter::drawImageAtPointF()
|
|
|
|
|
paint.end();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+void tst_QPainter::scaledDashes()
|
|
|
|
|
+{
|
|
|
|
|
+ // Test that we do not hit the limit-huge-number-of-dashes path
|
|
|
|
|
+ QRgb fore = qRgb(0, 0, 0xff);
|
|
|
|
|
+ QRgb back = qRgb(0xff, 0xff, 0);
|
|
|
|
|
+ QImage image(5, 32, QImage::Format_RGB32);
|
|
|
|
|
+ image.fill(back);
|
|
|
|
|
+ QPainter p(&image);
|
|
|
|
|
+ QPen pen(QColor(fore), 3, Qt::DotLine);
|
|
|
|
|
+ p.setPen(pen);
|
|
|
|
|
+ p.scale(1, 2);
|
|
|
|
|
+ p.drawLine(2, 0, 2, 16);
|
|
|
|
|
+ p.end();
|
|
|
|
|
+
|
|
|
|
|
+ bool foreFound = false;
|
|
|
|
|
+ bool backFound = false;
|
|
|
|
|
+ int i = 0;
|
|
|
|
|
+ while (i < 32 && (!foreFound || !backFound)) {
|
|
|
|
|
+ QRgb pix = image.pixel(3, i);
|
|
|
|
|
+ if (pix == fore)
|
|
|
|
|
+ foreFound = true;
|
|
|
|
|
+ else if (pix == back)
|
|
|
|
|
+ backFound = true;
|
|
|
|
|
+ i++;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ QVERIFY(foreFound);
|
|
|
|
|
+ QVERIFY(backFound);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
QTEST_MAIN(tst_QPainter)
|
|
|
|
|
|
|
|
|
|
#include "tst_qpainter.moc"
|
|
|
|
|
diff --git a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
|
|
|
|
|
index f31e2bf41b..48e4f4c9c0 100644
|
|
|
|
|
--- a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
|
|
|
|
@@ -81103,6 +81750,46 @@ index 169e9bce83..c9a4474c4c 100644
|
|
|
|
|
qtConfig(private_tests) {
|
|
|
|
|
SUBDIRS += \
|
|
|
|
|
qsslsocket \
|
|
|
|
|
diff --git a/tests/auto/other/lancelot/scripts/tinydashes.qps b/tests/auto/other/lancelot/scripts/tinydashes.qps
|
|
|
|
|
new file mode 100644
|
|
|
|
|
index 0000000000..d41ced7f5f
|
|
|
|
|
--- /dev/null
|
|
|
|
|
+++ b/tests/auto/other/lancelot/scripts/tinydashes.qps
|
|
|
|
|
@@ -0,0 +1,34 @@
|
|
|
|
|
+# Version: 1
|
|
|
|
|
+# CheckVsReference: 5%
|
|
|
|
|
+
|
|
|
|
|
+path_addEllipse mypath 20.0 20.0 200.0 200.0
|
|
|
|
|
+
|
|
|
|
|
+save
|
|
|
|
|
+setPen blue 20 SolidLine FlatCap
|
|
|
|
|
+pen_setCosmetic true
|
|
|
|
|
+pen_setDashPattern [ 0.0004 0.0004 ]
|
|
|
|
|
+setBrush yellow
|
|
|
|
|
+
|
|
|
|
|
+drawPath mypath
|
|
|
|
|
+translate 300 0
|
|
|
|
|
+setRenderHint Antialiasing true
|
|
|
|
|
+drawPath mypath
|
|
|
|
|
+restore
|
|
|
|
|
+
|
|
|
|
|
+path_addEllipse bigpath 200000.0 200000.0 2000000.0 2000000.0
|
|
|
|
|
+
|
|
|
|
|
+setPen blue 20 DotLine FlatCap
|
|
|
|
|
+setBrush yellow
|
|
|
|
|
+
|
|
|
|
|
+save
|
|
|
|
|
+translate 0 300
|
|
|
|
|
+scale 0.0001 0.00011
|
|
|
|
|
+drawPath bigpath
|
|
|
|
|
+restore
|
|
|
|
|
+
|
|
|
|
|
+save
|
|
|
|
|
+translate 300 300
|
|
|
|
|
+setRenderHint Antialiasing true
|
|
|
|
|
+scale 0.0001 0.00011
|
|
|
|
|
+drawPath bigpath
|
|
|
|
|
+restore
|
|
|
|
|
diff --git a/tests/auto/other/networkselftest/networkselftest.pro b/tests/auto/other/networkselftest/networkselftest.pro
|
|
|
|
|
index 7c307a097b..ea81b10f8c 100644
|
|
|
|
|
--- a/tests/auto/other/networkselftest/networkselftest.pro
|
|
|
|
@@ -82421,6 +83108,9 @@ index f2fa438330..ecd2c4d908 100644
|
|
|
|
|
case Qt::Key_Up:
|
|
|
|
|
off.setY(-4);
|
|
|
|
|
break;
|
|
|
|
|
diff --git a/tests/manual/rhi/cubemap_render/buildshader.bat b/tests/manual/rhi/cubemap_render/buildshader.bat
|
|
|
|
|
old mode 100755
|
|
|
|
|
new mode 100644
|
|
|
|
|
diff --git a/tests/testserver/apache2/testdata/main.conf b/tests/testserver/apache2/testdata/main.conf
|
|
|
|
|
index f3b13bb571..ed9aae3fbd 100644
|
|
|
|
|
--- a/tests/testserver/apache2/testdata/main.conf
|
|
|
|
|