From 5bf67f5f41ab110eb41ab74f2a87e649735af435 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 3 Dec 2013 23:25:27 -0800 Subject: Don't check the Qt version across modules in -developer-build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of enforcing the check, we'll simply trust developers to do the right thing. For one, it's useful to mix libraries during testing (regression testing, git bisects, etc.). For another, Qt developers are faced day-to-day with binary incompatibility issues anyway, so this check is mostly superfluous. If there's one commit we could be sure that isn't breaking binary compatibility, that's the "Bump Qt version" commit. And yet that's the one that would cause the fatal to trip... Change-Id: I8965f764a6ca1b2d125b42bce7ac6b27e3afc8ac Reviewed-by: Olivier Goffart Reviewed-by: Friedemann Kleint Reviewed-by: Jędrzej Nowacki Reviewed-by: Stephen Kelly Reviewed-by: Marc Mutz --- src/corelib/kernel/qobject.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib/kernel/qobject.cpp') diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index a65cf517ce..50fb1e5970 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -194,9 +194,15 @@ QMetaObject *QObjectData::dynamicMetaObject() const QObjectPrivate::QObjectPrivate(int version) : threadData(0), connectionLists(0), senders(0), currentSender(0), currentChildBeingDeleted(0) { +#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 library (version 0x%x) with this library (version 0x%x)", version, QObjectPrivateVersion); +#endif // QObjectData initialization q_ptr = 0; -- cgit v1.2.3