Commit Graph

1825 Commits

Author SHA1 Message Date
Joerg Bornemann
41b919919e Purge the dep_cd_cmd parameter from callExtraCompilerDependCommand
We always pass the same value. The builtins are also using exactly this
"cd command" unconditionally.

This deduplicates the code at the call sites of
callExtraCompilerDependCommand a bit.

Change-Id: I5c412c815d50afdac55e1b45021f37f2545ce8f0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-01-24 13:25:06 +01:00
Joerg Bornemann
16885a6033 De-duplicate the last occurrence of calling a depend_command
Use the central callExtraCompilerDependCommand in the last place where
the code to call an extra compiler's depend_command was duplicated.

Note that this is in the "Bad hack" section. We're making this hack less
bad, but the comment still applies.

Change-Id: Iaa857af20ca46b2d73053d3e264c63124c87a41b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-01-24 13:24:59 +01:00
Qt Forward Merge Bot
3e9f8b5249 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I12148e7b20bcdb72d9b328035d528c99633b1e92
2020-01-18 01:00:08 +01:00
Nico Vertriest
28f95d4688 Doc: Fix qdoc compilation errors qtbase
Task-number: QTBUG-79824
Change-Id: I5a39525e3e735415ba96e2d585c5de754deb15de
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2020-01-17 12:56:08 +00:00
Qt Forward Merge Bot
c3123c757a Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
2020-01-15 01:00:39 +01:00
Joerg Bornemann
6d545dedad Fix mkdir warning for object_parallel_to_source projects
Source files that are right next to the project file result in an
empty "object subdirectory" if object_parallel_to_source is set.
We must not attempt to create empty directories.

Fixes: QTBUG-81271
Change-Id: I431f9fbe46f50fbbaa5d6a59966bfb059418036c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-01-14 07:58:03 +01:00
Samuel Gaist
44fd33e05c doc: improve SUBDIRS documentation for dependency handling
The use of the 'ordered' CONFIG option is known to not be efficient for
multi-core builds. This patch updates the documentation with an example
using the .depends modifier as well a discourage the use of 'ordered'.

Change-Id: I3575243a7c4138f0671d171441c932c3ad89a411
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2020-01-14 06:55:48 +01:00
Liang Qi
a59c768489 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/kernel/qobject.cpp

Change-Id: I4780b25665672692b086ee92092e506c814642f2
2020-01-09 20:30:39 +01:00
Joerg Bornemann
8bfdb25c1f Doc: Extend the documentation about qmake scopes
Fixes: QTBUG-18025
Change-Id: I2b587266cde2002d965dc824a869be255cf3522e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-09 11:27:10 +01:00
Qt Forward Merge Bot
9bb9de461f Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I9b4816b4aa6f0c51a446742db58b9d0dcf69aa09
2020-01-09 01:00:08 +01:00
Joerg Bornemann
9d7ed92f6e Fix dependency resolution for extra compilers in VS projects
De-duplicate the code that calls the extra compiler's depend_command by
using the central function callExtraCompilerDependCommand. This one
actually tries to resolve dependencies unlike the removed code that
blindly resolved relative paths to the build directory.

This fixes dependencies reported by uic which need to be resolved
against what is in DEPENDPATH.

Fixes: QTBUG-80579
Change-Id: If482e50ff3eff716fefffee82004acc076b3a547
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-01-07 07:16:59 +01:00
Qt Forward Merge Bot
c75e8a6618 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I6c81e3cb6272adc5c3de2513792bd48604ff4dd0
2020-01-07 01:01:16 +01:00
Kai Koehne
7c65527a02 qmake: Document QML_IMPORT_PATH
qmake itself does not use the variable, but Qt Creator does.

Fixes: QTBUG-77866
Change-Id: I313d1ebe32dbc1eeac8d2d79b519349c7097a5a6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-01-06 13:10:57 +01:00
Qt Forward Merge Bot
4054c0d6ed Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	.qmake.conf
	src/plugins/platforms/xcb/qxcbscreen.cpp
	src/widgets/accessible/qaccessiblewidget.cpp

Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
2019-12-27 09:29:30 +01:00
Ulf Hermann
6c2052f9d7 Doc: Fix name of no_check_exist flag
There is only one 's' in there.

Change-Id: I02288c138784086e535c339660b02bf9c33f8fda
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-23 10:33:36 +01:00
Joerg Bornemann
542d14bd02 Fix "Broken filename passed to function" message for qmake -tp vc
Since commit 9ab043b6 we're checking for invalid file paths passed to
Qt's file system engine. When initializing the deployment tool for VS
projects we accidentally passed a file path containing '\0'. Fix that by
using an infix QString, not QChar.

Change-Id: Ieae066d20ac290354febd420abce68f28649b365
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-12-16 13:28:37 +01:00
Liang Qi
1d00f52fd3 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-12-16 12:58:50 +01:00
Allan Sandfeld Jensen
deeaa500ad Mark the old style unprefixed stream functions deprecated
Requires a third definition for the source-compatible but deprecated
version.

Change-Id: I260ae79f4547f99eed701b10e0b25222f81cd5ff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-16 11:23:47 +01:00
Liang Qi
ee71a9ba81 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/network/ssl/qsslsocket.cpp
	src/widgets/kernel/qapplication.cpp

Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
2019-12-16 07:05:19 +01:00
Tor Arne Vestbø
f733c1c6e7 Xcode: Use output directory as SYMROOT when shadow-building
Setting the CONFIGURATION_BUILD_DIR variable to tell Xcode where to
place the final application bundle confuses Xcode when archiving
a project, and the archive ends up without the dSYM files.

Unfortunately we can't leave it up to Xcode to place the build
artifacts wherever it wants, as Qt Creator's iOS support expects
to find the artifacts in a well-defined place. Until we've taught
Qt Creator to find the artifacts for deployment where Xcode placed
them we need to keep this logic.

We now avoid setting the CONFIGURATION_BUILD_DIR variable unless we
really need to due to in-source builds. As long as we're dealing with
a shadow-build it's okey to set SYMROOT.

Change-Id: I9661c1c57725dc8ba5a21f8467b8b61834f2e64d
Fixes: QTBUG-74841
Task-number: QTBUG-52474
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-12 14:56:31 +01:00
Ulf Hermann
23d2312506 Split cborstream feature in two
Reading of Cbor streams is substantially more complicated than writing
as it requires float16 support. When writing Cbor, we can just choose to
always write 32bit floats, even if we could compress the numbers into
16 bits.

We need Cbor writing in the bootstrap library, but we cannot easily add
float16 support.

Furthermore, Cbor reading is required for plugin support, but not Cbor
writing. It might make sense for some users to build a custom Qt with
Cbor writing disabled.

Therefore, provide two features, cborstreamreader and cborstreamwriter,
split up the code in cborstream.{h|cpp} into several files, and enable
Cbor writing in the bootstrap library.

Change-Id: I15450afb0e328a84a22ebca9379cffc4f900a75a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-12 10:42:27 +01:00
Nico Vertriest
5a660353ed Doc: Fix qdoc compilation errors qtbase
Task-number: QTBUG-79824
Change-Id: I6557de598de1931fc30556951d35783d02b83abe
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-12-12 07:14:50 +01:00
Liang Qi
90210d5d9c Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	tests/auto/network/kernel/qnetworkinterface/BLACKLIST

Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
2019-12-10 13:51:40 +02:00
Alessandro Portale
83df5c71e6 Fix qmake's sed functionality for input containing CR+LF newlines
QTextStream, reading a file with CR+LF newlines from an stdio FILE
handle that was opened without "b", will always return false in atEnd().

Changing the open mode from "r" to "rb" works around the issue.

Task-number: QTBUG-80443
Change-Id: Ib2eafc0c4c6a6d2bcaeea3036474549d2d9e1511
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-05 13:34:18 +01:00
Qt Forward Merge Bot
1315133233 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ic4ffd206bdd3ed68fd3d21a93818923e8d3a1e7a
2019-11-20 01:00:51 +01:00
Yuhang Zhao
9567103f38 qmake: Remove /O3 from win32-icc
Use O3 causes warnings when combined with O2, so just remove it.

Partially revert commit 11111c5a7d

Change-Id: Ifbf6e024e35933ecc3610d6efc3423589dab9a38
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-11-19 13:48:09 +08:00
Qt Forward Merge Bot
587f1cbc5d Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I4e5c8a1fcef443c3383e207102f21d41000ff322
2019-11-19 01:00:12 +01:00
Joerg Bornemann
52c8e9dc99 Fix precompiled headers on macOS
Since commit 059172c6 precompiled headers did not work anymore on
macOS, because the ${QMAKE_PCH_ARCH} string was suddenly appearing in
locations where it was not replaced with the actual architecture, e.g.
the directory where the PCH files are written.

Fix this by replacing the whole file path and not just portions of it.

Fixes: QTBUG-79694
Change-Id: I925d4ee8980a0de3205a0e387a516a5c6f8cfa4b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-11-18 10:46:56 +01:00
Qt Forward Merge Bot
78c687f98e Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I963b5f48b5d6f3500ca379fbd7f1a4290b570175
2019-11-08 09:11:02 +01:00
Qt Forward Merge Bot
75f791419c Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-11-06 19:44:29 +01:00
Andy Shaw
b274f656b8 Be able to create a response file for other generators too
When building an application for Android on Windows it is possible that
the command line will be too long when doing the link step. So the code
for generating a response file is moved to MakefileGenerator so it can
be used by the other generators easily. The same variables used by
MinGW can be used elsewhere then.

Fixes: QTBUG-71940
Change-Id: I6c331d12e9541a90a4a95e0154d0ea1c056489bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-11-06 18:14:17 +01:00
Qt Forward Merge Bot
e3cc16e9fb Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	.qmake.conf
	mkspecs/features/mac/default_post.prf
	src/corelib/tools/qsimd_p.h
	src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
	util/qfloat16-tables/gen_qfloat16_tables.cpp

Change-Id: If48fa8a3bc3c983706b609a6d3822cb67c1352a4
2019-11-06 11:41:19 +01:00
Ulf Hermann
fc3c6cde83 qmake: Don't call QDir::count() over and over
This can be expensive. We don't expect files to be added to the
directory while qmake is running, and if that happened, the result would
be unpredictable anyway.

Change-Id: I5db93132046c1284130bbe51ce1ecd2a14665206
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-30 09:23:24 +01:00
Qt Forward Merge Bot
86e74d60d2 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I208a36bf1c88c8291baaa5ca8fe8e838bc9d7aea
2019-10-26 01:01:14 +02:00
Christian Romberg
059172c633 Fix precompiled headers for Clang
Precompiled headers were put in a directory which had exactly the same
name as the binary to be generated. This resulted in a failure with any
mkspec that used clang_pch_style. The g++-mkspec avoid this problem by
extending the directory name. This change adopts this technique for
clang mkspecs.

[ChangeLog][qmake] Fixed precompiled headers for the Clang compiler.

Fixes: QTBUG-72404
Change-Id: I471462e2bcb1e33f19d277c21acde0c04b1ffcd6
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-25 07:04:50 +00:00
Qt Forward Merge Bot
375efdd0e1 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Iebedaa967a263854f18cd403ce007d7965f26d2b
2019-10-25 01:00:16 +02:00
Qt Forward Merge Bot
b327807c5e Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/io/qstandardpaths_unix.cpp
	src/corelib/tools/qsharedpointer_impl.h
	tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp

Change-Id: Iae95c5778dc091058f16f6db76f04a0178a9e809
2019-10-24 10:23:44 +02:00
Ulf Hermann
35adb74ddd Reimplement JSON support on top of Cbor
In turn, deprecate the QJsonDocument methods that deal with JSON binary
data. You should use CBOR for data serialization these days.

[ChangeLog][Deprecation Notice] The binary JSON representation is
deprecated. The CBOR format should be used instead.

Fixes: QTBUG-47629
Change-Id: Ic8b92ea36de87815b12307a9d8b1095f07166db8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-21 19:12:51 +02:00
Joerg Bornemann
d3d5eadf24 Fix assert in VS project generator
We must check whether outputs or inputVars are non-empty before
accessing them.

This amends commit 68866b1a.

Task-number: QTBUG-79178
Change-Id: Iecf6dc705bac9bef5133ae2e5ceeace5f859f175
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-10-15 04:20:41 +00:00
Joerg Bornemann
472f5331ca Doc: Fix QMAKE_EXTRA_TARGETS snippet description
The snippet uses the Unix touch command, not qmake's touch function.

Change-Id: I71d1460447249b8941ce4bdbb494bb419e13b119
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-10-10 14:43:15 +02:00
Tor Arne Vestbø
9115c7ae45 qmake: Avoid writing glue project file when only generating prl files
When qmake is run with -prl we don't need to write the glue makefile,
and doing so will end up with MakefileGenerator::writeProjectMakefile
trying to write to an invalid Option::output, resulting in warnings:

  QIODevice::write device not open

Change-Id: I196b185570e7329c621c2ccb8530b43f4be51ee6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-09 02:10:03 +02:00
Edward Welbourne
0118e2e915 Include likely-adjusted uiLanguages for the system locale
QLocale::uiLanguages() on the system locale uses whatever the system
locale's query(QSystemLocale::UILanguages,...) returns. On Android,
this is just a list of locales. However, for non-system locales, we
also include some results of removing likely sub-tags from the locale
name, where equivalent. Thus zh-CN would also get zh and zh-Hans-CN
added to it; however, if the system locale is zh-Hans-CN, the shorter
forms are omitted. So post-process the system locale list in the same
way, albeit tweaked to avoid duplicates and rearranged so that we can
insert likely-adjusted entries between what they adjust and what
followed it.

Added QLocalePrivate::rawName() in the process, since it looks likely
to be useful in other contexts (and I needed its value): it just joins
such tags as are non-Any. This, however, uses QByteArrayList, so added
that (it's small) to the bootstrap library and qmake.

This follows up on commit 8796e3016f.

[ChangeLog][QtCore][QLocale] The system locale's UI languages list now
includes, as for that of an ordinary locale, the results of adding
likely sub-tags from each locale name, and of removing some, where
this doesn't change which locale is specified. This gives searches for
translation files a better chance of finding a suitable file.

Fixes: QTBUG-75413
Change-Id: Iaafd79aac6a0fdd5f44aed16e445e84a2267c9da
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-04 15:16:15 +02:00
Tor Arne Vestbø
3018c48f32 qmake: Parse -framework link lines the same way the linker does
[ChangeLog][qmake] The syntax 'LIBS += -frameworkFoo', or
'LIBS += "-framework Foo"' is no longer supported. Use the
canonical 'LIBS += -framework Foo' instead.

Change-Id: I50fd02dbfa155a0b95859734486a92bd448e87c2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-04 13:09:26 +00:00
Joerg Bornemann
5ab8efd66a Make conflicting targets check less strict
People tend to "turn off debug and release builds" by just not building
one of the variants. For example, Qt's own rcc is built in release only,
however it is configured for debug_and_release with the same TARGET for
both.

Let qmake complain about conflicting TARGETs only we're about to build
all of those conflicting targets, i.e. if build_all is set.

Change-Id: I0448bf5cb421e2d801d3cc30e0d80353fba0d999
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-10-03 20:28:03 +02:00
Joerg Bornemann
ce5dc31932 Fix needless resolution of -l LIBS entries on Windows
Do not resolve -l entries to absolute file paths for libraries in the
default search paths.

This restores behavior from 5.12.0 (commit 2327944d) for Windows
system libraries.

Fixes: QTBUG-78827
Change-Id: Ic2d4626df87308dd635afc1ab5c4b8191d3d2831
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-10-03 20:27:48 +02:00
Tor Arne Vestbø
74abe98320 qmake: Place prl files under Resources in framework bundles
The root of the framework bundle shouldn't contain random files,
and doing so will prevent the bundle from being signable.

We still look up prl files in the root, to keep backwards
compatibility.

Change-Id: Ifd0bc3c6e7924e89eec54d3ef9368dfc95ed402c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-03 11:11:20 +02:00
Liang Qi
99cdd5fc67 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/global/qrandom.cpp
	src/corelib/io/qfileinfo.cpp
	src/corelib/kernel/qeventdispatcher_win.cpp
	src/corelib/kernel/qeventdispatcher_win_p.h
	src/gui/text/qfontdatabase.cpp
	src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
	src/plugins/platforms/windows/qwindowsglcontext.cpp
	src/testlib/qtestcase.cpp

Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4893212471aa24be804c989a581810e2f714545c
2019-09-30 14:43:02 +02:00
Joerg Bornemann
21d988a199 Doc: Document CONFIG values that are worth documenting
Fixes: QTBUG-538
Change-Id: Id06e316e7ae3d59b63b256ef565a1ad6dc5d9dd2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-09-27 15:51:25 +02:00
Liang Qi
6572650641 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/widgets/styles/qstylesheetstyle.cpp

Change-Id: If11da7799075cc2d5768da5603c5fc46773c4eae
2019-09-23 08:35:49 +02:00
Leena Miettinen
51f1428d3c qmake: Replace WinRT with UWP in the qmake Manual
Remove info about Windows Phone, which is no longer supported.

Task-number: QTBUG-61884
Change-Id: Ic330f0f19a4e7314dd175f6c492fa25133185517
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-20 09:44:00 +02:00