From 8485fe9af8582e1f1a8b83f5865ccaaf409eb103 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 7 Jul 2015 16:43:05 -0700 Subject: [PATCH] Don't complain about non-matching Qt versions in qwidget.cpp Commit 5bf67f5f41ab110eb41ab74f2a87e649735af435 did it for qobject.cpp, but I missed qwidget.cpp (I hadn't realized the test existed there too). Change-Id: Ib056b47dde3341ef9a52ffff13eeceafcfc64893 Reviewed-by: Friedemann Kleint Reviewed-by: Marc Mutz Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/widgets/kernel/qwidget.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index bd77e7f616c..b40d2fef5d7 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -289,8 +289,15 @@ QWidgetPrivate::QWidgetPrivate(int version) return; } +#ifdef QT_BUILD_INTERNAL + // Don't check the version parameter in internal builds. + // This allows incompatible versions to be loaded, possibly for testing. + Q_UNUSED(version); +#else if (version != QObjectPrivateVersion) - qFatal("Cannot mix incompatible Qt libraries"); + qFatal("Cannot mix incompatible Qt library (version 0x%x) with this library (version 0x%x)", + version, QObjectPrivateVersion); +#endif isWidget = true; memset(high_attributes, 0, sizeof(high_attributes));