Before this change, configure -force-asserts would affect qmake-based user
projects too, potentially forcing the user to remove the
QT_FORCE_ASSERTS define in their own projects.
[ChangeLog][configure] The -force-asserts option now affects the Qt
build only, not user projects.
Change-Id: Iecca3c9f7e8261996c5d8bcba8adbc0db1dc1c99
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We don't appear to have implicit fallthroughs in our code anymore. The
last deprecated copies and redundant moves are also gone.
The other warning never had an explanation and doesn't show up when
building full Qt anyway.
Change-Id: Iad959315ad374ef288f5fffd15d683599a1a11b9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
gcc doesn't report warnings for final methods since version 9.2:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78010
Change-Id: I7152351aac0e3bad86d777e119f25137ef97ec6f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Apple deprecated the entire OpenGL API in favor of Metal, which
we are aware of, so we don't need to see the warnings when building
Qt.
Instead of applying the silencing globally for all Qt consumers,
both internal and external, we now limit the silencing to Qt itself.
That means user code that explicitly uses any of the deprecated APIs
will see the warnings. Note that this does not apply to merely using
any of the Qt OpenGL APIs. The user has to explicitly use the platform
APIs that have been deprecated.
The warnings need to be disabled on a build system level, so that
that they are passed as -D flags on the command line. If the defines
were done in Qt headers (qguiglobal.h e.g.), they would require the
user to always include this header before any of the Apple headers.
Change-Id: I3f2a2a5211332a059ad4416394251772c677fdcb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
For prefix builds the prl files of header modules still contained the
absolute path of the install prefix instead of $$[QT_INSTALL_LIBS]. This
was, because the QMAKE_PRL_INSTALL_REPLACE variable was only filled for
'lib' TEMPLATE projects. Header modules, however, have the 'aux'
template.
Fixes: QTBUG-82871
Change-Id: I90f248967f1bff41423d871a977ae91c78015bbd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If Qt was configured with -separate-debug-info, Qt's tools should be
separated from their debug information too.
Fixes: QTBUG-56482
Change-Id: Ief0130db1787b767496d0052716183fe773460bf
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
For every executable that uses a static Qt library (e.g. rcc using
libQt5Bootstrap.a) we got a warning: 'direct access in function...to
global weak symbol'.
This was because we've built all libraries with -fvisibility=hidden
-fvisibility-inlines-hidden but not the executables linking against
them. On macOS however, all translation units must have the same
visibility setting.
We're now setting the same visibilty for libs and executables on
darwin.
Fixes: QTBUG-81297
Change-Id: I2668e9385caa7f0ce78bf3727b4e5322bc4a294f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Also remove it from versions no longer supported.
Change-Id: I03a911a349527a81846e1820f95d775fe3943450
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The regular expression with the alternative is not portable.
Use a separate QMAKE_PRL_INSTALL_REPLACE item.
This amends commit f00de33.
Fixes: QTBUG-75950
Change-Id: I78e172053f8b05be7d595a1c9e1695ea658b0547
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
In the case of building a Qt module repository against an installed
qtbase the .prl files contain absolute paths to Qt dependencies e.g.
'/install-prefix/lib/libQt5Core.so'.
Those must be replaced with $$[QT_INSTALL_PREFIX]. The .prl
replacement code however only takes $$MODULE_BASE_OUTDIR/lib into
account.
Fixes: QTBUG-75804
Change-Id: I5ea5623ca7396b672fded3f1b9434b9ad5ed12ec
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
QMAKE_PRL_LIBS contains absolute paths to libraries, e.g. libqtpcre2.a.
On "make install" the libdir is replaced with the installation target
libdir. If the libdir is in QMAKE_DEFAULT_LIBDIRS (e.g. /usr) then the
replacement was empty. That worked fine for include paths but not for
paths referencing files in that libdir:
/my/build/lib/qtbase/lib/libqtpcre2.a would become /libqtpcre2.a.
Add another replacement that takes care of file paths and inserts
$$[QT_INSTALL_LIBS].
Fixes: QTBUG-75460
Change-Id: I4e84478a50c24d4143ad5695493cad2992735cf2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Implicit copy constructors or methods are considered deprecated for
classes that has one of the two or a destructor.
The warning is enabled with -Wextra in gcc 9
Change-Id: Ic9be654f2a142fb186a4d5a7d6b4f7d6f4e611d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Makes it possible to build user projects and Qt with C++2a. It is not
automatically upgraded to yet though.
Change-Id: I949ce94871ddc53f21b7265a52b9c0e1370456c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Perfectly valid C++11 code trying to default-initialize an object with
{} is being warned. GCC 5 and up only warn if you initialize some fields
and not others.
qcborvalue.h:68:25: error: missing initializer for member 'QCborError::c' [-Werror=missing-field-initializers]
QCborError error = {};
^
Task-number: QTBUG-68889
Change-Id: I6efb28c3145047559ec0fffd1538577de250e283
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Fixes the default C version used with gcc < 5
Change-Id: I948dece961caed8e6b181e1c6e6b9dc43c46583e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The change causes a crash when compiling the xkbcommon 3rdparty
library and compile failures (qtimageformats on Android).
This reverts commit a47cb14680.
Task-number: QTBUG-67326
Task-number: QTBUG-67327
Change-Id: I5ddc4eccad699e3eaec535fd6a63d11b0026b42e
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Fixes the default C version used with gcc < 5
Change-Id: I948dece961caed8e6b181e1c6e6b9dc43c46583f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I7d5f211e2441415134c5905b159b41dc3b2b231b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This guarantees that we have proper version checks in place for APIs on
Apple platforms that are not necessarily available on the deployment
target.
Change-Id: I10060f8b910f2bb790aa4a9c6f8c5cdc14d7cf06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It prints the warning even if we surround the affected code with
QT_WARNING_DISABLE_GCC("-Wstringop-overflow") (see e4eaa62943),
so we have no alternative other than to disable the warning completely.
Change-Id: Ia3e896da908f42939148fffd14c488c4006040e6
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This was originally enabled in the mkspecs for 64-bit QNX 7.0.0
but that broke when the qtConfig change was made. It looks like
qtConfig shouldn't be used in the platform mkspecs. I suspect
the stack-protector changes were left out of the 32-bit mkspecs
so that 6.6.0 builds wouldn't be affected.
Ignore the stack-protector/stack-protector-all possibility since
it isn't possible to access it without a command line option.
Specifying both options doesn't even make sense since
stack-protector-all encompasses stack-protector.
For now, leave out command line control of this feature.
Task-number: QTBUG-59644
Change-Id: I99323216be5b592dd2c3bef6d22da195764a6e65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The compiler is mostly GCC in disguise, but the libraries are not. Since
the toolchain is not open, it's difficult to fix issues in it.
Task-number: QTBUG-59671
Task-number: QTBUG-59672
Change-Id: Id92f4a61915b49ddaee6fffd14aea2639153f073
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
don't ignore detected features for host tools when we're not actually
cross-building.
Change-Id: Id62a3c1c6b7ae422b14efb4fbea0892b05a047cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Disables escalating the implicit fallthough warning to an error, since
Qt is not yet free of unmarked implicit fallthroughs.
With this we can clean the code in the dev branch instead of in 5.6 and
5.8, and only backport bug fixes.
Change-Id: Id30ee21b77de6defcb7d5bb1e05e86c0db098481
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
iOS was excluded in 09aeda21b9, probably
unnecessarily. The build has been found to be warning-free.
Change-Id: I81de2fff40938b6ab9f7a6a5b9f08f8a8baadb16
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
cf53aa21bf and 3aaa5d6b32
were reverted because of reconstruction in 5.7.
defineTest(qtConfTest_checkCompiler) in configure.pri is smart
enough to cover the case in a9474d1260.
DirectWrite: Fix advances being scaled to 0
Since 131eee5cd, the stretch of a font can be 0, meaning
"whatever the font provides". In combination with ec7fee96,
this would cause advances in the DirectWrite engine to be scaled to
0, causing the QRawFont test to fail.
Conflicts:
configure
mkspecs/features/uikit/device_destinations.sh
mkspecs/features/uikit/xcodebuild.mk
src/corelib/global/qglobal.cpp
src/corelib/global/qnamespace.qdoc
src/plugins/platforms/cocoa/qcocoamenuitem.h
src/plugins/platforms/windows/qwindowsservices.cpp
src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
src/widgets/kernel/qapplication.cpp
tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
when it comes to compiler flags (be it warnings or include paths), it
doesn't matter whether we building/using bootstrap libraries, but
whether we are actually cross-building.
amends c55bdc271f and d8be8110a.
Change-Id: Idf988107e9cccc486672c0ee70dc9bdf8eab9d8c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>