summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/features/configure_base.prf20
-rw-r--r--mkspecs/features/create_cmake.prf4
-rw-r--r--mkspecs/features/qt_configure.prf24
-rw-r--r--src/corelib/tools/qlocale_p.h14
-rw-r--r--src/gui/configure.json2
-rw-r--r--src/gui/util/qshadergenerator.cpp4
-rw-r--r--src/gui/util/qshaderlanguage_p.h1
-rw-r--r--src/plugins/platforms/ios/quiview.mm2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp2
-rw-r--r--src/plugins/sqldrivers/mysql/qsql_mysql.cpp4
-rw-r--r--src/widgets/widgets/qmainwindowlayout.cpp5
-rw-r--r--src/widgets/widgets/qsplitter.cpp4
-rw-r--r--tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp1
-rw-r--r--tests/auto/gui/util/qshadergenerator/tst_qshadergenerator.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp3
15 files changed, 72 insertions, 22 deletions
diff --git a/mkspecs/features/configure_base.prf b/mkspecs/features/configure_base.prf
index e870e2ee10..73e0273f18 100644
--- a/mkspecs/features/configure_base.prf
+++ b/mkspecs/features/configure_base.prf
@@ -23,9 +23,29 @@ QMAKE_MAKE_NAME = $$basename(QMAKE_MAKE)
# Make sure we don't inherit MAKEFLAGS - -i in particular is fatal.
QMAKE_MAKE = "$${SETENV_PFX}MAKEFLAGS=$$SETENV_SFX $$QMAKE_MAKE"
+QMAKE_PERSIST_LOG = false
+QMAKE_PERSISTED_LOG =
+
defineTest(qtLog) {
write_file($$QMAKE_CONFIG_LOG, 1, append)
$$QMAKE_CONFIG_VERBOSE: for (l, 1): log("$$l$$escape_expand(\\n)")
+ $$QMAKE_PERSIST_LOG {
+ QMAKE_PERSISTED_LOG += $$1
+ export(QMAKE_PERSISTED_LOG)
+ }
+}
+
+defineTest(qtPersistLog) {
+ QMAKE_PERSIST_LOG = true
+ QMAKE_PERSISTED_LOG =
+ export(QMAKE_PERSIST_LOG)
+ export(QMAKE_PERSISTED_LOG)
+}
+
+defineReplace(qtPersistedLog) {
+ QMAKE_PERSIST_LOG = false
+ export(QMAKE_PERSIST_LOG)
+ return($$QMAKE_PERSISTED_LOG)
}
defineTest(qtRunLoggedCommand) {
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index bb5083c925..66acedef55 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -53,7 +53,9 @@ contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
}
-!exists($$first(QT.$${MODULE}_private.includes)): CMAKE_NO_PRIVATE_INCLUDES = true
+isEmpty(QT.$${MODULE}_private.includes)| \
+ !exists($$first(QT.$${MODULE}_private.includes)): \
+ CMAKE_NO_PRIVATE_INCLUDES = true
CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 98fff59ea1..6e29eaa2b7 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -710,13 +710,14 @@ defineTest(qtConfHandleLibrary) {
}
use_args = $$eval($${lpfx}.literal_args)
- qtConfLoadResult($${lpfx}, $$1) {
+ qtConfLoadResult($${lpfx}, $$1, "library") {
$$eval($${lpfx}.result): \
qtConfExportLibrary($$1)
return()
}
qtLogTestIntro($${lpfx}, "looking for library $${1}")
+ qtPersistLog()
result = false
for (s, $${lpfx}.sources._KEYS_) {
@@ -768,6 +769,9 @@ defineTest(qtConfHandleLibrary) {
break()
}
+ $${lpfx}.msgs = $$qtPersistedLog()
+ export($${lpfx}.msgs)
+
qtLogTestResult($${lpfx}, $$result)
$${lpfx}.result = $$result
@@ -1023,7 +1027,7 @@ defineTest(qtLogTestIntro) {
label = $$eval($${1}.label)
isEmpty(label): return()
- log("Checking for $${label}... ")
+ isEmpty(3): log("Checking for $${label}... ")
$$QMAKE_CONFIG_VERBOSE: log("$$escape_expand(\\n)")
write_file($$QMAKE_CONFIG_LOG, 2, append)
}
@@ -1043,14 +1047,14 @@ defineTest(qtLogTestResult) {
msg = "test $$1 FAILED"
}
$$QMAKE_CONFIG_VERBOSE: log_msg = $$msg
- logn("$$log_msg")
+ isEmpty(3): logn("$$log_msg")
write_file($$QMAKE_CONFIG_LOG, msg, append)
}
defineTest(qtConfSaveResult) {
equals($${1}.cache, -): \
return()
- keys = result $$eval($${1}.cache)
+ keys = result msgs $$eval($${1}.cache)
cont = "cache.$${2}._KEYS_ = $$keys"
cache.$${2}._KEYS_ = $$keys
export(cache.$${2}._KEYS_)
@@ -1073,6 +1077,12 @@ defineTest(qtConfLoadResult) {
$${1}.$${k} = $$eval(cache.$${2}.$${k})
export($${1}.$${k})
}
+ # we could print the cached result, but that's basically just noise -
+ # the explicitly generated summary is supposed to contain all relevant
+ # information.
+ qtLogTestIntro($$1, "loaded result for $$3 $$1", false)
+ qtLog($$eval($${1}.msgs))
+ qtLogTestResult($$1, $$eval($${1}.result), false)
return(true)
}
@@ -1153,14 +1163,18 @@ defineTest(qtRunSingleTest) {
# note: we do this only after resolving the dependencies and the
# preparation (which may resolve libraries), so that caching does
# not alter the execution order (and thus the output).
- qtConfLoadResult($${tpfx}, $$1): \
+ qtConfLoadResult($${tpfx}, $$1, "config test"): \
return()
qtLogTestIntro($${tpfx}, "executing config test $${1}")
+ qtPersistLog()
result = false
$${call}($${tpfx}): result = true
+ $${tpfx}.msgs = $$qtPersistedLog()
+ export($${tpfx}.msgs)
+
qtLogTestResult($${tpfx}, $$result)
$${tpfx}.result = $$result
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index 7eb8b7372c..6669ae7c8b 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -419,15 +419,15 @@ QString qt_readEscapedFormatString(QStringView format, int *idx);
bool qt_splitLocaleName(const QString &name, QString &lang, QString &script, QString &cntry);
int qt_repeatCount(QStringView s);
-enum { AsciiSpaceMask = (1 << (' ' - 1)) |
- (1 << ('\t' - 1)) | // 9: HT - horizontal tab
- (1 << ('\n' - 1)) | // 10: LF - line feed
- (1 << ('\v' - 1)) | // 11: VT - vertical tab
- (1 << ('\f' - 1)) | // 12: FF - form feed
- (1 << ('\r' - 1)) }; // 13: CR - carriage return
+enum { AsciiSpaceMask = (1u << (' ' - 1)) |
+ (1u << ('\t' - 1)) | // 9: HT - horizontal tab
+ (1u << ('\n' - 1)) | // 10: LF - line feed
+ (1u << ('\v' - 1)) | // 11: VT - vertical tab
+ (1u << ('\f' - 1)) | // 12: FF - form feed
+ (1u << ('\r' - 1)) }; // 13: CR - carriage return
Q_DECL_CONSTEXPR inline bool ascii_isspace(uchar c)
{
- return c >= 1U && c <= 32U && (uint(AsciiSpaceMask) >> uint(c - 1)) & 1U;
+ return c >= 1u && c <= 32u && (AsciiSpaceMask >> uint(c - 1)) & 1u;
}
#if defined(Q_COMPILER_CONSTEXPR)
diff --git a/src/gui/configure.json b/src/gui/configure.json
index 40a91d261b..04e42fc247 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -1282,7 +1282,7 @@
"label": "XCB",
"section": "Platform plugins",
"autoDetect": "!config.darwin",
- "enable": "input.xcb == 'system' || input.xcb == 'qt'",
+ "enable": "input.xcb == 'system' || input.xcb == 'qt' || input.xcb == 'yes'",
"condition": "libs.xcb",
"output": [ "privateFeature" ]
},
diff --git a/src/gui/util/qshadergenerator.cpp b/src/gui/util/qshadergenerator.cpp
index 31c2f74746..ae45c03fd1 100644
--- a/src/gui/util/qshadergenerator.cpp
+++ b/src/gui/util/qshadergenerator.cpp
@@ -61,6 +61,8 @@ namespace
return ""; // Although fragment shaders for <=2 only have fixed outputs
case QShaderLanguage::Uniform:
return "uniform";
+ case QShaderLanguage::BuiltIn:
+ return "//";
}
} else {
switch (qualifier) {
@@ -72,6 +74,8 @@ namespace
return "out";
case QShaderLanguage::Uniform:
return "uniform";
+ case QShaderLanguage::BuiltIn:
+ return "//";
}
}
diff --git a/src/gui/util/qshaderlanguage_p.h b/src/gui/util/qshaderlanguage_p.h
index 5c7819a3b8..e392a6c7bb 100644
--- a/src/gui/util/qshaderlanguage_p.h
+++ b/src/gui/util/qshaderlanguage_p.h
@@ -64,6 +64,7 @@ namespace QShaderLanguage
enum StorageQualifier : char {
Const = 1,
Input,
+ BuiltIn,
Output,
Uniform
};
diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm
index 53a4485609..fc327d3a95 100644
--- a/src/plugins/platforms/ios/quiview.mm
+++ b/src/plugins/platforms/ios/quiview.mm
@@ -445,7 +445,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
}
if (m_activeTouches.isEmpty())
return;
- QWindowSystemInterface::handleTouchEvent<QWindowSystemInterface::SynchronousDelivery>(self.platformWindow->window(), timeStamp, iosIntegration->touchDevice(), m_activeTouches.values());
+
if (!static_cast<QUIWindow *>(self.window).sendingEvent) {
// The event is likely delivered as part of delayed touch delivery, via
// _UIGestureEnvironmentSortAndSendDelayedTouches, due to one of the two
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
index d37eb572a6..baf3dbd42a 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -639,6 +639,8 @@ QFunctionPointer QGLXContext::getProcAddress(const char *procName)
extern const QString qt_gl_library_name();
// QLibrary lib(qt_gl_library_name());
QLibrary lib(QLatin1String("GL"));
+ if (!lib.load())
+ lib.setFileNameAndVersion(QLatin1String("GL"), 1);
glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
#endif
}
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
index 53a72779a9..18c8b48462 100644
--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
@@ -1160,14 +1160,14 @@ static void qLibraryInit()
# endif // MYSQL_VERSION_ID
#endif // Q_NO_MYSQL_EMBEDDED
-#ifdef MARIADB_BASE_VERSION
+#if defined(MARIADB_BASE_VERSION) || defined(MARIADB_VERSION_ID)
qAddPostRoutine([]() { mysql_server_end(); });
#endif
}
static void qLibraryEnd()
{
-#if !defined(MARIADB_BASE_VERSION)
+#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID)
# if !defined(Q_NO_MYSQL_EMBEDDED)
# if MYSQL_VERSION_ID > 40000
# if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003
diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp
index 9b38da340c..9cf2e7de1f 100644
--- a/src/widgets/widgets/qmainwindowlayout.cpp
+++ b/src/widgets/widgets/qmainwindowlayout.cpp
@@ -68,6 +68,7 @@
#include <qstack.h>
#include <qmap.h>
#include <qtimer.h>
+#include <qpointer.h>
#ifndef QT_NO_DEBUG_STREAM
# include <qdebug.h>
@@ -1654,7 +1655,7 @@ void QMainWindowLayout::keepSize(QDockWidget *w)
class QMainWindowTabBar : public QTabBar
{
QMainWindow *mainWindow;
- QDockWidget *draggingDock; // Currently dragging (detached) dock widget
+ QPointer<QDockWidget> draggingDock; // Currently dragging (detached) dock widget
public:
QMainWindowTabBar(QMainWindow *parent);
protected:
@@ -1665,7 +1666,7 @@ protected:
};
QMainWindowTabBar::QMainWindowTabBar(QMainWindow *parent)
- : QTabBar(parent), mainWindow(parent), draggingDock(0)
+ : QTabBar(parent), mainWindow(parent)
{
setExpanding(false);
}
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp
index 5220cae5f2..aa05a44b8b 100644
--- a/src/widgets/widgets/qsplitter.cpp
+++ b/src/widgets/widgets/qsplitter.cpp
@@ -1198,8 +1198,8 @@ QWidget *QSplitter::replaceWidget(int index, QWidget *widget)
/*!
\fn int QSplitter::indexOf(QWidget *widget) const
- Returns the index in the splitter's layout of the specified \a widget. This
- also works for handles.
+ Returns the index in the splitter's layout of the specified \a widget,
+ or -1 if \a widget is not found. This also works for handles.
Handles are numbered from 0. There are as many handles as there
are child widgets, but the handle at position 0 is always hidden.
diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
index 109f5b77f6..482ed8d130 100644
--- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
@@ -586,7 +586,6 @@ void tst_QEventLoop::deliverInDefinedOrder()
}
}
- QTest::qWait(30);
for (int o = 0; o < NbObject; o++) {
QTRY_COMPARE(objects[o].count, int(NbEvent));
}
diff --git a/tests/auto/gui/util/qshadergenerator/tst_qshadergenerator.cpp b/tests/auto/gui/util/qshadergenerator/tst_qshadergenerator.cpp
index d0a0225055..82197f815e 100644
--- a/tests/auto/gui/util/qshadergenerator/tst_qshadergenerator.cpp
+++ b/tests/auto/gui/util/qshadergenerator/tst_qshadergenerator.cpp
@@ -372,6 +372,8 @@ namespace {
return "const";
case QShaderLanguage::Input:
return "varying";
+ case QShaderLanguage::BuiltIn:
+ return "//";
case QShaderLanguage::Output:
return ""; // Although fragment shaders for <=2 only have fixed outputs
case QShaderLanguage::Uniform:
@@ -383,6 +385,8 @@ namespace {
return "const";
case QShaderLanguage::Input:
return "in";
+ case QShaderLanguage::BuiltIn:
+ return "//";
case QShaderLanguage::Output:
return "out";
case QShaderLanguage::Uniform:
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
index e26da6b93e..e39110bb50 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
@@ -471,6 +471,9 @@ void tst_QFiledialog::completer()
for (int i = 0; i < 10; ++i) {
TemporaryFilePtr file(new QTemporaryFile(startPath + QStringLiteral("/rXXXXXX")));
QVERIFY2(file->open(), qPrintable(file->errorString()));
+ // Force the temporary file to materialize with the requested name
+ (void) file->fileName();
+ QVERIFY(file->exists());
files.append(file);
}
}