Merge branch 'bugfix/qt-5/closure-size-static-libs' into merge/qt-5.10.0

This commit is contained in:
Thomas Tuegel 2018-01-15 18:49:27 -06:00
commit 04239641b5
No known key found for this signature in database
GPG key ID: 22CBF5249D4B4D59
9 changed files with 110 additions and 217 deletions

View file

@ -12,7 +12,7 @@ index 5208379f9a..92fe29a0ac 100644
QMAKE_LFLAGS_REL_RPATH =
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index bb5083c925..da8e2cb386 100644
index bb5083c925..77034f9bb6 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -21,7 +21,7 @@ load(cmake_functions)
@ -48,7 +48,7 @@ index bb5083c925..da8e2cb386 100644
- # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
- CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../"
-}
+CMAKE_LIB_DIR = $$NIX_OUTPUT_DEV/lib/
+CMAKE_LIB_DIR = $$NIX_OUTPUT_OUT/lib/
+CMAKE_LIB_DIR_IS_ABSOLUTE = True
-CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
@ -77,7 +77,7 @@ index bb5083c925..da8e2cb386 100644
- CMAKE_DLL_DIR = $$CMAKE_LIB_DIR
- CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
-}
+CMAKE_DLL_DIR = $$NIX_OUTPUT_DEV/lib/
+CMAKE_DLL_DIR = $$NIX_OUTPUT_OUT/lib/
+CMAKE_DLL_DIR_IS_ABSOLUTE = True
static|staticlib:CMAKE_STATIC_TYPE = true
@ -432,13 +432,13 @@ index e645ba5803..a0e5c68b7e 100644
-
-QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
index 44636f2288..61ed486a76 100644
index 44636f2288..3b01424e67 100644
--- a/mkspecs/features/mac/default_pre.prf
+++ b/mkspecs/features/mac/default_pre.prf
@@ -1,56 +1,3 @@
@@ -1,56 +1,2 @@
CONFIG = asset_catalogs rez $$CONFIG
load(default_pre)
-
-isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
- # Get path of Xcode's Developer directory
- QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null")
@ -493,11 +493,11 @@ index 44636f2288..61ed486a76 100644
-# at build time, depending on the current Xcode SDK and configuration.
-QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index 3f6dc076ca..8b13789179 100644
index 3f6dc076ca..e69de29bb2 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -1,58 +1 @@
@@ -1,58 +0,0 @@
-
-isEmpty(QMAKE_MAC_SDK): \
- error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.")
-
@ -676,30 +676,18 @@ index 72dde61a40..f891a2baed 100644
INSTALLS += inst_qch_docs
diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf
index 668669e4cd..30f7fbac41 100644
index 668669e4cd..eb4840a0aa 100644
--- a/mkspecs/features/qt_example_installs.prf
+++ b/mkspecs/features/qt_example_installs.prf
@@ -77,13 +77,13 @@ for(extra, extras): \
# Just for Qt Creator
OTHER_FILES += $$sourcefiles
-sourcefiles += \
- $$_PRO_FILE_ $$RC_FILE $$DEF_FILE \
- $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
- $$DBUS_ADAPTORS $$DBUS_INTERFACES
-addInstallFiles(sources.files, $$sourcefiles)
@@ -82,7 +82,7 @@ sourcefiles += \
$$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
$$DBUS_ADAPTORS $$DBUS_INTERFACES
addInstallFiles(sources.files, $$sourcefiles)
-sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase
-INSTALLS += sources
+ sourcefiles += \
+ $$_PRO_FILE_ $$RC_FILE $$DEF_FILE \
+ $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
+ $$DBUS_ADAPTORS $$DBUS_INTERFACES
+ addInstallFiles(sources.files, $$sourcefiles)
+ sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase
+ INSTALLS += sources
+sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase
INSTALLS += sources
check_examples {
srcfiles = $$sources.files
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 1903e509c8..ae7b585989 100644
--- a/mkspecs/features/qt_functions.prf
@ -952,7 +940,7 @@ index 1d947159e2..b36865fc48 100644
set_target_properties(Qt5::qdbusxml2cpp PROPERTIES
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
index 07869efd7d..37b95d1b6b 100644
index 07869efd7d..fb4183bada 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -2,7 +2,7 @@
@ -976,7 +964,7 @@ index 07869efd7d..37b95d1b6b 100644
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ set(imported_implib \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ set(imported_implib \"$$NIX_OUTPUT_OUT/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ELSE
set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ENDIF
@ -1006,28 +994,6 @@ index 8d2cffc304..9730fb33f2 100644
if (!lib.load())
return false;
}
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index 341d3bccf2..3368234c26 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations()
QMacAutoReleasePool pool;
userProfiles.clear();
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
for (NSString *ifName in wifiInterfaces) {
CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate()
QMacAutoReleasePool pool;
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
for (NSString *ifName in wifiInterfaces) {
scanThread->interfaceName = QString::fromNSString(ifName);
scanThread->start();
diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
index b5a0a5bbeb..6c20305f4d 100644
--- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
@ -1082,41 +1048,6 @@ index da63360333..95e34e2e50 100644
xcursorFound = xcursorLib.load();
}
if (xcursorFound) {
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index d1f19f2..1ac2cf1 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1699,7 +1699,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
if (!m_drawContentBorderGradient) {
window.styleMask = window.styleMask & ~NSTexturedBackgroundWindowMask;
- [window.contentView.superview setNeedsDisplay:YES];
+ [[window.contentView superview] setNeedsDisplay:YES];
window.titlebarAppearsTransparent = NO;
return;
}
diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
index e846fa0..4171cd4 100644
--- a/src/plugins/platforms/cocoa/qnswindow.mm
+++ b/src/plugins/platforms/cocoa/qnswindow.mm
@@ -224,7 +224,7 @@ static bool isMouseEvent(NSEvent *ev)
if (pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
NSPoint loc = [theEvent locationInWindow];
NSRect windowFrame = [self convertRectFromScreen:self.frame];
- NSRect contentFrame = self.contentView.frame;
+ NSRect contentFrame = [self.contentView frame];
if (NSMouseInRect(loc, windowFrame, NO) && !NSMouseInRect(loc, contentFrame, NO))
[qnsview_cast(pw->view()) handleFrameStrutMouseEvent:theEvent];
}
@@ -253,7 +253,7 @@ static bool isMouseEvent(NSEvent *ev)
+ (void)applicationActivationChanged:(NSNotification*)notification
{
const id sender = self;
- NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
+ NSEnumerator *windowEnumerator = nullptr;
NSApplication *application = [NSApplication sharedApplication];
#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)
diff --git a/src/plugins/platformthemes/gtk3/main.cpp b/src/plugins/platformthemes/gtk3/main.cpp
index c4cd66c33b..b6f2691587 100644
--- a/src/plugins/platformthemes/gtk3/main.cpp
@ -1153,6 +1084,26 @@ index c4cd66c33b..b6f2691587 100644
return 0;
}
diff --git a/src/testlib/qtestassert.h b/src/testlib/qtestassert.h
index 6498ea84ef..d821ced7fc 100644
--- a/src/testlib/qtestassert.h
+++ b/src/testlib/qtestassert.h
@@ -44,10 +44,13 @@
QT_BEGIN_NAMESPACE
-
+#if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
+#define QTEST_ASSERT(cond) do { } while ((false) && (cond))
+#define QTEST_ASSERT_X(cond, where, what) do { } while ((false) && (cond))
+#else
#define QTEST_ASSERT(cond) do { if (!(cond)) qt_assert(#cond,__FILE__,__LINE__); } while (false)
-
#define QTEST_ASSERT_X(cond, where, what) do { if (!(cond)) qt_assert_x(where, what,__FILE__,__LINE__); } while (false)
+#endif
QT_END_NAMESPACE
diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
index 99d87e2e46..a4eab2aa72 100644
--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in

View file

@ -1,8 +1,8 @@
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index ee5b38717..bbccef8c4 100644
index a7cafa1a9..e17ffd35b 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -1678,6 +1678,15 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
@@ -1737,6 +1737,15 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
addImportPath(installImportsPath);
@ -17,7 +17,7 @@ index ee5b38717..bbccef8c4 100644
+
// env import paths
if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) {
const QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH");
const QString envImportPath = qEnvironmentVariable("QML2_IMPORT_PATH");
diff --git a/tools/qmlcachegen/qmlcache.prf b/tools/qmlcachegen/qmlcache.prf
index 330da358b..cdf570205 100644
--- a/tools/qmlcachegen/qmlcache.prf

View file

@ -1,5 +1,5 @@
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 11fb52a0b1..a4cca1fdcb 100644
index 11fb52a0b1..614fdbb046 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -21,7 +21,7 @@ load(cmake_functions)
@ -35,7 +35,7 @@ index 11fb52a0b1..a4cca1fdcb 100644
- # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
- CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../"
-}
+CMAKE_LIB_DIR = $$NIX_OUTPUT_DEV/lib/
+CMAKE_LIB_DIR = $$NIX_OUTPUT_OUT/lib/
+CMAKE_LIB_DIR_IS_ABSOLUTE = True
-CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
@ -64,7 +64,7 @@ index 11fb52a0b1..a4cca1fdcb 100644
- CMAKE_DLL_DIR = $$CMAKE_LIB_DIR
- CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
-}
+CMAKE_DLL_DIR = $$NIX_OUTPUT_DEV/lib/
+CMAKE_DLL_DIR = $$NIX_OUTPUT_OUT/lib/
+CMAKE_DLL_DIR_IS_ABSOLUTE = True
static|staticlib:CMAKE_STATIC_TYPE = true
@ -628,7 +628,7 @@ index 1d947159e2..b36865fc48 100644
set_target_properties(Qt5::qdbusxml2cpp PROPERTIES
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
index 07869efd7d..37b95d1b6b 100644
index 07869efd7d..fb4183bada 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -2,7 +2,7 @@
@ -652,7 +652,7 @@ index 07869efd7d..37b95d1b6b 100644
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ set(imported_implib \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ set(imported_implib \"$$NIX_OUTPUT_OUT/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ELSE
set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ENDIF
@ -758,6 +758,28 @@ index 4646ced954..ff3111f393 100644
xcursorFound = xcursorLib.load();
}
if (xcursorFound) {
diff --git a/src/testlib/qtestassert.h b/src/testlib/qtestassert.h
index ca3e02ca06..28dd73d772 100644
--- a/src/testlib/qtestassert.h
+++ b/src/testlib/qtestassert.h
@@ -38,10 +38,13 @@
QT_BEGIN_NAMESPACE
-
-#define QTEST_ASSERT(cond) do { if (!(cond)) qt_assert(#cond,__FILE__,__LINE__); } while (0)
-
-#define QTEST_ASSERT_X(cond, where, what) do { if (!(cond)) qt_assert_x(where, what,__FILE__,__LINE__); } while (0)
+#if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
+#define QTEST_ASSERT(cond) do { } while ((false) && (cond))
+#define QTEST_ASSERT_X(cond, where, what) do { } while ((false) && (cond))
+#else
+#define QTEST_ASSERT(cond) do { if (!(cond)) qt_assert(#cond,__FILE__,__LINE__); } while (false)
+#define QTEST_ASSERT_X(cond, where, what) do { if (!(cond)) qt_assert_x(where, what,__FILE__,__LINE__); } while (false)
+#endif
QT_END_NAMESPACE
diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
index 99d87e2e46..a4eab2aa72 100644
--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in

View file

@ -12,7 +12,7 @@ index 5208379f9a..92fe29a0ac 100644
QMAKE_LFLAGS_REL_RPATH =
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index bb5083c925..da8e2cb386 100644
index bb5083c925..77034f9bb6 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -21,7 +21,7 @@ load(cmake_functions)
@ -48,7 +48,7 @@ index bb5083c925..da8e2cb386 100644
- # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
- CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../"
-}
+CMAKE_LIB_DIR = $$NIX_OUTPUT_DEV/lib/
+CMAKE_LIB_DIR = $$NIX_OUTPUT_OUT/lib/
+CMAKE_LIB_DIR_IS_ABSOLUTE = True
-CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
@ -77,7 +77,7 @@ index bb5083c925..da8e2cb386 100644
- CMAKE_DLL_DIR = $$CMAKE_LIB_DIR
- CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
-}
+CMAKE_DLL_DIR = $$NIX_OUTPUT_DEV/lib/
+CMAKE_DLL_DIR = $$NIX_OUTPUT_OUT/lib/
+CMAKE_DLL_DIR_IS_ABSOLUTE = True
static|staticlib:CMAKE_STATIC_TYPE = true
@ -432,13 +432,13 @@ index e645ba5803..a0e5c68b7e 100644
-
-QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
index 44636f2288..61ed486a76 100644
index 44636f2288..3b01424e67 100644
--- a/mkspecs/features/mac/default_pre.prf
+++ b/mkspecs/features/mac/default_pre.prf
@@ -1,56 +1,3 @@
@@ -1,56 +1,2 @@
CONFIG = asset_catalogs rez $$CONFIG
load(default_pre)
-
-isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
- # Get path of Xcode's Developer directory
- QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null")
@ -493,11 +493,11 @@ index 44636f2288..61ed486a76 100644
-# at build time, depending on the current Xcode SDK and configuration.
-QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index 3f6dc076ca..8b13789179 100644
index 3f6dc076ca..e69de29bb2 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -1,58 +1 @@
@@ -1,58 +0,0 @@
-
-isEmpty(QMAKE_MAC_SDK): \
- error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.")
-
@ -676,30 +676,18 @@ index 72dde61a40..f891a2baed 100644
INSTALLS += inst_qch_docs
diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf
index 668669e4cd..30f7fbac41 100644
index 668669e4cd..eb4840a0aa 100644
--- a/mkspecs/features/qt_example_installs.prf
+++ b/mkspecs/features/qt_example_installs.prf
@@ -77,13 +77,13 @@ for(extra, extras): \
# Just for Qt Creator
OTHER_FILES += $$sourcefiles
-sourcefiles += \
- $$_PRO_FILE_ $$RC_FILE $$DEF_FILE \
- $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
- $$DBUS_ADAPTORS $$DBUS_INTERFACES
-addInstallFiles(sources.files, $$sourcefiles)
@@ -82,7 +82,7 @@ sourcefiles += \
$$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
$$DBUS_ADAPTORS $$DBUS_INTERFACES
addInstallFiles(sources.files, $$sourcefiles)
-sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase
-INSTALLS += sources
+ sourcefiles += \
+ $$_PRO_FILE_ $$RC_FILE $$DEF_FILE \
+ $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
+ $$DBUS_ADAPTORS $$DBUS_INTERFACES
+ addInstallFiles(sources.files, $$sourcefiles)
+ sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase
+ INSTALLS += sources
+sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase
INSTALLS += sources
check_examples {
srcfiles = $$sources.files
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 1903e509c8..ae7b585989 100644
--- a/mkspecs/features/qt_functions.prf
@ -952,7 +940,7 @@ index 1d947159e2..b36865fc48 100644
set_target_properties(Qt5::qdbusxml2cpp PROPERTIES
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
index 07869efd7d..37b95d1b6b 100644
index 07869efd7d..fb4183bada 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -2,7 +2,7 @@
@ -976,7 +964,7 @@ index 07869efd7d..37b95d1b6b 100644
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ set(imported_implib \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ set(imported_implib \"$$NIX_OUTPUT_OUT/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ELSE
set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ENDIF
@ -1028,28 +1016,6 @@ index c92d8fc3f8..6008063bcf 100644
{
// specific curves requested, but not possible to set -> error
sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2"));
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index 341d3bccf2..3368234c26 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations()
QMacAutoReleasePool pool;
userProfiles.clear();
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
for (NSString *ifName in wifiInterfaces) {
CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate()
QMacAutoReleasePool pool;
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
for (NSString *ifName in wifiInterfaces) {
scanThread->interfaceName = QString::fromNSString(ifName);
scanThread->start();
diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
index b5a0a5bbeb..6c20305f4d 100644
--- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
@ -1068,19 +1034,6 @@ index b5a0a5bbeb..6c20305f4d 100644
}
QString TableGenerator::findComposeFile()
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 5cd4beb4f0..84919e6d6a 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -320,7 +320,7 @@ static void qt_closePopups()
+ (void)applicationActivationChanged:(NSNotification*)notification
{
const id sender = self;
- NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
+ NSEnumerator *windowEnumerator = nullptr;
NSApplication *application = [NSApplication sharedApplication];
#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)
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 e2e573f0e1..1c8289f81e 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@ -1153,6 +1106,26 @@ index c4cd66c33b..b6f2691587 100644
return 0;
}
diff --git a/src/testlib/qtestassert.h b/src/testlib/qtestassert.h
index 6498ea84ef..d821ced7fc 100644
--- a/src/testlib/qtestassert.h
+++ b/src/testlib/qtestassert.h
@@ -44,10 +44,13 @@
QT_BEGIN_NAMESPACE
-
+#if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
+#define QTEST_ASSERT(cond) do { } while ((false) && (cond))
+#define QTEST_ASSERT_X(cond, where, what) do { } while ((false) && (cond))
+#else
#define QTEST_ASSERT(cond) do { if (!(cond)) qt_assert(#cond,__FILE__,__LINE__); } while (false)
-
#define QTEST_ASSERT_X(cond, where, what) do { if (!(cond)) qt_assert_x(where, what,__FILE__,__LINE__); } while (false)
+#endif
QT_END_NAMESPACE
diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
index 99d87e2e46..a4eab2aa72 100644
--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in

View file

@ -15,8 +15,8 @@ fixQtModulePaths () {
if grep -q '\$\$QT_MODULE_' "${pr:?}"; then
echo "fixQtModulePaths: Fixing module paths in \`${pr:?}'..."
sed -i "${pr:?}" \
-e "s|\\\$\\\$QT_MODULE_LIB_BASE|$dev/lib|g" \
-e "s|\\\$\\\$QT_MODULE_HOST_LIB_BASE|$dev/lib|g" \
-e "s|\\\$\\\$QT_MODULE_LIB_BASE|$lib/lib|g" \
-e "s|\\\$\\\$QT_MODULE_HOST_LIB_BASE|$lib/lib|g" \
-e "s|\\\$\\\$QT_MODULE_INCLUDE_BASE|$dev/include|g" \
-e "s|\\\$\\\$QT_MODULE_BIN_BASE|$dev/bin|g"
fi
@ -27,13 +27,6 @@ fixQtModulePaths () {
echo "fixQtModulePaths: Warning: \`$dir' does not exist"
fi
if [ "z$dev" != "z$lib" ]; then
if [ -d "$lib/lib" ]; then
mkdir -p "$dev/lib"
lndir -silent "$lib/lib" "$dev/lib"
fi
fi
if [ "z$bin" != "z$dev" ]; then
if [ -d "$bin/bin" ]; then
mkdir -p "$dev/bin"

View file

@ -1,32 +0,0 @@
# fixQtStaticLibs
#
# Usage: fixQtStaticLibs _lib_ _dev_
#
# Find static Qt libraries in output _lib_ and move them to the corresponding
# path in output _dev_. Any QMake library definitions (*.prl files) are also
# moved and library paths are patched.
#
fixQtStaticLibs() {
local lib="$1"
local dev="$2"
pushd "$lib"
if [ -d "lib" ]; then
find lib \( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | \
while read -r -d $'\0' file; do
mkdir -p "$dev/$(dirname "$file")"
mv "$lib/$file" "$dev/$file"
done
fi
popd
if [ -d "$dev" ]; then
find "$dev" -name '*.prl' | while read prl; do
echo "fixQtStaticLibs: Fixing built-in paths in \`$prl'..."
sed -i "$prl" \
-e '/^QMAKE_PRL_BUILD_DIR =/d' \
-e '/^QMAKE_PRO_INPUT =/d' \
-e "s|-L\\\$\\\$NIX_OUTPUT_OUT/lib|-L$lib/lib -L$dev/lib|g"
done
fi
}

View file

@ -4,7 +4,6 @@ qtDocPrefix=@qtDocPrefix@
. @fix_qt_builtin_paths@
. @fix_qt_module_paths@
. @fix_qt_static_libs@
providesQtRuntime() {
[ -d "$1/$qtPluginPrefix" ] || [ -d "$1/$qtQmlPrefix" ]
@ -63,12 +62,3 @@ postPatchMkspecs() {
if [ -z "$dontPatchMkspecs" ]; then
postPhases="${postPhases}${postPhases:+ }postPatchMkspecs"
fi
postMoveQtStaticLibs() {
if [ "z${!outputLib}" != "z${!outputDev}" ]; then
fixQtStaticLibs "${!outputLib}" "${!outputDev}"
fi
}
if [ -z "$dontMoveQtStaticLibs" ]; then
postPhases="${postPhases}${postPhases:+ }postMoveQtStaticLibs"
fi

View file

@ -14,6 +14,8 @@ let
++ optional (debug != null)
(if debug then "CONFIG+=debug" else "CONFIG+=release");
NIX_CFLAGS_COMPILE = optional (debug != null) "-DQT_NO_DEBUG";
cmakeFlags =
(args.cmakeFlags or [])
++ [ "-DBUILD_TESTING=OFF" ]

View file

@ -97,7 +97,6 @@ stdenv.mkDerivation {
fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh;
fix_qt_module_paths = ../hooks/fix-qt-module-paths.sh;
preHook = ''
. "$fix_qt_static_libs"
. "$fix_qt_builtin_paths"
. "$fix_qt_module_paths"
. ${../hooks/move-qt-dev-tools.sh}
@ -363,11 +362,6 @@ stdenv.mkDerivation {
fixQtBuiltinPaths "''${!outputDev}" '*.pr?'
''
# Move static libraries and QMake library definitions into $dev.
+ ''
fixQtStaticLibs "''${!outputLib}" "''${!outputDev}"
''
# Move development tools to $dev
+ ''
moveQtDevTools