Commit Graph

166 Commits

Author SHA1 Message Date
Joerg Bornemann
b289d669a5 QMake: Make 'entrypoint' and 'qt' CONFIG values order-independent
If users have
    CONFIG += qt
in their .pro file then the project won't link if the platform requires
the entrypoint module. This is because qt.prf is loaded before
entrypoint.prf in this situation.

Make the CONFIG values 'entrypoint' and 'qt' independent of their order
by embedding the content of entrypoint.prf into qt.prf.

Pick-to: 6.5 6.6
Fixes: QTBUG-117674
Change-Id: I72a3c9be023a73d70454533262544a4211cb6974
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-29 17:22:28 +02:00
Tor Arne Vestbø
311f8157ae iOS: Don't add Qt libraries to PRE_TARGETDEPS of xcodebuild Makefile
Support for PRE_TARGETDEPS was added for iOS applications in
53ac8094b1, even if the Xcode
generator doesn't support PRE_TARGETDEPS, by taking advantage
of the glue Makefile we use to run xcodebuild.

And we add our own Qt libraries to PRE_TARGETDEPS in qt.prf,
as you would expect. But since Xcode supports both debug and
release, we always set debug_and_release for this glue Makefile.

The result is that when computing the Qt library PRE_TARGETDEPS,
we fail to apply a _debug suffix from qtPlatformTargetSuffix(),
since we've enabled debug_and_release.

In a debug only build, this means that 'make' of the glue Makefile
will fail to find the release versions of our Qt libraries.

To work around this we skip adding Qt to the target deps when
generating the xcodebuild Makefile, as we know these libraries
are added to the target in the Xcode project.

Pick-to: 6.5 6.2
Change-Id: Icafc103e34a6f83240fa8187181d885fb0172a86
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-05-10 16:37:47 +02:00
Thiago Macieira
205f8fbff0 CMake: remove tests for C++17 and C11 and earlier
Qt requires them and will fail to build if it isn't met, so we don't
need to check for its support. These were public CMake and qmake
features, so to keep compatibility with existing they're hardcoded now
(only done for the C++ editions and for qmake only, as that's what Qt 5
did).

Change-Id: I7f354474adce419ca6c2fffd174814724f45f90b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-21 06:49:08 -07:00
Tor Arne Vestbø
e2446afaa1 qmake: Resolve target suffix based on Qt build config for static plugins
The qtPlatformTargetSuffix() function is used in various places to
determine the suffix of targets based on the config, which for macOS
will result in a _debug suffix in debug mode.

This becomes tricky when one project built in debug mode tries to depend
on the libraries/plugins of another project (Qt) built in release, as
the qtPlatformTargetSuffix() function uses the current CONFIG as input,
which may be different than the QT_CONFIG (or CONFIG of whatever project
is being depended on).

For libraries this was fixed in 50e664835b
by iterating all known library paths, and trying the CONFIG suffix before
falling back to release version.

For plugins this was never solved, which becomes an issue when linking
to static plugins, either in a fully static build of Qt, or when some
of the plugins are static (permission plugins e.g.).

In this situation, the user project has to have the same configuration
as Qt was built with, to avoid errors like:

 error: no such file or directory: '~/6.x-static/qtbase/plugins/platforms/libqcocoa_debug.a'

To work around this, we assume that a plugin installed into the Qt
tree has the same build configuration as Qt itself, then then use
QT_CONFIG as the determining factor when linking to the plugin.

This still ties the build config of the plugin to the config of Qt,
but relaxes the relationship to the application, allowing it to be
built in either debug or release, which is an improvement to the
current state.

Pick-to: 6.5 6.5.0
Task-number: QTBUG-110356
Change-Id: Icee67fc01313a6c6f34178a6345ccae1b57429d7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-04 16:54:56 +01:00
Timur Pocheptsov
f0a7d74e1d Add permission API backend for macOS and iOS
When submitting applications to the iOS and macOS AppStore the
application goes through static analysis, which will trigger on
uses of various privacy protected APIs, unless the application
has a corresponding usage description for the permission in the
Info.plist file. This applies even if the application never
requests the given permission, but just links to a Qt library
that has the offending symbols or library dependencies.

To ensure that the application does not have to add usage
descriptions to their Info.plist for permissions they never
plan to use we split up the various permission implementations
into small static libraries that register with the Qt plugin
mechanism as permission backends. We can then inspect the
application's Info.plist at configure time and only add the
relevant static permission libraries.

Furthermore, since some permissions can be checked without any
usage description, we allow the implementation to be split up
into two separate translation units. By putting the request in
its own translation unit we can selectively include it during
linking by telling the linker to look for a special symbol.
This is useful for libraries such as Qt Multimedia who would
like to check the current permission status, but without
needing to request any permission of its own.

Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change-Id: Ic2a43e1a0c45a91df6101020639f473ffd9454cc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-03 15:02:36 +01:00
Tor Arne Vestbø
f3cd571687 qmake: Link static plugins even in shared Qt builds
It's perfectly possible to create static plugins in an otherwise shared
Qt build, but the logic to import these plugins into applications was
assuming a fully static Qt build. We now handle this more granularly.

Change-Id: Iacfa72f04c7918613b50ca87cf123e7f4c0841d5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-25 18:02:37 +02:00
Tor Arne Vestbø
6ebc4249e2 qmake: Split up logic for enumerating plugins from how they are processed
Sanitizing the contents of the QTPLUGIN variable, and adding default
plugins from the available modules, should be a separate step before
the resulting QTPLUGIN is iterated and processed by for example linking
to each plugin, generating an import file, and adding module dependencies.

This makes it easier to add logic to the processing step later on.

Change-Id: I00e826c7fe87b29cf2e6bf4e1901c4d1482a20e6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-25 18:02:37 +02:00
Thiago Macieira
396170d07b CMake: fix the word order in "no_direct_extern_access"
And take the opportunity to remove the "m" in the qmake feature name and
.prf file.

Pick-to: 6.4
Change-Id: I36b24183fbd041179f2ffffd170224ab75cdd968
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-20 14:54:20 -07:00
Thiago Macieira
19b7f854a2 Enable -mno-direct-extern-access and ELF protected visibility
The -mno-direct-extern-access tells the compiler and linker that
references to symbols outside this ELF module mustn't be direct and must
instead always go through the GOT or PLT (the PLT can additionally be
disabled with -fno-plt). The ELF protected visibility tells the compiler
and linker that this symbol is present in the dynamic symbol table as an
export, but it cannot be interposed by another ELF module.

This option is required for user code to link properly to Qt, otherwise
they will get linker errors (assuming GNU binutils >= 2.39) or runtime
failures (glibc >= 2.35). Both versions of glibc and binutils are older
than GCC 12, so it's a safe assumption they are in use and downgrading
the toolchain or libc is not supported. Adding this option to the
compilation is assured for CMake and qmake-based projects.

For example, all accessess to QCoreApplication::self in QtCore, after
this change and with GCC 12 are relocation-free and direct:

000000000013ebf0 <QCoreApplicationPrivate::checkInstance(char const*)>:
  13ebf0:       cmpq   $0x0,0x4f73d0(%rip)        # 635fc8 <QCoreApplication::self>
  13ebf8:       setne  %al
  13ebfb:       je     a90fe <QCoreApplicationPrivate::checkInstance(char const*) [clone .cold]>
  13ec01:       ret

Meanwhile, accesses to the same variable in other modules are indirect
via the GOT:

   66650:       mov    0x876e1(%rip),%rax        # edd38 <QCoreApplication::self@Qt_6>
   66657:       cmpq   $0x0,(%rax)

This replaces the -Bsymbolic and -Bsymbolic-functions (broken)
functionality that Qt has been using or attempting to use since ~2006.

See https://gitlab.com/x86-psABIs/x86-64-ABI/-/issues/8#note_606975128

Change-Id: Iad4b0a3e5c06570b9f5f571b26ed564aa0811e47
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-03-10 17:10:57 -08:00
Joerg Bornemann
50e664835b Fix linking of debug projects against release Qt on Darwin platforms
Consider a release-only, non-framework Qt build on macOS.  Building a
debug user project would fail, because qmake tried to link
against *_debug.dylib and *_debug.a libraries.

Building a debug user project that uses QtUiTools against a release-only
framework-build Qt posed the same problem.  QMake tried to link against
the libQt5UiTools_debug.a, which does not exist.

Fix this by maintaining a list of library file candidates, and use the
first existing one (or just the first one if none exists).  This favors
the library matching the user project's configuration but falls back to
the release version of the library if necessary.

Fixes: QTBUG-81251
Pick-to: 6.2
Change-Id: I8d641104718edb16500c6d6e3994e736fa5ddcf4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-25 18:36:13 +02:00
Kai Köhne
c113c88aa2 Move qmlimportscanner to libexec
Task-number: QTBUG-88791
Change-Id: I71150af4965458225e7bbbd72ffc4f60c6854625
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-11 12:35:30 +00:00
Tor Arne Vestbø
6032a9ca1a Allow adding linker flags to qmake module pris
The flags go before the library in the final linker line, as opposed
to the dependencies declared in LIBS.

This allows us to declare the flags for the entrypoint
in the project file of the entrypoint, instead of in
a standalone prf.

Change-Id: I35c054fe9fdaa6add7cd0e8ba3f7304f975ff80f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-03 00:14:04 +01:00
Tor Arne Vestbø
4485f0d626 qmake: Don't warn about using private headers if there are none
Change-Id: I1d9ab0b4d25671931faa469e66cb2beb7bd846fd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-23 20:19:29 +02:00
Joerg Bornemann
b63e99d041 Make configure -force-asserts affect the Qt build only
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>
2020-08-27 22:13:50 +02:00
Joerg Bornemann
dd28aaec6f qmake: Remove "Cannot find library" warnings
Remove the warning message that was introduced in 84f2792597.
It is triggered for debug_and_release projects that are built against
a single-configuration Qt. Silently fall back to the behavior before
84f2792597 like it always was the case.

Change-Id: I67ed1a145ec5d7a4047b0ce5ad43bf0fc6834d60
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-15 10:33:40 +02:00
Joerg Bornemann
84f2792597 qmake: Support .dll.a import libraries for MinGW builds of Qt
CMake's default import library extension for MinGW is .dll.a. The code
in qt.prf that resolves the values of the QT variable expected an .a
extension.

To play well with CMake world we keep the the .dll.a extension for
Qt's libraries and teach qt.prf to handle both. In order to do that we
need to check for the existence of the .a or .dll.a file. If none of
these candidates was found we print a warning and fall back to the old
behavior.

Task-number: QTBUG-84781
Change-Id: If394f2d6acd104deb0c3a49240009a1900a506f7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-11 15:52:26 +02:00
Oliver Wolff
45b0f1be68 Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.

Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-06 20:25:49 +02:00
Kai Koehne
1e17d0e9d7 Remove whitespace for file names generated from TARGET
Task-number: QTBUG-84492
Pick-to: 5.15
Change-Id: I70e79b7a57949e8dfd3781967e775bdea8822e0c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-02 08:07:54 +02:00
Tor Arne Vestbø
ba3b53cb50 Fix scanned resources in static builds
Fixes: QTBUG-81621
Change-Id: Ica23e99054c7b2498bdb1e256c256c8b430938b4
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-05-11 10:24:18 +02:00
Oliver Wolff
85dab30b15 Fix building of autotests for certain configurations
When a configuration is static and has builtin_testdata defined, it was
possible that the "testdata" resource that is generated in testcase.prf was
used for a qmlimportscan directly. This generated test data resource  is no
file though. It's a "qmake struct" that contains files and a base folder
so that we should add every file from the "file list" of that struct.

It is possible, that the generated resource has a base, but no files. Thus
we need two loops or we can end up with a command line that ends with
"-qmldir". If qmlimportscanner decided to warn/error out in this case in
the future this feature could be broken and the point of breakage might
not be obvious.

Change-Id: I2111f594f7d5cf40521b8fe9236a8be9e2ed1b07
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-28 20:04:42 +02:00
Fabian Kosmale
fd72ed794d Consider qml dependencies from qrc files in static builds
qmlimportscanner already has support for qrc files, however the rule in
qt.prf did not pass the required arguments to it so far. In combination
with the declarative registration of types, this broke static linking.

Fixes: QTBUG-82873
Change-Id: I4462645e0b353265f9953807dee73f94923dab9f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-03-18 13:23:24 +01:00
Liang Qi
9d67bf6e96 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/tools/qlocale.qdoc
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I88e0757b2d020f0a244714c87844631df4b3fd13
2019-04-16 09:34:50 +02:00
Oswald Buddenhagen
5b3dfa470e qmake: link qt libraries by full path
this avoids the scenario where the linker would pick up the wrong qt
libraries for LIBS_PRIVATE because LIBS added the "wrong" path first.
this is also consistent with configure-supplied dependencies as of
recently.

as a side effect, this also removes pretenses of lsb linker handling, as
it makes no sense after the change and is certainly obsolete anyway.

Fixes: QTBUG-50921
Change-Id: I84398c9143f393c2eefb3c69a31bd9f633669924
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-15 05:41:08 +00:00
Morten Johan Sørvig
de4f256d48 Wasm: enable thread support
configure.json: Make the “thread” feature be allowed
for wasm but disabled by default.

Change qmake.conf and wasm.prf to enable Emscripten
pthreads mode:
- Add USE_PTHREADS=1 linker flag
- Add PTHREAD_POOL_SIZE linker flag with a default pool size (4).
- Add TOTAL_MEMORY linker flag to set available memory (1GB)

It is possible to override options such as PTHREAD_POOL_SIZE
from the application .pro file using QMAKE_WASM_PTHREAD_POOL_SIZE
To change TOTAL_MEMORY, use QMAKE_WASM_TOTAL_MEMORY

Make qtloader.js work in pthreads mode:
- The Module.instantiateWasm callback must provide the module
  in addition to the instance to Emscripten.
- Set Module.mainScriptUrlOrBlob so that the pthreads web workers
  can access the main script

Task-number: QTBUG-64625
Change-Id: I1ab5a559ec97c27c5fc24500ba5f863bcd275141
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-02-07 16:13:26 +00:00
Tor Arne Vestbø
7044409c87 macOS: Use tool environment to ensure tests load matching Qt libraries
Linking with a framework suffix to pick up the debug version of
libraries doesn't work as long as the dependencies picked up from prl
files are not rewritten to also include the suffix. The result is that
we end up loading both release and debug versions of the Qt libraries.

Use the target environment (target_wrapper.sh) to set the image suffix
instead, which means 'make check' will automatically work.

Change-Id: I60b0840760f68e579c270245d394e1dd609a0ebb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-12 12:18:36 +00:00
Oswald Buddenhagen
e0926ca426 qmake: remove support for pre-5.6 qt module pris
it seems rather obsolete by now.

Change-Id: I43a84367fbe9f82c3adc0e3825d14198e69eaa1f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-20 21:01:16 +00:00
Tor Arne Vestbø
2aef845c03 macOS: Don't link to debug versions of frameworks unless requested
The failure mode of this behavior is worse than the surprises that the
non-explicit library dependency chain has, so it should be opt-in.

This reverts back to the behavior in Qt 5.11, but lets our tests
opt in to the feature.

Fixes: QTBUG-71724
Change-Id: Iede11f02d978b637324ddf71d29e7c99fe3ee99f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-27 07:53:42 +00:00
Tor Arne Vestbø
27239f4fcf macOS: Explicitly link to debug version of framework when needed
When Qt is configured for both debug and release, and frameworks are
enabled, we produce two dynamic libraries inside each framework, eg:

 QtCore.framework/QtCore
 QtCore.framework/QtCore_debug

When building an executable against these frameworks, we pass -framework
QtCore, and the resulting executable will have its LC_LOAD_DYLIB load
commands pointing to e.g.:

  @rpath/QtCore.framework/Versions/5/QtCore

When running the executable, the dynamic loader will load the dynamic
library dependencies based on these load commands.

By setting the DYLD_IMAGE_SUFFIX environment variable at runtime to
'_debug', the dynamic loader will prefer the debug versions of each
library inside the frameworks.

Unfortunately the use of an environment variable to choose debug or
release versions leaves room for mismatches between the executable
and the libraries that are loaded. An executable built in debug
mode will at runtime pick up the release versions of the Qt libraries
unless the DYLD_IMAGE_SUFFIX has also been set to match the build
configuration of the executable.

This results in confusing situations such as building your application
in debug mode, and then stepping into Qt code but not getting any
symbols. Qt Creator has an option to run the application with
DYLD_IMAGE_SUFFIX set, but this is not enabled by default due
to the startup cost of loading the Qt debug libraries.

More critically, it results in tests failing when the tests are using
QTest::ignoreMessage to ignore warnings produced by Qt, and these
calls are ifdefed (correctly) inside QT_NO_DEBUG, as the test
(built in debug mode) will then expect warnings from Qt, but those
warnings are not emittet, as the test is run against the release
version of the Qt libraries.

To mitigate this mismatch, we now link the Qt frameworks using
an explicit suffix, just like we would for no-framework builds
on macOS, for debug and release builds on Windows, and for
normal builds on other Unixes, leaving the dependency chain
for the application predictable:

 @rpath/QtCore.framework/Versions/5/QtCore_debug

This also conceptually matches how Xcode builds applications and
frameworks, where it never relies on DYLD_IMAGE_SUFFIX, and instead
uses two separate build directories, one for each configuration.

The change means that Qt Creator will always load the Qt debug
libraries if the application is built in debug mode. For Qt
development this is a good thing, as you expect to be able to
step into Qt code. For our users, the added startup cost can
be mitigated by shipping our binary packages as release-only,
but with separate debug info enabled.

Change-Id: Ib9f1f2dab90ed00b9fb011200e3a69c71955e399
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-16 10:30:15 +00:00
Oswald Buddenhagen
ab4cc83d52 qmake: ignore QT if we have failed requires()
otherwise the project would need to clear QT despite using
qtHaveModule() in requires() (or REQUIRES=).

Task-number: QTBUG-65106
Change-Id: I568202214c8eafcdbe2d0e253b18f0e171293aff
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-01-12 14:02:07 +00:00
Oswald Buddenhagen
a4e4f89181 fix up static linking of plugins somewhat
move the code before the linking of qt modules - dependency resolution
would re-order them anyway (or static linking would fail).

on the way, fix up the coding style and rename some variables.

the code to de-duplicate/normalize QTPLUGIN is pulled ahead, which means
that the automatic plugin importing wouldn't make a mess of it any more.
but this is mostly legacy anyway.

Change-Id: Id135470d027f5d84b7f30531425a65efa230f278
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-19 21:48:10 +00:00
Oswald Buddenhagen
623b191c10 track plugins' qt dependencies
plugins may pull in additional qt modules which may require additional
plugins in turn.

Change-Id: I22264b39c1397666b2dc9079048ed1fc64aa84d9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:10:46 +00:00
Oswald Buddenhagen
ac740d9d28 statically link plugins for transitive deps' private deps as well
while we already linked the plugins for our own private deps, we failed
to do so for our transitive deps.

this also fixes linking qml plugins if qml is linked only indirectly and
privately.

the code for setting up rpath-link is slightly refactored as a side
effect, with no functional change.

the code for setting up rpath now also sees the longer list of
dependencies, but that's irrelevant, as qtcore always ends up among the
direct deps anyway iff any non-bootstrapped modules are used.

Change-Id: I90dca81a2836c6191ce5d092e16bf7660ee820bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:10:37 +00:00
Oswald Buddenhagen
9576b71fe8 import static plugins also into dlls
static plugins must be actually linked into the target whenever it is
not a static library itself.

apart from fixing qml plugin linkage, this also provides a more generic
fix for the already fixed linking of activeqt controls.

Task-number: QTBUG-28215
Task-number: QTBUG-55279
Change-Id: I9661369bf3dfc6bcf3a5ed563e6716eb3ef6e76e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:10:24 +00:00
Oswald Buddenhagen
d0db09681f prune obsolete qml file deployment
static builds of qt have been embedding their qml files via the qt
resource system since qt 5.7, so the code which attempted to deploy them
into mac bundles (introduced in qt 5.2) is useless nowadays.

Change-Id: I830cd2b660f7cab42a46ec8e002a42d9d299b528
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-12-23 13:25:47 +00:00
Oswald Buddenhagen
fe2f8146d4 prune vestiges of DEPLOYMENT_PLUGIN
the code was broken since 5.0, as it still hardcoded the version number
4 for the plugin basenames.
wince is not supported any more, so there is no point in trying to
restore the code to function.

at a later point, we'll make QTPLUGIN universal enough to cover both
static and dynamic deployment.

Change-Id: I0911ce4aff7a799dd471d6218e046f13dca6d49e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-12-23 13:25:41 +00:00
Oswald Buddenhagen
f91bbd2438 make handling of qml module search path saner
excise knowledge of QTREPOS from qt.prf - this is a private variable of
the qt build system which the public functions should not know anything
about.

instead, move this handling to a function in qt_build_config.prf (where
QTREPOS comes from in the first place), and call it from qt_app.prf and
qt_example_installs.prf (which should be the only consumers within qt).

qt.prf now also checks that the qml install dir actually exists, which
is not the case during a modular prefix build of qtdeclarative.

not really incidentally, this fixes modular static builds of
qtdeclarative.

Task-number: QTBUG-57308
Change-Id: I31465b9cd400483264fc236934c6f9f26a5fdd73
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-25 17:31:02 +00:00
Liang Qi
a732576a66 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	config.tests/win/msvc_version.cpp
	configure.pri
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	src/corelib/io/qsettings_mac.cpp
	src/corelib/json/qjsondocument.cpp
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnswindowdelegate.h
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	src/plugins/platforms/ios/qiosintegration.h
	src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
	tests/auto/gui/painting/qpainter/tst_qpainter.cpp
	tools/configure/environment.cpp

Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
2016-11-01 06:02:55 +01:00
Liang Qi
28628a5d5e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/eglfs/qeglfshooks.cpp

Change-Id: I483f0dbd876943b184803f0fe65a0c686ad75db2
2016-10-22 21:19:57 +02:00
Oswald Buddenhagen
d715667b20 normalize name of plugin default linkage overrides
QTPLUGIN.<foo> is better used with valid variable names, which is not
the case when the plugin type contains slashes (plugin subtypes) or
dashes (just so). normalize these chars to underscores.

Change-Id: Icc93d952b93fef342e2fc93f20e9c5dd010dd734
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-17 13:44:39 +00:00
Oswald Buddenhagen
cd62d2810b make users of qt modules inherit the modules' public QMAKE_USE
when a module makes an external dependency part of its api, the users of
that module need to know the include paths (and possibly defines) of
that dependency, and also need to link to it explicitly if they want to
access symbols from it directly.
this patch implements this via the usual qt module pri mechanism.

limitation: the external library definitions are in the private pris,
so technically a public module is not allowed to make its external
dependencies public. we don't have (and don't anticipate) such a case.

Change-Id: I2dbbdcfcfc1b200acae151a969976cd668e24f89
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-15 18:45:19 +00:00
Liang Qi
7555a92581 Merge remote-tracking branch 'origin/5.7' into 5.8
5971b88e is not needed in new configure.

This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with
apple SDK", 2c9d15d7, because it breaks iOS build with new
configure system.

Conflicts:
	mkspecs/features/default_pre.prf
	mkspecs/features/mac/toolchain.prf
	mkspecs/features/toolchain.prf
	src/dbus/qdbusconnection.cpp
	src/plugins/sqldrivers/mysql/qsql_mysql.cpp
	src/sql/drivers/mysql/qsql_mysql.cpp
	src/widgets/widgets/qmenubar.cpp
	src/widgets/widgets/qmenubar_p.h
	tools/configure/configureapp.cpp
	tools/configure/environment.cpp
	tools/configure/environment.h

Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
2016-09-21 11:57:52 +02:00
Liang Qi
d148019f16 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp

Change-Id: I0af32ee55936d523cbd259b6fe82eb9c409f9074
2016-09-16 23:16:25 +02:00
Vikas Pachdha
46913db2ea Fixes issue with iOS when project path has a whitespace
Task-number: QTBUG-55505
Change-Id: Ic853ecd46a3cb098fff2904119e9002f3add3b8e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-15 10:17:54 +00:00
Lars Knoll
60985aa42b Use qtConfig throughout in qtbase
Use the new qtConfig macro in all pro/pri files.

This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.

Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:05 +00:00
Oswald Buddenhagen
815a41f714 make use of silent error() emission
get rid of the entirely superfluous stock "Aborting." messages -
the event triggering the exit has already reported the problem.

Change-Id: Ib9dfb9e4212f60eceb2ea432cdf56c5a8afe9d65
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-08 09:48:41 +00:00
Edward Welbourne
782ebeada1 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/library/qmakebuiltins.cpp
	qmake/library/qmakeevaluator.cpp
	qmake/library/qmakeevaluator.h
	qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
  changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
  changed the survivor

	src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.

	src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.

	src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.

	src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
	src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.

	tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.

	tests/auto/testlib/selftests/expected_cmptest.lightxml
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/testlib/selftests/expected_cmptest.xml
	tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.

There was no git-conflict in
	src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them.  Put FixedColumnMatrix<>::removeRow(int)
back for its new user.

Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
2016-07-19 20:14:40 +02:00
Edward Welbourne
82ea53ad24 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	qmake/library/qmakeevaluator.cpp

One side changed the iterator to use ranged-for, the other changed its
body; they only conflicted because the latter had to add braces around
the body, intruding on the for-line.  Trivial resolution.

Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
2016-07-15 20:47:57 +02:00
Oswald Buddenhagen
fc57a6587b remove redundant condition from private module use warning
the whole point of the check is ensuring that the message is printed
only once for each sub-project, so !build_pass alone is fully adequate.

Change-Id: Ib8f821ead6709efc9bfa935e1d05f8caba02a814
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-07-13 14:27:04 +00:00
Liang Qi
6357813207 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
	src/3rdparty/double-conversion/include/double-conversion/utils.h
	src/corelib/global/qnamespace.qdoc
	src/corelib/tools/qsimd_p.h
	tests/auto/corelib/io/qfile/tst_qfile.cpp

Change-Id: I3ca1007bab5355d251c13002a18e93d81c254d34
2016-05-03 15:49:15 +02:00
Liang Qi
b94773c9c8 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	config.tests/unix/compile.test
	src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
	src/testlib/qtestcase.cpp
	src/testlib/qtestcase.qdoc

Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
2016-04-13 06:55:37 +02:00