Commit Graph

1218 Commits

Author SHA1 Message Date
Oswald Buddenhagen
75587c8030 qmake: fix look-up of relative files from .depend_command in shadow builds
the dependency paths are fixified against the output directory, so we
must resolve them accordingly.

Change-Id: Id92750aad358153bd2db5daca3194c54eda58dbb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-04-25 18:52:49 +00:00
Tor Arne Vestbø
070aec28e6 qmake: Fix prl lookup for suffixed frameworks on Apple platforms
We need to take into account the presence of a possible ',_debug' suffix.

Change-Id: I5655394b78723bbc6cc32e56849acc2366d288e2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-22 17:10:23 +00:00
Oswald Buddenhagen
1a71fe0306 qmake: fix QMAKE_BUNDLE_DATA for (some) generated files
the source file must not be written with an absolute path to the
makefile, as this won't match the name of the target which generates it,
thus leading to an unsatisfied dependency.

this is the proper fix for QTBUG-60413 and a bunch of others.

amends historical f173e217cd.

Change-Id: I28140351c4b4759de35e60daf63bc54b82d104ec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2018-04-12 15:42:49 +00:00
Joerg Bornemann
0ee5cbb1a4 Set WindowsTargetPlatform[Min]Version if WindowsSDKVersion is set
This fixes qmake-generated project files for Visual Studio 2017 for
setups where the Windows 8.1 SDK is not installed.

Task-number: QTBUG-66265
Change-Id: I67712019f7142e40262f171eb23f9f1e6ab3a251
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-04-06 06:18:00 +00:00
Andy Shaw
44137dc65a XCode: Fix the output paths for extra compilers with fileFixify()
This ensures that the generated XCode project can correctly find any
files that are referenced via a path containing "..".

Task-number: QTBUG-35131
Change-Id: I049bc2279b4c515a82acd61142d25b8c240e8f6e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-17 23:14:23 +00:00
Martin Smith
0f9f716f36 doc: Remove inappropriate qdoc comment markers
Removed the '!' from two comments because the functions being
documented are static functions declared and defined in the
.cpp file. They are not public.

Change-Id: Ie3b2c32c64102634b6b2a4c438da191536a426d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-18 18:25:27 +00:00
Orgad Shaneh
af1a179cc8 qmake: Introduce precompile_header_c for MSVC
MSVC requires that the C PCH file is compiled (as an object) and linked if
any C file is found, and the same for C++.

Most qmake projects are C++.

If a C++ project has a precompiled header, it is typically of C++ type, and
cannot be compiled as C (for example, it contains or includes classes).

Since there is no easy way to conditionally build the C PCH file only if C
files are found in the project (as done for g++), we need a setting that is
disabled by default.

This amends 30331afda1.

[ChangeLog][Tools][qmake] Introduced precompile_header_c CONFIG option for
MSVC to enable precompiled header for C sources.

Task-number: QTBUG-65103
Change-Id: Id9688a35ee7d9b5e4f5a846b81986cb674bc5f4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-08 15:02:21 +00:00
Liang Qi
24fba6744c Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp

Change-Id: Ib6dd965a7eb6f59103e276b3407739147ecd37b2
2018-01-07 14:47:19 +01:00
Jake Petroules
0749ba2c5e Rewrite the Info.plist variable replacement handling
This ensures that the same set of variables can be successfully replaced
in both the Makefile and Xcode generators. It also switches the default
templates to use the Xcode-style ${var} syntax instead of the @var@
syntax for better Info.plist compatibility across generators.

Change-Id: Iff330bafd152773aafac9143c4a34e34f92f0ce6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-06 19:46:00 +00:00
Jake Petroules
1c8224511d qmake: set COPY_PHASE_STRIP to NO in Xcode generator
Since Xcode 6.3, this must be set to NO because stripping on copy is no
longer fully supported due to the potential of input binaries being code
signed. In this case Xcode will simply ignore the strip step and issue
a warning since stripping would invalidate the code signature. This
change silences that annoying warning for release builds. Also, the
setting assignment is moved from being hardcoded in the generator, to
a QMAKE_MAC_XCODE_SETTINGS value.

Change-Id: If25511edddc12b7b0407e2992d80884b7d6437dc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-01-05 23:26:50 +00:00
Jake Petroules
fe72571da8 qmake: replace invalid characters in generated bundle identifiers
This problem does not affect the Xcode generator.

Task-number: QTBUG-65477
Change-Id: I6194edc5b679edad9ae1a25e35b71e5df9bd4c95
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-05 21:19:21 +00:00
Martin Storsjö
8cef809b16 qmake: Handle QMAKE_LINK_OBJECT_MAX being unset for static libraries
This was missed in 8bebded9.

Task-number: QTBUG-63637
Change-Id: I6be472430a9aa8f533def4fd6c14c8dbfe8b6f70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-04 22:41:53 +00:00
Lars Knoll
db92f2f3aa Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	.qmake.conf
	mkspecs/win32-g++/qmake.conf
	src/corelib/global/qglobal_p.h
	src/corelib/global/qoperatingsystemversion_p.h
	src/corelib/io/qfilesystemengine_win.cpp
	src/network/bearer/qbearerengine.cpp
	src/platformsupport/input/libinput/qlibinputpointer.cpp
	src/sql/doc/snippets/code/doc_src_sql-driver.cpp
	src/widgets/kernel/qwidget_p.h
	src/widgets/kernel/qwidgetwindow.cpp
	src/widgets/styles/qfusionstyle.cpp
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp

Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
2017-12-30 12:09:53 +01:00
Jake Petroules
6a2609f379 Stop blocking the ability to generate dSYM debug symbols with Xcode
In Xcode, the default value for GCC_GENERATE_DEBUGGING_SYMBOLS is YES,
which causes Xcode to emit debug symbol bundles (.dSYM) on macOS and iOS
*if* DEBUG_INFORMATION_FORMAT is also set to dwarf-with-dsym. Since that
setting is already set to an appropriate value with debug vs release
builds, the default Xcode value for GCC_GENERATE_DEBUGGING_SYMBOLS is
already correct and in effect the only thing qmake was doing was always
setting GCC_GENERATE_DEBUGGING_SYMBOLS to a wrong value for release
builds - it should be YES in all cases, to allow the .dSYM bundles to
be generated in release mode, which is in fact the only case where
they're really needed in the first place.

Task-number: QTBUG-41246
Task-number: QTBUG-50896
Change-Id: I07639a3c4ff9f62d591cde3ad66748767d475e3b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-12-14 09:39:16 +00:00
Jake Petroules
36984dc8ce Move a QRegExp out of a deeply nested loop
This helps alleviate a performance issues where by building iOS based
projects takes a significantly longer amount of time than it should.

Task-number: QTBUG-59136
Change-Id: I77ae12f507725ceb11106b484d73bb7d46e0845c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-11-23 05:27:33 +00:00
Liang Qi
01afc8c810 Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
2017-10-16 22:21:52 +03:00
Orgad Shaneh
f1838fd692 qmake: Actually resolve QMAKE_SHELL_NULL_DEVICE when writing to Makefile
This is C++, not qmake code. Amends 5fa6438633.

Change-Id: Ie5b88c3a06dbe089948488ea3b4b297a08164113
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-10-16 15:27:43 +00:00
Orgad Shaneh
5fa6438633 Qmake: Introduce and use QMAKE_{SYSTEM,SHELL}_NULL_DEVICE variable, take 2
SYSTEM is used for system() calls, while SHELL is used in the target
Makefiles.

Task-number: QTBUG-62985
Change-Id: Ia75d3939c59c98699359421166433e8b4a6ee35e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-10-13 13:32:36 +00:00
Joerg Bornemann
20e9422e06 Do not ignore exit codes of install commands
All calls to QINSTALL or QINSTALL_PROGRAM were written into Makefiles
with a preceding dash which lets make ignore the command's exit code.
Scripts (and users) calling 'make install' had no way to determine if an
installation completely succeeded, unless they inspected make's output
or the installation tree.

Remove the leading dash from those commands to stop 'make install' on
failure. Users who really want to ignore the exit codes can run 'make -k
install'.

[ChangeLog][qmake] Installation targets do not ignore the exit code of
QINSTALL and QINSTALL_PROGRAM anymore.

Fixes: QTBUG-18870
Change-Id: I7c072c896e6bd2b2ddba4b9c082c5bf627c90f50
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-23 11:06:48 +02:00
Joerg Bornemann
9f77c91522 Sequentialize install targets in debug_and_release builds
Debug/release install targets can potentially install the same files which
leads to errors on install when running make with -j > 1.

If build_all is set, make the 'install' dependent of the new target
'debug-release-install' which contains the commands of 'debug-install' and
'release-install'.

Of course, debug/release is not hard-coded, but the content of the BUILDS
variable is used.

Change-Id: I67b504a95b83daf43bc89dcc0e3391b67e19c027
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-24 11:34:32 +02:00
Friedemann Kleint
518cf3312c Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ia279fc4a8226626041c772902a07b2f90f37b53b
2019-05-27 15:34:10 +02:00
Marc Mutz
4b09d5a78d qmake: remove use of Java-style iterators
They will be deprecated, so qmake wouldn't compile anymore.

Change-Id: I42212fdf213df696d736ed34458f7e79bd902dd5
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-05-21 08:58:35 +02:00
Joerg Bornemann
0e71db3c8e Deduplicate initialization code for default variables
Use the writeDefaultVariables method also for the
Win32MakeFileGenerator. Remove the initializations that are already done
in Makefile::writeDefaultVariables.

Change-Id: I590cc5d7031de67dd830e6113849ab080dbf2325
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-16 11:36:36 +00:00
Joerg Bornemann
43a66453c5 Clean up class definitions of makefile generators
Remove pointless constructors and destructors.

Change-Id: I7aea8587bf3598b6f5324aac8898edf227475d63
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-16 11:36:22 +00:00
Liang Qi
388fe97f2a Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/tools/qstring.cpp

Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
2019-05-13 08:04:58 +02:00
Lars Knoll
92f9842732 Deprecate conversion functions between QList and QSet
Users should use range constructors instead to do the conversion.
Keep conversion methods between QList and QVector as these will turn
into a no-op in Qt 6, whereas forcing people to use range constructors
would lead to deep copies of the data.

Change-Id: Id9fc9e4d007044e019826da523e8418857c91283
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-07 14:15:44 +00:00
Lars Knoll
343528841e Prefix textstream operators with Qt::
As the non prefixed variants are deprecated

Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:02 +00:00
Liang Qi
dc37318684 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/gui/util/qshaderformat.cpp
	src/gui/util/qshaderformat_p.h
	src/widgets/graphicsview/qgraphicsitem_p.h

Change-Id: Idafd88eb9a0a15b4af29f6143d009c1ec8ceecca
2019-04-24 09:52:30 +02:00
Samuel Gaist
e2906ea5c4 QRegExp include cleanup
QRegExp includes can be found in several files where there's not even a
use of the class. This patch aims to avoid needless includes as well as
follow the "include only what you use" moto.

This patch removes a QRegExp include from the QStringList header which
means that there is likely going to be code breaking since QStringList
is used in many places and would get QRegExp in.

[ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no
longer includes qregexp.h.

Change-Id: I32847532f16e419d4cb735ddc11a26551127e923
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-19 21:21:17 +00:00
Liang Qi
112a4af107 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	examples/examples.pro
	qmake/library/qmakebuiltins.cpp
	src/corelib/global/qglobal.cpp
		Re-apply b525ec2 to qrandom.cpp(code movement in 030782e)
	src/corelib/global/qnamespace.qdoc
	src/corelib/global/qrandom.cpp
	src/gui/kernel/qwindow.cpp
		Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08)
	src/network/ssl/qsslkey_openssl.cpp
	src/plugins/platforms/android/androidjniinput.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/widgets/widgets/qmenu.cpp
	tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp

Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
2017-08-31 14:31:31 +02:00
Orgad Shaneh
30331afda1 MSVC: Support precompiled header also for C files
It was already done correctly in the GCC generators, but lacked in MSVC.

Task-number: QTBUG-11117
Change-Id: I5e6c2e4802dbe33c0f15c46a227a08c3f0cc5707
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-28 07:28:01 +00:00
Oswald Buddenhagen
ce5e6876d4 qmake: make more use of ProString built-ins
saves some noisy toQString() uses.

Change-Id: I62a9e2725c4baabac311124d19c7d8b40f54c8f7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-26 12:11:49 +00:00
Edward Welbourne
515b905150 Adapt qmake's raw-string parser to avoid confusion by macros
A macro name ending in R might expand to a string; if this precedes a
string constant, we're juxtaposing the strings.  My first parser for
raw strings would mistake it for a raw string instead, ignoring the
part of the identifier before R.  Re-worked the exploration of what
came before the string to catch these cases, too.

The backwards parsing would also allow any messy jumble of [RLUu8]* as
prefix for the string; but in fact R must (if present) be last in the
prefix and *it* can have at most one prefix, [LUu] or u8.  Anything
else is an identifier that happens to precede the string.  Reworked
the parsing to allow only one prefix and not treat R specially unless
it's immediately (modulo BSNL) before the string's open-quotes.

Add link to the cppreference page about string literals, on which the
grammar now parsed is based.

Added a test for the issue this addresses.
Verified that this fails on 5.6, dev and 5.9 without the fix.
Expanded the existing test to cover R-with-prefix cases.

Task-number: QTBUG-55633
Change-Id: I541486c2ec909cfb42050907c84bee83ead4a2f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-24 14:27:50 +00:00
Joerg Bornemann
5f7287cfb6 Add MSVC manifest backup file to "clean" target
The $${TARGET}_manifest.bak file was not removed on "nmake clean".

Task-number: QTBUG-59827
Change-Id: Ia5b636f4917f3e7a2df8d753824b72e63d278005
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-18 10:46:59 +00:00
Liang Qi
106d3b9bf9 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoamenu.h
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/widgets/styles/qstylehelper_p.h

Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
2017-08-15 16:31:48 +02:00
Oswald Buddenhagen
8bebded9ab qmake: don't limit command line length when not actually on windows
QMAKE_LINK_OBJECT_MAX is actually a property of the host, not the
target.

this works around binutil's inability to use thin LTO objects in
conjunction with an MRI script
(https://sourceware.org/bugzilla/show_bug.cgi?id=21702).

Task-number: QTBUG-61335
Change-Id: I90a1334b9c905c433b35546e8f3f3b5089d2c65b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-15 10:55:52 +00:00
Oswald Buddenhagen
ee07b912a1 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/plugins/platforms/xcb/qxcbconnection.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
	src/plugins/styles/mac/qmacstyle_mac.mm
	src/widgets/widgets/qdockarealayout.cpp
	src/widgets/widgets/qmainwindow.cpp
	src/widgets/widgets/qmainwindowlayout.cpp
	src/widgets/widgets/qmainwindowlayout_p.h
	tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
	tests/auto/other/macnativeevents/BLACKLIST
	tests/auto/widgets/widgets/qmenu/BLACKLIST

Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
2017-08-02 22:52:32 +02:00
Jake Petroules
6e2eeee7f5 qmake: fix warning about duplicate references in project file
Task-number: QTBUG-59301
Change-Id: I2562b862465a52ecc56f551bcdb98fa7279ebfcf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-07-20 21:24:29 +00:00
Oliver Wolff
06b5e4d706 qmake: Remove last remains of WinCE support
Change-Id: Ifc2ecee8464710efd02a38b3a9794104f15a0f04
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-19 10:20:43 +00:00
Oliver Wolff
429d726322 winrt: qmake: Fix deployment rules of created solution files
If these rules are not added to the solution, Visual Studio will
complain, that the project has to be deployed before it can be run.

Change-Id: I6d3fbc949c85b11a92f78e13e2f6a1b92a5cfdc7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-19 10:20:38 +00:00
Gabriel de Dietrich
d38fe875c7 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
    src/widgets/widgets/qmainwindowlayout.cpp

Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
2017-07-13 16:36:10 -07:00
Orgad Shaneh
e10be52e21 qmake: Separate object_script by Makefile name
If several Makefiles are used in the same directory (for example, for
multiple projects in the same directory or different build configurations),
they all reference the same object_script, which is obviously wrong.

Change-Id: I9b499ceb6b6bd6058f54b452fa44bfb2313eec26
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 08:11:44 +00:00
Liang Qi
c2b224a758 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qprocess_unix.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/widgets/util/util.pri
	tests/auto/corelib/thread/qthread/qthread.pro
	tests/auto/corelib/thread/qthread/tst_qthread.cpp

Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
2017-07-04 16:05:53 +02:00
Liang Qi
ce09ef4313 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/plugins/platforms/android/qandroidplatformintegration.h
	src/plugins/platforms/windows/qwindowscontext.cpp
	src/plugins/platforms/windows/windows.pri
	src/tools/uic/cpp/cppwriteinitialization.cpp
	src/widgets/doc/src/widgets-and-layouts/gallery.qdoc

Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
2017-06-19 16:12:34 +02:00
Andy Shaw
b2cb83ecbb Pass the absolute path with the file when finding files
When generating a project, the directories can be specified as arguments
to the qmake call. As a result files can either be incorrectly added to
the project with a leading slash, or can end up duplicated. By passing
the absolute path with the file, it ensures that the file is added
correctly and no duplicates occur as a result.

Task-number: QTBUG-48342
Change-Id: If774de8d7f5cceca80042a25a3aa4e5b045249da
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-19 08:39:40 +00:00
Orgad Shaneh
f5f772849c qmake: Delete static library before calling ar on MinGW
This was already done on unix, but not for MinGW.

If the archive already exists, it is appended rather than replaced.

This can cause invalid references when whole-archive linking is used
and some object file that was already linked was deleted.

Change-Id: Ie265371f197d996d57002b248043736544ee641e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-12 10:47:27 +00:00
Orgad Shaneh
9ac4a9ef26 qmake: Fix initialization order in VcprojGenerator ctor
Detected by clang

Change-Id: I17b49b1737ca4a9ab6608a5d8701a9e1c50af5ae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-12 10:47:23 +00:00
Orgad Shaneh
67f9a8c57b qmake: Use braces for struct initialization in MSVC object model
Detected by clang

Change-Id: I4c5fbdb402f55ce40e84a6a40ead6c32a60cfa22
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-06-12 10:47:19 +00:00
Orgad Shaneh
d71761ec1f qmake: Delete unused variables in MSBuild object model
Detected by clang.

Remove also comments that reference unused variables.

Change-Id: I6de54d96cd23b93eed6d109629a9462b7770e94e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-12 10:47:13 +00:00
Orgad Shaneh
7f5635cbb1 qmake: Avoid raw string comparison
Detected by clang.

Change-Id: I4c734d1af77a331d178ce91610ab08a8048fe410
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-06-12 10:47:08 +00:00
Liang Qi
7cbee56296 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/widgets/widgets/qmenu.cpp

Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
2017-06-07 14:02:43 +02:00
Oswald Buddenhagen
5afde92bd7 make mkspecs not mess up -rpath-link
adding shared install paths via QMAKE_LFLAGS in the spec has the tiny
side effect that they are searched _first_, which is generally a really
bad idea - they should be _last_.

for that purpose, introduce QMAKE_RPATHLINKDIR_POST, and migrate all
specs to use it.

QMAKE_RPATHDIR_POST is added for consistency, but not actually used.

Task-number: QTBUG-59457
Change-Id: Iac6cda5e9111ef8cca454a69861fe8408bb40589
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-31 12:57:14 +00:00
Oswald Buddenhagen
6dcd944dee make mkspecs not mess up library and include search paths
adding shared install paths to QMAKE_{INCDIR,LIBDIR} in the spec has the
tiny side effect that they are searched _first_, which is generally a
really bad idea - they should be _last_.

for that purpose, make QMAKE_{INCDIR,LIBDIR}_POST live up to their names
(i.e., search them actually last) and migrate all affected specs to use
them.

Task-number: QTBUG-40825
Change-Id: Ie0de81c3cc49e193186d2fedd7d6c77590c8ef79
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-31 12:57:09 +00:00
Liang Qi
6a772fd201 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	.qmake.conf
	mkspecs/common/msvc-desktop.conf
	mkspecs/win32-g++/qmake.conf
	mkspecs/win32-icc/qmake.conf
	src/platformsupport/fontdatabases/mac/coretext.pri
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm

Change-Id: I74a6f7705c9547ed8bbac7260eb4645543e32655
2017-05-29 10:54:41 +02:00
Joerg Bornemann
9609e2945c Remove leading whitespace from command lines in VS projects
Change-Id: I9888e5cce4fe82a27c823e7a0d345f1af839ca97
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-23 17:27:27 +00:00
Joerg Bornemann
808cc8853b Fix parsing of MSVC's /utf-8 option, take 2
The dash was missing. This commit amends 70e772079.

Task-number: QTBUG-59431
Change-Id: I18f3519a502ca57336cafad574f8738f2e717740
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-23 17:25:50 +00:00
Joerg Bornemann
39c835b9c5 Do not warn about unknown MSVC compiler conformance options
Every /Zc:XXX option qmake doesn't know about yields a "WARNING: Could
not parse Compiler option '-Zc:XXX'; added to AdditionalOptions."

Put all /Zc:XXX options we don't handle into AdditionalOptions without
printing a warning. There's no point in making all options known to
qmake and updating them for every MSVC release.

Change-Id: I319e027791a7b0a29d139ee3074ab1aed8ce8a63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-23 06:55:17 +00:00
Liang Qi
d1ea481345 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/network/access/qnetworkreply.cpp
	tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp

Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
2017-05-07 13:08:18 +02:00
Simon Hausmann
50acc86804 Simplify built-in qmake install command
As the directory installation command also works with files as a source
we can unify the external commands, resulting in simpler command lines.

Change-Id: I65013626eedbdb3ce1c77ed230d46edd1603b986
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-04 09:40:48 +00:00
Oliver Wolff
9baf7bad59 VS 2017: Fall back to "x86" as arch if it is not "arm" or "x64"
The same as for other visual studio versions use "x86" as arch instead
of win32. arch is used to determine library paths and these use x86 and
not win32.

As compilerArch is not used in MSVC 2017 it can be removed.

Task-number: QTBUG-60530
Change-Id: I47157eb1d7ae9d913461210d34858ffb37c81586
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-05-03 06:52:29 +00:00
Simon Hausmann
c12b96daf2 Preserve last modification timestamps of installed directories
Similar to the two parent commits, this patchs preserves the time stamps
of files we install as a result of recursive directory copying.

Change-Id: Id5931a467196d5cd67acfa0deffc2488af8a3669
Task-number: QTBUG-59004
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-02 10:27:15 +00:00
Simon Hausmann
0942f44454 Fix make install to be deterministic
The result of "make install" should be the same regardless of whether it
has been run multiple times and the destination exists already. This is
done by making the file installation calls always take canonical source
and target paths and not look at the target directory.

Task-number: QTBUG-60370
Change-Id: I83a584c0dbc4fd10c79976d4169bf6bc051884a1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-28 13:46:44 +00:00
Marc Mutz
7d4bf142d7 QUuid: add fromString(QStringView/QLatin1String)
As for the formatting code, de-duplicate the parsing code by only
parsing char*s, converting QChars to Latin-1 first in a small buffer.

The QUuid(const char*) ctor performed no length checking, relying
instead on the checks performed within _q_uuidFromHex(), which
includes an implicit check for premature end (because NUL is not
a valid token for the parser).

The (QString) and (QByteArray) ctors did perform length checking.
To the extent possible, this is removed, since it is handled by
_q_uuidFromHex(). Failure cases need not be optimized. Only the
QLatin1String overload needs to do some checking, because views in
general are not NUL-terminated. The QStringView overload can just
append a NUL when it converts to Latin-1.

The only check I added to _q_uuidFromHex() is that for src ==
nullptr. It would otherwise be duplicated in several callers.

While touching the internal functions, port to passing and returning
by value.

Saves 1.6KiB in text size on optimized GCC 6.1 Linux AMD64 builds,
even though we added new API.

Port some users to the new functions. Expand fromString() test.

[ChangeLog][QtCore][QUuid] Added fromString(QStringView/QLatin1String).

Change-Id: I519339419129550c86e0ea80514865cd6a768f5d
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-20 17:02:44 +00:00
Jake Petroules
097073fa67 Fix precompiled headers on Apple platforms, with multiple architectures
The original commit only added support for GCC and Clang, but not ICC.

Amends 73331eeb

Change-Id: Id7638cf1b538edb1008fb3aa10754c1f517a994f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-14 00:00:56 +00:00
Simon Hausmann
f074d72c8f Preserve last modification timestamps of installed program files
Similar to the parent commit, this patch adds a unified code path in
qmake itself for installing program files while preserving their
original last modification timestamp.

Change-Id: I7b7dcfa6228c2bfd48ea6036549398bb6f90032f
Task-number: QTBUG-59004
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-13 11:33:21 +00:00
Liang Qi
94c576cf66 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I3bd83a839b16822035ed56a5cffe77bd6bc3f08d
2017-04-12 20:08:56 +02:00
Simon Hausmann
2ad7f6ddf5 Preserve last modification timestamps of installed files
On non-windows platforms, we use the "-p" parameter of install(1) to
preserve the last modification timestamps of files. On Windows the use
of copy does not preserve them. As a cross-platform solution, this patch
introduces a simple built-in install command in qmake to copy files.

Task-number: QTBUG-59004
Change-Id: I3064d29a2b8c7b009a1efbf8f00b84c079ea5417
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-12 15:50:51 +00:00
Oswald Buddenhagen
05b3295a57 write Libs.private to .pc files only in static builds
projects using a dynamic build are not supposed to access this variable
anyway.

Task-number: QTBUG-51598
Change-Id: I81b55ea9ba460b80919f40ed7fe3d52129636b9e
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Reviewed-by: Jonathan Liu <net147@gmail.com>
2017-04-11 11:19:01 +00:00
Joerg Bornemann
02d9225db5 Fix uninitialized VCLinkerTool::DebugInfoOption
Due to that uninitialized variable /DEBUG:FASTLINK ended up in vcxproj
files for VS < 2015. However, that option is supported by VS >= 2015
only.

Task-number: QTBUG-59630
Change-Id: I34d9eef1a3bf2262bac48962938afe84eb7de934
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-22 16:15:15 +00:00
Joerg Bornemann
70e772079f Fix parsing of the /utf8 MSVC compiler flag in VS project generator
Adding the /utf8 compiler flag resulted in undefining all preprocessor
symbols for VS project files, because the ingenious compiler option
parsing logic checked for a 'u' prefix, and "utf8" obviously matched.

The /utf8 flag is added to the additional options, because there doesn't
seem to be an XML tag for that.

Task-number: QTBUG-59431
Change-Id: I762fcdcf6caf0606b40633861e265df5edb4a9c4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-13 16:43:21 +00:00
Vikas Pachdha
f06f1adb6c Add QMake variables for development team and provisioning profile
Adding both development team and provisioning profile to Xcode
switches off the automatic signing

Task-number: QTBUG-38782
Change-Id: Ic869e16490c11e369b6674c815e860cac66c5afa
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-13 06:42:15 +00:00
Joerg Bornemann
a12a3c6c8c Fix MSVC Makefiles when SOURCES is empty
Call sites of NmakeMakefileGenerator::writeResponseFileFiles expect that
the output is terminated with '\n'. Do not bail out if files is empty.

Task-number: QTBUG-59305
Change-Id: Id3fef8dbc506dad1868e6b352119f5f27b50a368
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-07 13:54:57 +00:00
Joerg Bornemann
1b46872cde qmake/nmake: Prevent overlong lines in link and lib response files
Linking with too many object files could lead to "LNK1170: line in
command file contains 131071 or more characters". Do not write all .obj
files into one line but respect a limit of 1000 characters. If the limit
is reached the object files are separated by newlines instead of spaces.

Task-number: QTBUG-58710
Change-Id: Ibae1f737d6b614a9624b4e00cdd21d3722d341e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-13 14:48:15 +00:00
Liang Qi
dd756011da Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	configure.json
	mkspecs/win32-icc/qmake.conf

Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
2017-02-08 15:49:18 +01:00
Oswald Buddenhagen
4adc1012e1 add a bunch of complementary options to -after
in particular, -before (just for symmetry, as it's the default), -early
(the actual objective), and -late (for symmetry again).

Change-Id: I274303582a348b052c3e5106ff360ab4fd7d4ee2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-06 16:34:17 +00:00
Oswald Buddenhagen
dcd5cb9736 Merge remote-tracking branch 'gerrit/dev' into HEAD 2017-02-01 21:00:55 +01:00
Jake Petroules
944110089d Build Qt libraries with -fapplication-extension
This ensures at compile-time that Qt libraries do not use any APIs that
are not safe for use in application extensions, and fixes warning
messages that appear when linking to Qt libraries that are not built
with this flag, when used in an application extension.

This is especially important on watchOS where *all* "applications" are
actually application extensions, and on other Apple platforms if
application extensions are developed using Qt.

Task-number: QTBUG-40101
Change-Id: I022046f2584e0222253d33052b0abc221d7c93d6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-01-27 22:10:01 +00:00
Liang Qi
318b58562a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	.qmake.conf
	mkspecs/common/msvc-desktop.conf
	mkspecs/common/msvc-version.conf
	mkspecs/common/winrt_winphone/qmake.conf
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/qt.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/winrt/default_pre.prf
	mkspecs/winphone-arm-msvc2013/qmake.conf
	mkspecs/winphone-x86-msvc2013/qmake.conf
	mkspecs/winrt-arm-msvc2013/qmake.conf
	mkspecs/winrt-x64-msvc2013/qmake.conf
	mkspecs/winrt-x86-msvc2013/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/network/kernel/qhostaddress.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.h
	src/widgets/util/qsystemtrayicon.cpp
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
	tools/configure/Makefile.mingw
	tools/configure/Makefile.win32

Done-with: Jake Petroules <jake.petroules@qt.io>
Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
2017-01-25 20:06:06 +01:00
Jesus Fernandez
decab46c23 Fix qmake -project in an empty folder
Avoids iterating over the entire filesystem.

Task-number: QTBUG-57569
Change-Id: If089842553978843de73559d1b1a567aa322a047
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-23 13:20:42 +00:00
Orgad Shaneh
fa6444939c Support QMAKE_PRE_LINK and QMAKE_POST_LINK for static libs on unix
prelink was not supported at all for ar.

postlink was done for most cases, but missing in one particular ar
invocation.

Task-number: QTBUG-57276
Change-Id: Ic72c42a9502c97d7111b3f3941b387024d46a27d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-20 17:05:33 +00:00
Oliver Wolff
d9203fa534 winrt: Add support for Visual Studio 2017
Tested with RC

Task-number: QTBUG-57086
Change-Id: I57ecfd0751538dcba41ebaf028de1bc5b4debbb7
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-01-20 13:09:16 +00:00
Maurice Kalinowski
d3eec16862 Remove support for WinRT 8.1 and Windows Phone 8.1
[ChangeLog][QtBase][General] Removed support for WinRT/Windows Phone 8.1.

Task-number: QTBUG-57288
Change-Id: Ifd6d6780cbbdb710d99556ba3d2fb2e514d4f789
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-01-18 12:38:56 +00:00
Jake Petroules
b9887f3d9a Remove dead code in Xcode generator
These code paths have not needed to be exercised since Xcode < 3.2 was
dropped from support, which is beyond ancient at this point.

Incidentally, this removes use of a deprecated function.

Change-Id: I3e5a45794c21b434b31a48da8a8b0ff22f2852fa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-18 05:15:05 +00:00
Andrew Patterson
8b64f93362 Ensure that RC_FILE is correctly handled in a single configuration
When generating the Visual Studio project XML, the filter "Root Files"
was not being output. Specifically, this means that even if RC_FILE was
specified, it would not be included properly as a resource compilation
target in the resultant Visual Studio project file.

This is essentially a rather belated cherry-pick of qt/d6de960b7f.

Task-number: QTBUG-57914
Change-Id: I7d03dc818df0cf36608012f1a71a3a476d8a9ff7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-11 14:30:01 +00:00
Oswald Buddenhagen
34cc41d8a1 don't pass qmake configure arguments to sub-projects
the arguments after '--' are by definition meant only for the top-level
project, as that's where configure is invoked from. passing them to
sub-projects just adds noise to the make output and misleads users.

note that this specifically does not support qmake -r, which will break
if the subprojects rely on the arguments being absent. this isn't a
problem, because the qt build doesn't support qmake -r anyway.

Change-Id: I7ecff6212ce3137526005fc324a4a7ae45e3345e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:09:18 +00:00
Oswald Buddenhagen
9b68bc4147 move "shared" registry reading code into qmake
now that configureapp does not use it any more, qmake is the only
remaining user. and the license headers already claimed that this code
is part of qmake ...

Change-Id: I9b8a16f8f2b432d2b1143efbdd1f0042305ccc0c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-23 13:45:50 +00:00
Joerg Bornemann
88a02c4d63 Remove ToolsVersion from generated VS projects for VS >= 2013
Before VS 2013 ToolsVersion contained a .NET version
number (e.g. "4.0"). Since VS 2013 ToolsVersion is the same as the
Visual Studio version number (e.g. "12.0"), which is also the default.

We always wrote "4.0" (except in one special case which used
"14.0"). This doesn't bother Visual Studio itself, but other tools
like PVS-Studio.

Remove the ToolsVersion attribute from generated VS projects for VS
2013 and newer.

Task-number: QTBUG-57694
Change-Id: I7a3bc4534c492e9540f6b968bee8a969980df63f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-21 16:35:49 +00:00
Joerg Bornemann
5fc2337d74 Fix unnecessary regeneration of mocables in VS projects
Change dcd2f829 introduced fake files with the extension .cbt for custom
build tools that generate code from C++ source inputs. The moc_predefs.h
header file falls into this category, because it is generated from
dummy.cpp.

It turns out that these fake files have to exist. Otherwise the
custom build step is executed on every build. That means re-moccing all
mocables on every build.

Fix this by actually creating the fake .cbt files with some
explanatory comment in them.

Task-number: QTBUG-57695
Change-Id: I251294334425d9914677787d8ba6da1169b4cca5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-12-21 16:35:22 +00:00
Joerg Bornemann
29a929668b Fix capitalization of <PlatformToolset>
This tag was never spelled "PlatformToolSet". The correct spelling
is "PlatformToolset" (lower case s). VS itself can load qmake-generated
projects despite this misspelling, but tools like PVS-Studio are
bothered by it.

Task-number: QTBUG-57435
Task-number: QTBUG-57694
Change-Id: Ib70e8561f1827e195194bcf518445b2909a8d8c0
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-20 09:36:24 +00:00
Liang Qi
b131503361 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure
	configure.pri
	examples/widgets/painting/fontsampler/mainwindow.cpp
	examples/widgets/painting/fontsampler/mainwindow.h
	mkspecs/features/moc.prf
	src/corelib/global/qglobal.h
	src/gui/text/qtextdocument.cpp

Change-Id: Ica65512e00871695190a14ccea5c275b0165f787
2016-12-16 16:38:33 +01:00
Liang Qi
9bfe3ab71e Merge remote-tracking branch 'origin/5.8.0' into 5.8
Conflicts:
	doc/global/qt-cpp-defines.qdocconf
	src/plugins/platforms/android/qandroidplatformopenglcontext.h
	src/plugins/platforms/android/qandroidplatformtheme.h

Change-Id: I13d51cc66f708138ff4d667ceea7d515992e58a4
2016-12-16 09:45:16 +01:00
Edward Welbourne
5b1f18b0f1 Fix typo in autogenerated *.pro file comment
The phrase "which as been" lacked an h (albeit one silent in some
anglic dialects).  The added letter made an already long line stick
out just a little more.  Judicious rephrasing of the early part of its
sentence made reflow a way to fix that.

Change-Id: I29c2ac79d08a135dd4a16518f459872c8ecd1f24
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-13 15:05:22 +00:00
Liang Qi
6755ec891a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure
	qmake/Makefile.unix.macos
	qmake/Makefile.unix.win32
	qmake/generators/win32/msvc_vcproj.cpp
	src/3rdparty/pcre/qt_attribution.json
	src/corelib/io/qsettings.cpp
	src/corelib/kernel/qdeadlinetimer.cpp
	src/platformsupport/kmsconvenience/qkmsdevice.cpp
	src/platformsupport/kmsconvenience/qkmsdevice_p.h
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h
	tests/manual/qstorageinfo/printvolumes.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
2016-12-13 09:39:20 +01:00
Liang Qi
cae32bd04d Merge remote-tracking branch 'origin/5.7' into 5.8.0
Change-Id: I576187a9905802c177ae483e6c29d0f55cf7034d
2016-12-08 08:20:36 +01:00
Oswald Buddenhagen
019c932ca9 unbreak "aux" template for mingw & msvc, take 3
eliminating everying TARGET-related was a nice try, but in the real
world (e.g., qttranslations), extra compilers are activated by
PRE_TARGETDEPS, which of course doesn't work when TARGET is entirely
gone.
so instead, let it act as a phony target. this is consistent with the
unix generator.

supersedes 0810d48bc in amending af2847260.

Task-number: QTBUG-57423
Change-Id: I3d2ecc4ff42b37ffe5f71f5c20d17c06b31f4da2
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-12-07 06:54:04 +00:00
Joerg Bornemann
5f6800c220 Do not write empty custom build tool on VCConfiguration level
This is superfluous.

Change-Id: Iac96938c6a7e899244534747a2f8a60bdbbdeb62
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-12-02 10:03:31 +00:00
Joerg Bornemann
b83884a4e6 Remove superfluous VCFilterFile::operator==
The default-generated operator is fine.

Change-Id: I9acb310aaf551d8da3c0fd9aea65d77ee62a45b4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-02 10:03:25 +00:00
Joerg Bornemann
b4c7d4f4b3 Remove unused VCFilterFile::additionalFile
Change-Id: I67716404d38f41ee4f558dc5d82c9ae80a6956f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-02 10:03:16 +00:00
Joerg Bornemann
dcd2f82951 Fix circular dependencies in generated vcxproj files
For QMAKE_EXTRA_COMPILERS with inputs that are "buildable" (e.g. C++
sources) the custom build step is added to the output file. From Visual
Studio's point of view this looks like a circular dependency (e.g.
foo.moc generates foo.moc). Usually this just prints a warning that can
be ignored. But this circular dependency also breaks dependencies
between custom build steps. This became noticeable when the generation of
moc_predefs.h was added. Generating moc_predefs.h must be done before
any moc custom build step is executed.

This patch fixes the issue by using fake files (output file plus suffix
".cbt" for "custom build tool") that act as dummy inputs for the custom
build tools.

Task-number: QTBUG-16904
Task-number: QTBUG-57196
Change-Id: I4711e44a0551046d215db151fa0312af8a9177a2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-12-01 05:07:08 +00:00
Oswald Buddenhagen
e3ca4287d9 qmake: fix execution of depend_command in directories with funny names
it's wrong to use the escape function for makefiles, as the command
goes directly to a popen() call.

Task-number: QTBUG-57343
Change-Id: I34a8e4d8fb406303c593e7c1e24019e0f756e7f8
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-30 17:05:01 +00:00
Joerg Bornemann
fe0b91879b Fix type of VcprojGenerator::extraCompilerOutputs
The values of this hash are strings, not lists of strings.
Enforce this by using the proper type instead of just using a comment.

Change-Id: Id8a13acdceb8f9f8a9a8eaa04e790b1e6cd5faa7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-30 08:28:55 +00:00
Liang Qi
bce25a6340 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/gui/painting/qcoregraphics.mm
	src/gui/painting/qcoregraphics_p.h
	src/plugins/platforms/cocoa/qcocoahelpers.h
	src/plugins/platforms/cocoa/qcocoahelpers.mm

Change-Id: Ibe5efcae73526b3d3931ed22730b13d372dcf54e
2016-11-25 14:41:29 +01:00
Liang Qi
50aeedd86c Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/features/qml_module.prf
	src/corelib/tools/qdatetimeparser_p.h

Change-Id: I5382cee3ddb33107dc61ee20f7a9188c4a68a882
2016-11-25 10:32:29 +01:00
Liang Qi
4783de0473 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/network/socket/qnativesocketengine_winrt.cpp
	tools/configure/configureapp.cpp
	tools/configure/environment.cpp

Change-Id: Ieae6f2ee004a87f041751852b687484f91ee4480
2016-11-24 10:31:21 +01:00
Oswald Buddenhagen
0810d48bc4 unbreak "aux" template for mingw & msvc, take 2
of course, we should stub out everything related to TARGET - only the
generic "all" and "first" targets including their deps should be
emitted.

amends af2847260.

Change-Id: I8ed7a550b8022c69328d2e16dbd078928d176964
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-23 13:53:47 +00:00
Oswald Buddenhagen
5b05c37845 qmake: fix up dist targets for mingw & nmake somewhat
actually pack the extra compilers' input files, not the variable names.

unlike on unix, we don't create an actual distdir, so the package is
still going to be rather broken.

Change-Id: If0a15bbe9db95aebd88c2a21ca3c0f787ce5c7e1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-23 13:53:42 +00:00
Liang Qi
38c1057f69 Merge remote-tracking branch 'origin/5.6' into 5.7
This also reverts commit 0d2f0164f4.

Conflicts:
	header.BSD-NEW
	qmake/Makefile.win32
	src/openglextensions/qopenglextensions.cpp
	src/openglextensions/qopenglextensions.h
	src/winmain/qtmain_win.cpp
	src/winmain/qtmain_winrt.cpp
	tools/configure/configureapp.cpp
	util/glgen/qopenglextensions.cpp.header
	util/glgen/qopenglextensions.h.header

Change-Id: If26c6f4111b342378dd88bbdc657e322d2ab6ad8
2016-11-23 09:24:36 +01:00
Oliver Wolff
38675e18fc Add support for Visual Studio 2017
Tested with RC

Task-number: QTBUG-57086
Change-Id: I21f56edca3852b52edd2c5fdcce76817141e8d4a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-22 06:07:23 +00:00
Liang Qi
e5ac4afbf9 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/uikit/default_post.prf

Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
2016-11-17 14:43:26 +01:00
Liang Qi
90c425642d Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/common/linux-android.conf
	src/gui/opengl/qopengl.h
	src/network/socket/qnativesocketengine_winrt.cpp
	src/network/socket/qnativesocketengine_winrt_p.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
	sync.profile

Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
2016-11-16 12:35:36 +01:00
Oswald Buddenhagen
4e96c4c533 qmake: fix file name treatment in emission of extra targets
that is, adjust path separators and don't quote them. we already did
that to some degree, but totally inconsistently, so it just didn't work
for any targets with "fancy" file names.

note that we don't bother doing that for recursive targets, as these are
assumed to be identifiers.

Change-Id: Ic75f003b71abc6fed03a4121b903ad5ee8253ed2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:09 +00:00
Liang Qi
9808b53fde Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/plugins/platforms/eglfs/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp

Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
2016-11-15 09:58:16 +01:00
Joerg Bornemann
2713f080bb Remove wondrous VS version detection logic
Replace which_dotnet_version with a simple function that converts the
value of MSVC_VER to its corresponding enum value in the VS project
generator.
This reduces the maintenance burden when adding support for a new VS
version, because we do not need to update the registry keys in
which_dotnet_version anymore.
The which_dotnet_version function implemented the following logic:
  - find all installed VS versions via registry
  - select the "best matching one"
  - if there is no best match, select the VS that's in PATH
  - create a project for that VS installation
The usefulness of this whole stunt is questionable as the VS version of
Qt's mkspec must match the version of a project using that Qt anyway.

Change-Id: I9fb9a099ee5ddb5fc4c450be4f68f41f2b406b9a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-14 15:50:49 +00:00
Joerg Bornemann
6ad1012758 Remove superfluous calls to which_dotnet_version
On the way to get rid of this function.
Have one place to determine the VS version instead of calling
this function over and over again (even though all calls but
the first are cheap).

Change-Id: Ic42a65df5a9bbe289f4813e4db85000dba15e672
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-11 07:44:22 +00:00
Joerg Bornemann
aba5801a32 Remove superfluous includes from VS generator
Change-Id: I1756323760dca4413a98a43889aace569c91d0bd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-10 13:09:51 +00:00
Joerg Bornemann
c0c75b3c20 vcxproj generator: Support the /DEBUG:FASTLINK option of VS 2015
Make qmake understand the /DEBUG:FASTLINK option in QMAKE_LFLAGS, and
write the corresponding value correctly to VS 2015 project files.

Task-number: QTBUG-55591
Change-Id: I670375ed1523a5ab96bb3cce28635785564edba8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-04 09:55:07 +00:00
Liang Qi
d7e4980132 Merge remote-tracking branch 'origin/5.8' into dev
Blacklist tst_QMenuBar::taskQTBUG46812_doNotLeaveMenubarHighlighted() on macOS.

Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/sdk.prf
	src/angle/src/libEGL/libEGL.pro
	src/platformsupport/fontdatabases/fontdatabases.pro
	src/platformsupport/platformsupport.pro
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	tests/auto/widgets/widgets/qmenubar/BLACKLIST
	tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp

Task-number: QTBUG-56853
Change-Id: If58785210feee3550892fc7768cce90e75a2416c
2016-11-02 09:24:11 +01: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
8e20daae9f Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/minimalegl/qminimaleglintegration.cpp

Change-Id: Ia6ab42a6daadbf8abc085c971545904d49ea4b56
2016-10-31 09:26:35 +01:00
Joerg Bornemann
d16d56a05e MSVC: Fix installation of PDB files for static libraries
Commit 3d3d65f5 separated the PDB files for compiling and linking. Only
the PDB file the linker produces would be installed. However, this does
not work for static libraries as the LIB tool does not create a PDB file
from the compiler's PDB file. This patch turns the separation between
PDB files off for static libraries.

Task-number: QTBUG-56594
Change-Id: I08dcb7889c67b2f6370efa1ee19be8558355bbc9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-28 14:37:11 +00:00
Liang Qi
af0d0b9c06 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.h
	src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm
	src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileenginefactory.h
	src/plugins/platforms/ios/qiosintegration.h
	src/widgets/widgets/qcombobox.cpp
	tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
	tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp

Change-Id: Ibaee7cbbba99e7c4b1d8926e55932ffa6030ce45
2016-10-27 10:23:39 +02:00
Giuseppe D'Angelo
dde20de1ba qmake project generator: enable deprecation warnings
Following the discussion at QtCS 2016 about deprecated APIs,
let's enable the warnings by default.

Change-Id: I73fe63de3e4f755067100320d7497b6b227549b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-26 10:44:56 +00:00
Jesus Fernandez
b82793e790 Fix possible loss of data in conversion from size_t to int warning
Change-Id: I72c74e67708f1e164a0c35e1e92d9bf3ec99ffd6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-10-25 21:22:52 +00:00
Liang Qi
dfc177e3a9 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	qmake/library/qmakeevaluator.cpp
	(cherry picked from commit 1af6dc2c8fb4d91400fddc5050166f972ae57c9a in qttools)
	src/corelib/kernel/qcore_mac_objc.mm
	src/gui/painting/qcolor.h
	src/plugins/platforms/cocoa/qcocoawindow.mm

Change-Id: I5b3ec468a5a9a73911b528d3d24ff8e19f339f31
2016-10-13 09:49:38 +02:00
Tor Arne Vestbø
669add92d9 Replace QCFString::to(CF/NS/Q)String usage with QString methods
Slims down QCFString and leaves only one implementation of converting
back and forth between CF/NS strings and QStrings.

Change-Id: I068568ffa25e6f4f6d6c99dcf47078b7a8e70e10
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-06 08:02:59 +00:00
Liang Qi
e66d181e65 Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: I3b51bb706e401edfda09a433c67aa58e44f33e83
2016-09-29 12:58:41 +02:00
Liang Qi
cdb56c42fc Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/features/uikit/xcodebuild.mk
	tests/auto/other/lancelot/tst_lancelot.cpp
	tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
	tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp

Change-Id: Ia0ae2de86094120281abd445138877c2cc3e882c
2016-09-29 00:38:01 +02:00
Liang Qi
06bd93c4ac Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	src/plugins/platforms/ios/qiosmessagedialog.mm

Change-Id: Icfbf55c3215ec088e552d0b42a5c94d04b17c65f
2016-09-26 21:43:25 +02:00
Liang Qi
680dd3313c Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/global/qlogging.cpp

Change-Id: I9cc8f25ad897efab6a42cb5c5161b1c9402952f0
2016-09-23 22:28:33 +02:00
Maurice Kalinowski
2ce8590e0c win32: Fix Visual Studio project generation
With the removal of Windows CE support(52623d6d) the logic of these
checks have changed, as it was always true for non Windows CE builds
before.

This did not affect WinRT, as those mkspecs define VCPROJ_ARCH
explicitly in their qmake.conf.

Task-number: QTBUG-55753
Change-Id: Ie2eddf197c17fcbf7343b444cfe8940a332a545c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-09-22 09:36:18 +00:00
Jake Petroules
a45566eec7 Fix code signing for qmake-generated Xcode projects in Xcode 8 (again)
This version now prefers non-free provisioning teams, since the latter
seem to be problematic in more cases.

Task-number: QTBUG-55915
Change-Id: Ie40ddae5e333acdd5327ed46992fb4fb300dee25
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-09-22 06:04:57 +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
Jake Petroules
f242b91189 Fix code signing for qmake-generated Xcode projects in Xcode 8
Task-number: QTBUG-55915
Change-Id: I7cbddd7ed8a6e0fa220b423e11e4d550e09297f9
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
2016-09-16 05:49:42 +00:00
Liang Qi
40a1f69e86 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure.json
	mkspecs/macx-tvos-clang/qmake.conf
	mkspecs/macx-watchos-clang/qmake.conf

Change-Id: Iaf32339ace59dff9ed344972472744c55d75025c
2016-09-15 19:47:57 +02:00
Marc Mutz
a70faa8470 qmake: remove unused #include
Amends 5af12dae41.

Change-Id: I8dd35d21de882be2628f5dd75a5ddd9deef71a19
Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-09 18:16:45 +00:00
BogDan Vatra
21b7661a79 Parse namespaces only for current file, add Q_NAMESPACE support to qmake
Parsing the other files will (re)generate the same metaobject info in two places

Change-Id: I8984ed30751a7587de870f55dd427f067d1b2495
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-09-06 10:29:21 +00:00
Jake Petroules
73331eebf8 Enable precompiled headers on iOS, tvOS, watchOS
The actual blocker for precompiled headers is not the iOS/tvOS/watchOS
platforms, but the way qmake handled multiple-architecture builds on
Apple platforms.

This patch allows multi-arch builds to be performed while using
precompiled headers.

Since df91ef3d6c55692a0236f67b6c6b134a3bf84098 (April 2009), Clang has
had support for PCH files in the driver, which allows to use the
-include flag to automatically translate to -include-pch. We can then
take advantage of the fact that the -include option is allowed to not
be separate from its argument, which lets us take advantage of -Xarch to
specify a per-architecture precompiled header file.

This is done through some magic in the qmake Makefile generator which
"multiplexes" the PCH creation rule across multiple architectures and
replaces a series of tokens with the proper precompiled header paths
and architecture flags at usage point.

Change-Id: I76c8dc9cda7e218869c2919f023d9b04f311c6fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-02 08:25:31 +00:00
Jake Petroules
6cabb18bc2 Make the Xcode generator recognize embedded frameworks/plugins
This makes the Xcode generator smarter so that it recognizes when
a QMAKE_BUNDLE_DATA entry is attempting to embed a framework,
dynamic library, or plugin into the application bundle, and
places it into the correct generated PBXCopyFilesBuildPhase.

Change-Id: I67ac1534a0521eecfc90537db6f9aca2bdbc96b0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-08-31 22:42:32 +00:00
Liang Qi
f510a51dac Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: I843994939f126ced22f7fe978ec4403f599fc7c9
2016-08-31 08:24:21 +02:00
Jake Petroules
2e3a585013 qmake: Use correct CFBundleExecutable in framework bundles
This fixes a bug where joined device and simulator builds would get
for example, QtCore_iphonesimulator as the CFBundleExecutable.

According to Apple:

"For frameworks, the value of this key is REQUIRED to be the same as
the framework name, minus the .framework extension."

This does not affect the ability to load a framework whose executable
name differs from the bundle name (as is the case for simulator builds),
as the application will be linked to the correct framework executable
at link time by specifying (for example) the linker flag:
-framework QtCore,_iphonesimulator

Change-Id: Ib7614670d0620e0235cd7e2606d42dd034a90c68
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-08-26 03:53:16 +00:00
Oswald Buddenhagen
6a9f38a11d fix argument order in recursive qmake invocations
the inherited arguments may contain the '--' argument, which turns
additional arguments into configure arguments. the simplest fix for
that is injecting additional arguments at the front, not at the end.

Change-Id: I7cc00a42f0148e5ccbbeda2ad59fa8c63749f02d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-25 11:55:32 +00:00
Jake Petroules
3666fc674f qmake: tighten up isFramework check so it doesn't match plugin bundles
Plugin bundles are not frameworks, so this fixes the case where a lib
template with plugin and lib_bundle in the CONFIG would be mistaken
for a framework bundle, which has a different filesystem layout and
handling.

Change-Id: I9ce9daf22d4e3de70bfe7bc8bb219068de0bca42
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 11:01:39 +00:00
Jake Petroules
aae7a5e09d qmake: Add shallow bundle support
This is a prerequisite for properly constructed framework bundles.

On certain Apple platforms (iOS, tvOS, watchOS), bundles are used
in "shallow" format, meaning that the directory structures are
flattened compared to the one used in macOS bundles.
shallow_bundle allows the difference to be expressed independently
of the platform. Note that the term "shallow bundle" is used by
Apple in Xcode internals.

Change-Id: I1189c52b0ea66843c313783176c11cc2af97ad25
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 10:55:31 +00:00
Oswald Buddenhagen
d314819fc0 Merge dev into 5.8
Change-Id: I41ee7b50534b01cf042bed8bb8824ba2e5026a29
2016-08-22 11:30:01 +02:00
Jake Petroules
57378a108c Add support for Apple watchOS
Change-Id: I3f9e00569458a463af2eaa5a3a16a6afd1e9c1ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-08-19 21:05:55 +00:00
Marc Mutz
1e4ba2b4e5 Don't hold MakefileGenerator::Compiler in QList
MakefileGenerater::Compiler is larger than a void*, so holding
it in QList is horribly inefficient.

Fix by using QVector instead.

Change-Id: I9ea173271caf9b4995d311c3864c6967da049380
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-16 17:09:12 +00:00
Marc Mutz
839bab1355 qmake: don't hold VCFilter in QList
Change-Id: Ib10539187e0c8e4ffa2000dcad75715a7b931701
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-16 17:09:07 +00:00
Marc Mutz
e7b6cc2700 qmake: remove pointless ~VCProjectSingleConfig()
It's empty, but non-trivial, thus preventing move special member
functions from being generated by the compiler (now that qmake
is compiled as C++11, too).

The default ctor was also empty - removed, too.

Change-Id: I714db524f681f1fc250d21926245757e97351e87
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-16 17:09:03 +00:00
Marc Mutz
aa11287a27 qmake: mark VCProjectSingleConfig as movable
Has a few too many fields for defining a member-swap
(which would be required to mark it shared).

Change-Id: Iecbeec9e60a9884cb4a984c58cb192918cef799d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-16 17:08:59 +00:00
Liang Qi
17198e03ab Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/global/qglobal.cpp
	src/corelib/tools/qstring.cpp
	src/network/socket/qabstractsocket.cpp
	src/network/socket/qnativesocketengine_unix.cpp
	src/plugins/platforms/eglfs/api/qeglfsglobal.h

Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
2016-08-16 07:58:32 +02:00
Marc Mutz
b23fb2f07f qmake: Mark MakefileGenerator::Compiler as Q_MOVABLE_TYPE
Change-Id: I6469ffe3027c8519e80b71f5014f7bd9474e836b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-15 22:16:59 +00:00
Marc Mutz
d153a0534e qmake: remove pointless ~VCConfiguration()
It's empty, but non-trivial, thus preventing move special member
functions from being generated by the compiler (now that qmake
is compiled as C++11, too).

Change-Id: I7e4b6d7f604020dd5e6da81f7a046202c8b78e09
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-15 22:16:28 +00:00
Marc Mutz
fae988e449 qmake: remove pointless ~VCFilter()
It's empty, but non-trivial, thus preventing move special member
functions from being generated by the compiler (now that qmake
is compiled as C++11, too).

Change-Id: I9431311d24da802f147ce10e475936838bb85d41
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-15 22:16:24 +00:00
Marc Mutz
aeea30ebba qmake: replace a uint:1 with a bool
It doesn't save any memory, generates worse code, and
prevents a member-swap from being added.

Change-Id: Iddc0f1338478e465f34076857e266f1912fbaba6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-15 22:16:09 +00:00
Liang Qi
6b8f422c5e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/io/qsettings.cpp
	src/corelib/itemmodels/qstringlistmodel.cpp
	tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp

Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
2016-08-13 01:05:02 +02:00
Fredrik Orderud
b6f5b38f8c Define _WINDLL when building a DLL
Visual Studio automatically defines _WINDLL when building a DLL,
regardless of project settings
(https://msdn.microsoft.com/en-us/library/8x480de8.aspx). This define
is therefore widely used to detect DLL vs. static library or executable
build target on Windows.

For makefiles, _WINDLL need to be manually defined, which QMake failed
to do so far.

Task-number: QTBUG-55183
Change-Id: Ic62201666c44e730e6881706d568ce9eaf22b7a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-11 09:57:00 +00:00
Lars Knoll
0e1efdf549 Remove the -target command line option
This was only used to specify XP as a target which is
not supported on 5.8 anymore. Clean up all associated
special handling in the mkspecs and pro files.

This effectively reverts change 10a0ac75.

Change-Id: I420d73002912989f1a5be961a2d09277ec4a4425
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-05 15:49:03 +00:00
Liang Qi
b3100fbadd Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev 2016-06-21 14:07:10 +00:00
Liang Qi
ea438b2508 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qsysinfo.h
	src/corelib/kernel/qcoreapplication_win.cpp
	src/gui/text/qdistancefield.cpp
	src/gui/text/qdistancefield_p.h
	src/plugins/platforms/windows/qwindowsglcontext.cpp
	src/plugins/platforms/windows/qwindowsglcontext.h

Change-Id: Ib3500acc2b28553bde06758cd9a2e19eb7fe2978
2016-06-21 08:39:41 +02:00
Joerg Bornemann
f4159d0495 Remove Windows CE vestige
Change-Id: I07bd55c55f8b69dd7c58da8876ca985debf235dc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-20 12:51:43 +00:00
Liang Qi
e32f1a4d61 Merge remote-tracking branch 'origin/5.6' into 5.7
And blacklisted a few tests in tst_QUdpSocket.

Conflicts:
	src/android/jar/src/org/qtproject/qt5/android/QtNative.java
	src/corelib/global/qglobal.cpp
	src/corelib/global/qsystemdetection.h
	src/corelib/io/qfileselector.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
	tests/auto/network/socket/qudpsocket/BLACKLIST

Task-number: QTBUG-54205
Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
2016-06-20 08:00:26 +02:00
Mat Sutcliffe
23bce6b169 qmake: Fix missing newlines in generated vcxproj files
A bug in the Windows C Runtime causes text mode pipes to drop newlines
sometimes. This bug was hidden because of another bug in rcc which
caused newlines to be redundantly duplicated. When the latter bug was
fixed (commit 53d5811b) the former bug was exposed, causing invalid
vcxproj files to be generated. The Windows bug is described here:
https://connect.microsoft.com/VisualStudio/feedback/details/1902345
The workaround is to avoid text mode, and do the conversion of "\r\n"
to "\n" ourselves (which we were already doing anyway).

Change-Id: I792599a4cd7822f109fa921f02207fb1b144b1d1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-16 22:46:54 +00:00
Jake Petroules
05bd88bdd8 Fix an issue causing qmake to generate corrupt Makefiles.
This resolves an issue where qmake would generate a Makefile with an
install command immediately followed by a test command, with no
intermediary newline and tab to separate them.

Task-number: QTBUG-54035
Change-Id: I7f9226f25e92b49ce689d252e9c4a58b877f2972
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-15 22:18:29 +00:00
Joerg Bornemann
3d3d65f538 Use separate PDB files for compiling and linking in MSVC builds
The two PDB files that the MSVC compiler and linker create are supposed
to be handled differently and should not share the same file path.
Using the same file path for both can result in corrupted PDB files and
longer build times.

Use $${TARGET}.vc.pdb in the OBJECTS_DIR for the compiler and
$${TARGET}.pdb (the default) for the linker.

Task-number: QTBUG-53895
Change-Id: I31f06d4a674a3aa2afe5b30499bae820e5caf2c4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-15 12:28:01 +00:00
Oswald Buddenhagen
e45a9fe457 add ProStringList::join(ProString) overload and make use of it
this introduces an ambiguity, so some char* arguments need explicit
QString construction now.

Change-Id: Ic3919a1fa9419bbb3b57dd1aa7eb95643ee59e53
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-05-24 12:38:47 +00:00
Liang Qi
56d6e000f7 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	mkspecs/wince80colibri-armv7-msvc2012/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/corelib/global/qnamespace.h
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qfsfileengine_win.cpp
	src/corelib/tools/tools.pri
	src/network/ssl/qsslconfiguration_p.h
	src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
	src/plugins/platforms/windows/windows.pri
	src/src.pro
	src/tools/bootstrap/bootstrap.pro
	src/tools/uic/cpp/cppwriteinitialization.cpp
	src/widgets/dialogs/qfilesystemmodel.cpp
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt

Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
2016-05-23 21:09:46 +02:00
Liang Qi
818014b449 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
	src/widgets/widgets/qlineedit_p.cpp
	src/widgets/widgets/qlineedit_p.h
	src/winmain/winmain.pro
	tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
	tools/configure/configureapp.cpp

Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
2016-05-19 12:55:27 +02:00
Oliver Wolff
f095ff85c5 qmake: Introduce CE_PLATFORMNAME to fix creation of vcxproj files
While previous SDKs used the form "CE_SDK (CE_ARCH)" in their
configuration/platform names, this is not true fo the Toradex SDK.
Inside Visual Studio the platform is only called "Toradex_CE800"
instead of "Toradex_CE800 (ARMV7)".

In order not to break other SDKs CE_PLATFORMNAME is introduced and
used in the wince80colibri-armv7-msvc2012 mkspec. If the variable
is set qmake uses it as the platform name in its vcproj generator.

Change-Id: Icb501bf6446a9f617745a0d2c7a80b240680b043
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2016-05-18 13:50:43 +00:00
Mike Krus
03e9c6f4a6 Add support for Apple tvOS
Pass -xplatform macx-tvos-clang to configure to build.
Builds device and simulator by default.

Added ‘uikit’ platform with the common setup.
Also added QT_PLATFORM_UIKIT define (undocumented).
qmake config defines tvos (but not ios).

tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be
embedded in the binary. A new ‘bitcode’ configuration was added.
For ReleaseDevice builds (which get archived and push to the store),
bitcode is actually embedded (-fembed-bitcode passed to clang). For all
other configurations, only using bitcode markers to keep file size
down (-fembed-bitcode-marker).

Build disables Widgets in qtbase, and qtscript (unsupported,
would require fixes to JavaScriptCore source code).

Qpa same as on iOS but disables device orientation, status bar, clipboard,
menus, dialogs which are not supported on tvOS.

Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-05-17 16:11:23 +00:00
Liang Qi
990969655c Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	config_help.txt
	configure
	src/corelib/io/qprocess_wince.cpp
	src/plugins/platforms/windows/qwindowstheme.cpp
	src/plugins/platforms/xcb/qxcbbackingstore.cpp
	tests/auto/corelib/tools/qtimezone/BLACKLIST
	tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
2016-05-12 08:33:08 +02:00
Marc Mutz
f0d7080e9e qmake/tools: port the last remaining Q_FOREACH loops and add QT_NO_FOREACH
Port the last four remaining Q_FOREACH users in qmake
and uic to C++11 range-for and mark all qtbase tools
(incl. qmake) as Q_FOREACH-free, using QT_NO_FOREACH.

Change-Id: Ief4e5877269e7a853e4cf05e58861a448e822d3d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-05-11 16:55:32 +00:00
Liang Qi
dbef41f43e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	examples/qtestlib/tutorial5/containers.cpp
	examples/widgets/tools/tools.pro
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/network/kernel/qdnslookup_unix.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/testlib/qtestcase.cpp
	tools/configure/configureapp.cpp

Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
2016-05-06 15:36:44 +02:00
Oswald Buddenhagen
49f92f9ab7 add some missing filename expandos to extra compilers
- QMAKE_FILE_IN_EXT as an alias for QMAKE_FILE_EXT, for consistency with
  QMAKE_FILE_IN_BASE
- QMAKE_FILE_IN_NAME to make pairing _EXT/_BASE to get a full name
  unnecessary (finally ...), and make use of it
- QMAKE_FILE_OUT_PATH, because i'll need it

Change-Id: I3d91ddb84f9cce52a665d562da11d165c92550c8
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-05-02 18:34:59 +00:00
Oswald Buddenhagen
ce044ce348 ensure that QMAKE_FILE_{IN,OUT}_BASE are quoted
it's beyond me why they shouldn't be.

Change-Id: I2493469636e4f196bfeb2eb00a691aeae0f1881d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-05-02 18:34:55 +00:00
Liang Qi
b894a8def5 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/features/qml_module.prf
	mkspecs/features/qt_common.prf
	src/gui/text/qzip.cpp
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/windows/array.h
	src/testlib/qtestcase.cpp
	src/widgets/dialogs/qfilesystemmodel.h

Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
2016-04-29 17:55:20 +02:00
Jesus Fernandez
3da965ccd9 Possible crash in QMakeSourceFileInfo
CID 155005: Possible illegal access in string. Some loops were
reading the buffer without checking the bounds.

Change-Id: I910671a6d56808138ec2bb5d96bd7edf78b20f73
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-29 08:40:30 +00:00
Jesus Fernandez
f3d38d0c29 Unchecked return value in QMakeProject
CID 21629: The QMakeProject::read result was ignored.
MetaMakefileGenerator::createMakefileGenerator will be called if the
project was read.

Change-Id: I9187c82efd1abedcaa8e394f1fdb0b7f35a2b1d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-29 08:40:06 +00:00
Liang Qi
bb4b86618d Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	config.tests/unix/compile.test
	configure
	src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java
	src/corelib/global/qglobal.cpp
	src/widgets/kernel/qapplication.cpp
	src/widgets/styles/qwindowsvistastyle.cpp
	tests/auto/corelib/kernel/qobject/tst_qobject.cpp

Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
2016-04-25 14:03:45 +02:00
Jake Petroules
bbd1228b17 Fix Group-relative specification of files in generated Xcode projects.
Xcode does not recognize "<Group>" with a capital G, only "<group>" with
a lowercase g. As a result, paths of files within these groups are
calculated incorrectly. For example, dragging any external file into the
Xcode project would result in its leading slash being removed (while
still treated as an absolute path - broken reference). Furthermore, the
dropdown in Xcode displayed the Group location as an invalid string
instead of the correct "Relative to Group". This patch restores correct
behavior.

This fixes a regression introduced in
f09ec09c208c75a16abe05b6bb505a1fc58775a6.

Task-number: QTBUG-52701
Change-Id: I9af5360049a79e7958301e4090a9a542bab0af8c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-04-20 18:18:33 +00:00
MATSUMURA Tetsuro
96ff51f856 Fix dependency scanner being confused by UTF-8 BOM
Update QMakeSourceFileInfo::findDeps to skip UTF-8 BOM if exists.

Task-number: QTBUG-34182
Change-Id: I7a3e30ecab08f485c53e2ca2eab197619b11c2c7
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-13 13:15:30 +00:00
Liang Qi
f34e73a16a Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/corelib/kernel/qobject.cpp
	src/gui/painting/qpaintengine_raster.cpp

Change-Id: I74e1779832f43d033708dcfd6b666c7b4f0111fb
2016-04-11 09:12:36 +02:00
Liang Qi
ee0951d69b Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/network/access/qftp.cpp
	src/widgets/itemviews/qheaderview.cpp
	src/widgets/itemviews/qlistview.cpp
	tests/auto/network/access/qftp/tst_qftp.cpp

Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
2016-04-07 10:47:20 +02:00
Joerg Bornemann
2050e32b5f Fix abuse of assignment-in-conditional (and the resulting warning)
Change-Id: I2025e3360151c76982c45764cbee332855409dd0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-06 14:49:35 +00:00
Liang Qi
f285687584 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	examples/corelib/ipc/ipc.pro
	src/plugins/platforms/xcb/qxcbbackingstore.cpp
	tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp

Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
2016-04-05 14:22:45 +02:00
Simon Hausmann
8e2d3e3b90 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I9a10e1f3c9506ec8554d8f59b6300825ac730939
2016-03-23 08:29:43 +01:00
Andreas Holzammer
8fd96d78f0 qmake/wince: Deploy QPA plugin as well in Visual Studio
Change-Id: Ia936290ddb61a85be18d903b64d4b11c709b0732
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-03-22 14:10:12 +00:00
Andreas Holzammer
f8d790f086 qmake: Fix wince dll deployment in Visual Studio
This fix repairs the mechanism to deploy Qt dlls as well as C++ runtime
to a wince target in Visual Studio.

Do this by adding a deploy section in the Visual Studio solution and
adding the C++ runtime from the mkspec to the files deployed to the target.
Deploy target path is set to what the wizard of Visual Studio defaults to.
Before, the c++ runtime was only deployed for executables which were built
as part of Qt.

Task-number: QTBUG-50924
Change-Id: I478010dc16e35c68578281895aa3ae14b5c96bb4
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-03-22 14:10:03 +00:00
Liang Qi
a02863234d Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
	mkspecs/common/wince/qplatformdefs.h
	src/plugins/platforms/directfb/qdirectfbbackingstore.cpp
	src/plugins/platforms/xcb/qxcbbackingstore.cpp

Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
2016-03-22 07:28:42 +01:00
Liang Qi
6cb8121a44 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/widgets/styles/qgtkstyle_p.cpp
	tests/auto/corelib/io/qtextstream/test/test.pro
	tests/auto/corelib/plugin/plugin.pro

Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
2016-03-21 09:02:57 +01:00
Oswald Buddenhagen
d3744eff86 de-duplicate condition for default install target
we can rely on the super class to get it right.
as a "side effect", we won't try to install .pdb files for aux projects
anymore - the duplicated conditional was incomplete.

Change-Id: I9b66f32ab50ed2a1d4e6e03a9d205686a4b4a981
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-03-16 15:09:57 +00:00
Liang Qi
50d0f57b77 Merge remote-tracking branch 'origin/5.6' into 5.7
This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define
and undef in src/corelib/tools/qsimd_p.h.

This change is also squashed with "Fall back to c++11 standard
compiler flag for host builds" which is done by Peter Seiderer.

Conflicts:
	mkspecs/features/default_post.prf
	src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch
	src/3rdparty/sqlite/sqlite3.c
	src/corelib/tools/qsimd_p.h
	src/gui/kernel/qevent.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/gui/kernel/qwindowsysteminterface_p.h
	src/plugins/bearer/blackberry/blackberry.pro
	src/plugins/platforms/cocoa/qcocoasystemsettings.mm
	src/plugins/platformthemes/gtk2/gtk2.pro
	src/plugins/styles/bb10style/bb10style.pro
	src/sql/drivers/sqlite2/qsql_sqlite2.cpp
	tools/configure/configureapp.cpp

Task-number: QTBUG-51644
Done-with: Peter Seiderer <ps.report@gmx.net>
Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
2016-03-11 20:08:50 +01:00
Joerg Bornemann
52623d6d9d qmake: Remove Windows CE support.
The platform has been removed in Qt 5.7.

Change-Id: Ie768b5ffbe60270c27b4a670dcf580ea361cb361
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-10 13:33:44 +00:00
Oswald Buddenhagen
f3487308e4 fix file separators in target.targets INSTALLS
Task-number: QTBUG-51775
Change-Id: I8d9442bfd5084f1670b79dfdd422638bc62780aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-03-10 12:21:57 +00:00
Liang Qi
1fadc7292b Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
	src/plugins/platforms/windows/qwindowsfontengine.cpp
	src/plugins/platforms/windows/qwindowsnativeimage.cpp
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp

Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
2016-02-24 13:31:14 +01:00
Oswald Buddenhagen
1c87c3bdc6 remove dead code re CONFIG+=generate_pbxbuild_makefile
evidently, nothing and nobody sets this option, as it's been completely
broken since 6234dec41f (qt 5.5) and apparently nobody noticed.

Change-Id: I5a82ebd963a292af4689397875dde096f63d751a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-02-19 17:08:50 +00:00
Marc Mutz
8204a4db05 qmake: remove some empty user-defined dtors
They prevent move special member functions from
being synthesized by the compiler.

Change-Id: I90c4a6e286734ef3906ee833826bd3bfbdad3874
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-02-15 14:45:40 +00:00
Liang Qi
d456f87ece Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qfilesystemwatcher_win.cpp
	src/corelib/plugin/plugin.pri
	src/plugins/platforms/cocoa/qcocoaaccessibility.mm
	tests/auto/corelib/tools/qlocale/tst_qlocale.cpp

Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
2016-02-11 08:25:04 +01:00
Oswald Buddenhagen
a107c5394a remove redundant namespace qualification
Change-Id: I9fdb7ccc60da2631bc74b3b0a8414c211f4c182f
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-05 16:29:04 +00:00
Anton Kudryavtsev
4748acbf1e qmake: use QString::replace() overloaded with QLatin1String
instead of QStringLiteral, QString, const char*.

Results: reduce .rodata, prevent re-creation of QString.

Change-Id: Ie2e3089974c42e6733457bbe58521bccd1da3a53
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-04 15:10:49 +00:00
Marc Mutz
fdfd63053a QtBase: avoid uses of Java-style iterators [QHash, QMap]
Java-style iterators are slower than STL-style ones, so
they should not be used in library code.

Replaced them with C++11 range-for, STL iterators or, in
one case, qDeleteAll().

In one case, avoid a double hash lookup by using erase(it)
instead of remove(it.key()), which we can now do without
detaching, due to the new erase() taking const_iterator.

Change-Id: I96174657fed70f76120b2c9d8190b4e70d5d8179
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-02-02 10:20:00 +00:00
Anton Kudryavtsev
1d3503b8f3 qmake: use reserve to optimize memory allocation.
Change-Id: I6ace338512c24fd9dc11c767a28f0a63454076fa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-01 20:57:59 +00:00
Marc Mutz
5af12dae41 qmake: replace a QLinkedList with QVector
In VcprojGenerator::collectDependencies(), a temporary QLinkedList
is created, then iterated over. There's no reason to use a node-
based container here: no references are taken, no erases happen,
esp. not in the middle...

Port to QVector instead and reserve it, since the maximum size is
known ahead of time, and the lifetime of the container is very
short.

Since the loop iterating over the linked list needed touching
anyway, port directly to C++11 range-for.

Change-Id: Ic5dfeebcd9da37c214f54abc6025a0a2b8fa3b5d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-02-01 14:12:19 +00:00
Marc Mutz
d9229d849f qmake: eradicate Q_FOREACH loops [already const]
(or trivially marked const) ... by replacing them
with C++11 range-for loops.

Change-Id: I1522e220a57ecb1c5ee0d4281233b3c3931a2ff8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-28 20:25:21 +00:00
Marc Mutz
e31541fa6f qmake: eradicate Q_FOREACH loops [needing qAsConst()]
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().

Change-Id: If086bea06fe26232a7bb99fad8b09fce4dc74c27
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-28 20:25:18 +00:00
Marc Mutz
8d7e913248 qmake: eradicate Q_FOREACH loops [rvalues]
... by replacing them with C++11 range-for loops.

This is the simplest of the patch series: Q_FOREACH took a
copy, so we do, too. Except we don't, since we're just
catching the return value that comes out of the function
(RVO). We can't feed the rvalues into range-for, because
they are non-const and would thus detach.

Change-Id: I5834620bf82f3442da7b2838363d351a0fb960a0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-28 20:25:15 +00:00
Marc Mutz
3f3140d38a qmake: eradicate Q_FOREACH loops [const-& returns]
... by replacing them with C++11 range-for loops.

The functions QMakeProject::values(), QMakeMetaInfo::values()
and QHashIterator::value() all return by const-reference,
so they can be passed to range-for without further changes.

Change-Id: Ic3b39ed8ff8cd7a6f287f1aa9d61a1acd67d7aaa
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-28 20:25:11 +00:00
Marc Mutz
c9cb20c01a qmake: don't iterate over .keys()
... iterate over the container itself instead. Avoids
temporary QList creation as well as the lookup cost
when actually calling value(key).

Change-Id: Icac867c30e63863cfa44a382eedd4d6df2070a59
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-28 20:25:07 +00:00
Liang Qi
a15c3d086d Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
	src/dbus/qdbusconnection_p.h
	src/dbus/qdbusintegrator.cpp
	src/dbus/qdbusintegrator_p.h
	tests/auto/corelib/io/qdir/qdir.pro
	tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp

Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
2016-01-26 16:27:28 +01:00
Liang Qi
0a1af55a9b Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 11:27:37 +00:00
Thiago Macieira
cfe891eeb8 Add Intel copyright to files that Intel has had non-trivial contribution
I wrote a script to help find the files, but I reviewed the
contributions manually to be sure I wasn't claiming copyright for search
& replace, adding Q_DECL_NOTHROW or adding "We mean it" headers.

Change-Id: I7a9e11d7b64a4cc78e24ffff142b506368fc8842
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 22:44:21 +00:00
Tobias Koenig
a01146aac1 Use QFileInfo::exists(f) instead of QFileInfo(f).exists()
QFileInfo::exists(f) is somewhat faster than the version which creates an temporary object.

Change-Id: I5f931a86d9dfad57d99efe04ca115422de43def9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-21 21:21:47 +00:00
Frederik Gladhorn
f33c6f37a8 Work around MinGW-make's magic prefixing of paths.
When building QNX on MS-Windows, make magically adds the Msys root as
prefix to variables whose values look like paths; this applies to both
environment variables and variables given values on the command-line.
When we don't actually want to install under the Msys root, this is
unwelcome "help".  So (for MinGW's make) support a magic prefix of our
own, @msyshack@, that'll make a path value for INSTALL_ROOT not look
like a path to make; we can then strip it off when we come to use it.

Change-Id: I951ad3c8fe3e5cfb49e6e361d7fff779f3a9d716
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-01-21 19:23:40 +00:00
Jani Heikkinen
f776595cc1 Updated license headers
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)

Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 18:55:18 +00:00
Anton Kudryavtsev
f384c30979 QMake: replace QStringLiteral with QLatin1String
... in string comparisons. It's more efficient.

Change-Id: I5d54ab7777a0838455eaaac671e735eb37bfe243
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-01-21 07:25:48 +00:00
Liang Qi
158a3a4159 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qiodevice_p.h
	src/corelib/kernel/qvariant_p.h
	src/corelib/tools/qsimd.cpp
	src/gui/kernel/qguiapplication.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp

Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
2016-01-21 08:17:21 +01:00
Joerg Bornemann
c60e06e087 Support precompiled header files without file extension in VS projects
Having a precompiled header file without file extension (or without
common file extension) led to an incorrectly generated Visual
Studio project file. The custom build step for automatically
generating the corresponding source file was missing.
  Remove the file extension check that apparently was yet another
feeble attempt of runtime optimization.

Task-number: QTBUG-50442
Change-Id: I0552f94be12cbb70e2f32c242c7364699979bd81
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-01-18 16:06:46 +00:00
Maurice Kalinowski
c3376ed3f9 winrt: enable hardware buttons for Windows 10
Previously the hardware and camera button handler were guarded inside a
Q_OS_WINPHONE which does not apply to Windows 10.

Instead use WINAPI_PARTITION_FAMILY like on other places, this covers
Windows Phone 8.1 as well as Windows 10.

To find windows.phone.ui.input.h at build time the Mobile Extension
directory needs to be added to the include paths inside qmake. On
runtime we need to check whether we have hardware buttons or not. In
case they exist, register the handlers, otherwise skip registration.
Skipping also helps to keep WACK succeeding.

Task-number: QTBUG-50427
Change-Id: Ibeae15dbde12553cebd2b73b1a40b754c014f426
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-01-14 07:43:26 +00:00
Anton Kudryavtsev
f59b12c629 MakefileGenerator: use erase and std::remove_if with QVector
... instead of using erase in a loop, with quadratic complexity.

Change-Id: I4ac03ac0e893fc5dbb5e45131fcbfe82f1564bee
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-01-12 05:16:48 +00:00
Oswald Buddenhagen
282f15feaa rewrite qtAddToolEnv()
the primary purpose is making env var prepend mode work for unset
variables on windows. this is achieved by using a conditional and delayed
variable expansion. however, the latter is disabled by default and can
be locally enabled only in batch files. therefore, write wrapper scripts
and substitute them for the actual commands. we do this also on unix,
both for consistency and simply because the commands look much less
confusing.

this change is slightly backwards-incompatible, as invoking
qtAddToolEnv() multiple times on the same command will now make a total
mess. also, invoking it on a command that contains 'make' macro
expansions isn't a good idea, so testcase.prf needed an adjustment. the
function is an undocumented internal, so Nobody Should Care (TM).

this also reverts 80ebedecf9, as it's obsolete now.

Change-Id: I8394b77868b495abcf27b688996ca74c40b80994
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-01-08 09:36:13 +00:00
Maurice Kalinowski
e0cc6e5b8e winphone: Invoke windeployqt twice unconditionally for vcproj
In 50bf54c invoking windeployqt was only required in release mode as
MDILXapCompile was not invoked for debug builds with Visual Studio 2013.
However, Visual Studio 2015 invokes MDILXapCompile for debug and
release. Hence we have to use this workaround unconditionally.

Also we cannot limit this to msvc2015 host specs only, as older projects
still might be loaded with Visual Studio 2015 causing the build to
break.

Task-number: QTBUG-49815
Change-Id: Ia120a392967319b945a9746ad489f2db0eed7156
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-01-05 13:05:00 +00:00
Frank Meerkoetter
1568b09f1c Correctly flag WinPhone
Fixes coverity CID21703.

Change-Id: If9587c7cc49768066273a97fc56c3a662104f439
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-01-01 12:46:11 +00:00
Edward Welbourne
4815f1cda4 qmake: Combine two variables into an array to simplify a loop.
Change-Id: If787ed4a72c5fb91bb4a9e908ab3f6443b9358b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-17 13:47:37 +00:00
Edward Welbourne
d6efc0aab3 qmake: teach findMocs to handle backslash-newline gracefully.
Change-Id: Id71352c0cf71ab84bd81d4f3d11bb19dc7965903
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-17 13:47:33 +00:00
Edward Welbourne
935ddbd3a2 qmake: simplify file-reading loop in findMocs
Change-Id: If436215c6041551782750f107021fcccbd447b32
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-15 16:40:15 +00:00
Edward Welbourne
5e7492325a qmake: teach moc-detector to handle C++-11 raw strings
As for the #include-parser, the moc-detector's minimal C preprocessor
could be confused by a raw string into ignoring large chunks of code.

Change-Id: Id688e9a1f04628ce75a51a7d15269078c734288e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-15 16:40:08 +00:00
Edward Welbourne
209a26c6c4 qmake: Fix comment false-alarm bug in findMocs().
If a / wasn't part of a comment-start, it and the character after it
were none the less stepped over.  If the character after started an
enclosure, this would duly be missed, leading to mis-parsing of the
subsequent text.  As for similar bug recently fixed in findDeps().

Change-Id: Ie5329ec633c23a554b42a6351723c980e27fb9a9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-15 16:40:02 +00:00
Edward Welbourne
214e271b93 Rewrote qmake's #include-detection to be more faithful to CPP.
The C preprocessor allows backslash-newline anywhere and allows
comments anywhere it allows space.  Testing wilfully perverse
applications of that revealed qmake's parsing of #include directives
wasn't very robust.  So rework to actually follow the rules and add
those tests.

Change-Id: If5cc7bfb65f9994e9ab9ed216dd1ee7285c63934
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-15 09:21:27 +00:00
Edward Welbourne
8fd05e6289 Don't ignore first character after a string.
The parser in QMakeSourceFileInfo::findDeps() would step over the
closing quote of a string, only to have a for loop then step over the
character just after that closing quote, which was thus never studied;
this could lead to problems in various ways.  Fixed that and expanded
findDeps() test to catch regressions.

Task-number: QTBUG-17533
Change-Id: I7dec5222e38fa188495b39376ffee70bc7bbc87f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-11 13:50:58 +00:00
Edward Welbourne
64ab4de4b0 Teach qmake's #include parser to recognize C++11 Raw strings.
Can't sensibly test unless the compiler does support raw strings,
since any test that would catch qmake's (prior) inability to parse raw
strings would necessarily confuse the C++ compiler in the same way.
This even applies (in test app code) to any #if-ery around the raw
string, since tokenization happens before preprocessor directives are
resolved.  So the #if-ery on Q_COMPILER_RAW_STRINGS has to be in
tst_qmake.cpp, not the test app it builds.

Change-Id: I4a461f515adff288b54fb273fd9996f9b906d11c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-08 08:13:32 +00:00
Joerg Bornemann
cbb2ce0f91 Remove Wow6432Node versions of Visual Studio registry keys
The Visual Studio registry keys are stored in the 32 bit view.
Extend qt_readRegistryKey with an option that enables the caller to
choose the 32 bit or 64 bit registry view.
We now read the Visual Studio registry keys from the 32 bit registry
view even in a 64 bit build.
Adding the next Visual Studio version will become a bit easier.

Change-Id: I7300b992be6058f30a422e3f1fe0bafade6eea54
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-08 06:37:57 +00:00
Joerg Bornemann
b99300712f Remove superfluous code from collectDependencies
val.first was never used.

Change-Id: I7be631c09061d6969234502fc0d5660c147aca39
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-12-04 15:05:15 +00:00
Joerg Bornemann
00abd1ddd2 vcproj generator: Fix auto-generated inter-project dependencies
Task-number: QTBUG-49580
Change-Id: I356be24ac555ed436e4f638e83c6cca703281cba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-04 15:05:11 +00:00
Mathew Sutcliffe
8b8e8a33b3 qmake: Correctly handle shadow build of nested vcsubdirs projects.
For some reason, the solution generator was looking for the vcproj
files in the source tree. It should look for them in the output tree
instead (suggested by Joerg Bornemann). This should handle both
in-source and out-of-source builds, and the special-case code for
handling out-of-source builds (which had a bug) can be removed.

Task-number: QTBUG-49665
Change-Id: I40b5c5907c52ffb074ccb8f297bb5924eacc1cb0
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-01 15:57:16 +00:00
Edward Welbourne
0ae8ef7acb Simplify a search for terminator.
We need to remember where the included file's name starts anyway; if
we move this to before the search for the end, we don't need a
separate variable to keep track of its length.

Change-Id: Ia8d72839ac3fa32f2e748a21ee70dcab614562f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-24 14:48:37 +00:00
Edward Welbourne
8da24d8a5c Comment to point out problem with CRLF handling.
Change-Id: I6352c5c68183207b9dfd332fbecc89c1c8c16d20
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:02:07 +00:00
Edward Welbourne
0c73bafe23 Simplify a loop's set-up and control.
Change-Id: Ie9e002d7d7fb269f3a99cce98e4250a866523360
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:59 +00:00
Edward Welbourne
213111f0fc Rework scan for keyword in preprocessor directive.
When looking for the keyword in a preprocessor directive, we were
checking for non-word characters to find its end.  If that check
failed (i.e. we had a word character) we would then check for EOL
(which necessarily failed, on a word character).  That made no sense.

However, we genuinely have no interest in a directive with nothing
after the keyword, so do check for EOL after the loop (once we've
skipped spaces after the keyword).

The loop itself was made needlessly complicated by, on finding the end
of the keyword, skipping over later space inside the loop.  Moved this
outside the loop.

Change-Id: Iccc2d445bf44deb75604e7fa60f2464e7397d8ed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:51 +00:00
Edward Welbourne
3780b3da99 Skip spaces (after #) earlier to catch blank line or end-of-buffer.
The C preprocessor does believe in a # [nothing] line; and we may as
well give up before checking for keywords if we've run out of buffer.

Change-Id: I64dc3ad2808435389d0d7b56dcbc9d92ae72aa6e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:45 +00:00
Edward Welbourne
00a855d643 Avoid having division caught up in parsing of comments.
A loop to skip space and comments was meant to break on anything else
but would have not broken on a division operator (where it should) due
to it getting caught in the check for a comment-start, without falling
back suitably when it didn't complete that check.

Managed to contrive a suitably twisted change to findDeps test to
reveal the bug; broken previously, now fixed.  Not ideal, as it relied
on another bug to fail previously - backslash-newline shouldn't end a
preprocessing directive line - but it should still pass once that's
fixed, too.  Exercising a bug in qmake usually involves code that
won't compile anyway, making it tricky to write a test that reveals
the bug but that passes once it's fixed.

Change-Id: I08a1d7cc5e3d7fd1ac0a48e5c09dfdfbb7580b11
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:38 +00:00
Edward Welbourne
f1d5641d49 Readability clean-up (purely cosmetic).
Principally *(buffer + expr) -> buffer[expr] changes, with some hspace
normalization on affected lines.  Made some empty loops more visible.
Pulled out a repeated character class test as a function.

Change-Id: I03d1b633550ad1814fa383d69ea04138dd0f82cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:32 +00:00
Edward Welbourne
93466161ca Rip out the #qmake_warning "preprocessor directive".
No-one is known to use it - we don't even have a test for it.  It
plays poorly with the real preprocessor and it has not produced any
output since at least Qt 4.0 (unless qmake is invoked with at least
one -d flag, drowning the output in level 1 debug output).

This incidentally means no preprocessor directive we care about has an
underscore in its keyword.

Task-number: QTBUG-49487
Change-Id: I123a945c1dfe29d1d3ceee1129cfedc043f2e7d4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-20 15:01:26 +00:00
Edward Welbourne
b9ed5b9acf MakefileGenerator::processSources() doesn't need to be virtual.
Only VcprojGenerator over-rode it; and did so with a replacement
identical to the one on the base, so there was no point to it.

Change-Id: I5b899372247809c82b1cae25817e06c5849cd10d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-13 15:10:32 +00:00
Richard Moe Gustavsen
4a2b9e086e Xcode generator: only replace the suffix in the library path
The Xcode generator iterates trought all libraries and replaces
their suffix (e.g "_debug") with a placeholder that lets Xcode
switch between different library versions depending on the target.

The current way we do this fails when the name of a library happens
to contain the string "_debug" (e.g "qmldbg_debugger"). Since we
replace every occurrence of suffix in the path, we end up
replacing that part as well. The result will be linking errors.

This patch ensures that we only replace the last occurrence of the
suffix in the file path.

Task-number: QTBUG-48961
Change-Id: I9fafbe0ea0ad8b9cfd13448d6b28801106e645ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-09 08:35:04 +00:00
Joerg Bornemann
c66b492ced fix vcxproj linker options
Commit 4bb004de94 broke the linker
options in generated Visual Studio projects.
We need to call fixLibFlags on QMAKE_LIBS and QMAKE_LIBS_PRIVATE.

Task-number: QTBUG-48936
Change-Id: I2f12bf0117d27104cd34f2f43fdeb7b948fa375e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-27 18:30:27 +00:00
Liang Qi
6bc1ce9c16 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	src/corelib/kernel/qcfsocketnotifier.cpp
	src/tools/qdoc/qdocindexfiles.cpp

Change-Id: Iae365b23afc611de8794f22cceae8b210d25aa8a
2015-10-23 23:14:22 +02:00
Andy Shaw
3890988bb6 Add support for -Zc:throwingNew option to vcxproj generation for 2015
Task-number: QTBUG-48898
Change-Id: I56abae0cbc56e07fd9bb554b84927c327c1b3232
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-10-23 13:03:12 +00:00
Oswald Buddenhagen
2d8801a962 support relative paths in QMAKE_RPATHDIR
... and make use of it in qt.prf.

[ChangeLog][qmake][Unix] Added support for relative paths in
QMAKE_RPATHDIR.

Note that this technically breaks backwards compatibility, as relative
paths were previously silently resolved against $$_PRO_FILE_PWD_. This
was not documented and seems rather useless, so i'm not worried.

Change-Id: I855042a8962ab34ad4617899a5b9825af0087f8a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-20 17:18:16 +00:00
Oswald Buddenhagen
4b9cdf90ca fix bogus complaints about prl targets without extension in bundles
the library inside a bundle doesn't have an extension.

this doesn't really fix anything except suppressing the error message,
as we discard the result of the operation anyway.

Change-Id: Idfe3d1714dedb59d9d3e86a65f074e516c431389
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-14 15:43:26 +00:00
Oswald Buddenhagen
bc00f3c228 fix the trailing-backslash-in-DESTDIR-on-mingw workaround
at least the mingw version we use now interprets the sequence \# as a
literal hashmark, which completely defeats the previous hack.

the new hack escapes the backslash with another backslash, which appears
to work. however, make does *not* remove the additional backslash, so
the result is a bit ugly.

Change-Id: I591a2be443880b162094d04e5a5e624216b59311
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-14 14:57:54 +00:00
Marc Mutz
48663eafd3 QtCore/qmake: drop some unneeded QChar -> QString conversions
Change-Id: Id2fb5089b0ec51073efb846b59ecc63942cfb60d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-11 12:29:28 +00:00
Tor Arne Vestbø
db2c89beae Stop generating implicit suffix rules in Makefiles
Suffix rules are the old-fashioned way of defining implicit rules for make.
We don't need them as we generate explicit rules for all sources we build.

[ChangeLog][qmake] Makefile output no longer contains implicit
suffix rules, as all sources are built using explicit rules.

Change-Id: I4ecfa5b80c8ae33aea8730836f3baf99dd4951dd
Task-number: QTBUG-30813
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-09 15:15:25 +00:00
Tor Arne Vestbø
9ff1310af5 Distinguish between Objective-C and Objective-C++ sources
Instead of lumping both Objective-C (.m) and Objective-C++ (.mm) sources
into the same pile, passing them on to the same compiler as for C++ (CXX),
with the C++ flags (CXXFLAGS), we follow Apple's lead and treat them as
variants of the C and C++ languages separately, so that Objective-C
sources are built with CC and with CFLAGS, and Objective-C++ sources
with CXX, and CXXFLAGS.

This lets us remove a lot of duplicated flags and definitions from the
QMAKE_OBJECTIVE_CFLAGS variable, which in 99% of the cases just matched
the C++ equivalent. The remaining Objective-C/C++ flags are added to
CFLAGS/CXXFLAGS, as the compiler will just ignore them when running in
C/C++ mode. This matches Xcode, which also doesn't have a separate build
setting for Objective-C/C++ flags.

The Makefile qmake generator has been rewritten to support Objective-C/C++
fully, by not assuming that we're just iterating over the C and C++
extensions when dealing with compilation rules, precompiled headers, etc.
There's some duplicated logic in this code, as inherent by qmake's already
duplicated code paths, but this can be cleaned up when C++11 support is
mandatory and we can use lambda functions.

Task-number: QTBUG-36575
Change-Id: I4f06576d5f49e939333a2e03d965da54119e5e31
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-09 15:15:17 +00:00
Liang Qi
925d6eff3e Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2015-10-02 17:24:58 +00:00
Liang Qi
d0eaa737e1 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/tools/qstring.h
	src/gui/image/qimagereader.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/tools/qdoc/doc/examples/examples.qdoc
	src/widgets/accessible/qaccessiblewidgetfactory_p.h
	src/widgets/doc/qtwidgets.qdocconf

Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
2015-10-02 16:59:55 +02:00
Oswald Buddenhagen
4bb004de94 merge MingwMakefileGenerator::findLibraries() into Win32MakefileGenerator
as a side effect, this makes the extensions used for searching libraries
configurable under windows (QMAKE_LIB_EXTENSIONS).

Change-Id: I3e64304fcadbfe74d601b50a70a73180c894503e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-02 14:01:24 +00:00
Oswald Buddenhagen
dd9ec15640 rewrite windows library handling
first, store the library's full name in the .prl file, like we do on
unix. this is not expected to have any side effects, as QMAKE_PRL_TARGET
was entirely unused under windows so far.

then, rewrite the mingw library handling: instead of letting the linker
resolve the actual libraries, do it ourselves like we do for msvc. we
could not do that before due to the partial file names in the .prl
files: if the library didn't exist at qmake execution time, we'd have to
guess the file extension (the msvc generators never had that problem, as
they know about only one possible extension for libraries anyway).

make use of processPrlFile()'s ability to replace the reference to
the .prl file with the actual library. that way we don't need to
re-assemble the file name from pieces, which was fragile and
inefficient.

QMAKE_*_VERSION_OVERRIDE does not affect libraries coming with .prl
files any more. additionally, it is now used literally (not
numerically), and values less or equal to zero lost their special
meaning as "none" - this isn't a problem, because that's the default
anyway, and there is no need to override bogus versions from .prl files
any more.
no changelog for that, as i found no public traces of that feature
outside qtbase.

[ChangeLog][qmake][Windows] Libraries coming with .prl files can now
have non-standard file extensions and a major version of zero.

[ChangeLog][qmake][Windows][Important Behavior Changes] The .prl files
written by earlier versions of Qt cannot be used any more. This will
affect you if you depend on 3rd party libraries which come with .prl
files. Patch up QMAKE_PRL_TARGET to contain the complete file name of
the library, and replace any /LIBPATH: in QMAKE_PRL_LIBS with -L.

(the part about /LIBPATH: actually refers to the next commit.)

Change-Id: I07399341bff0609cb6db9660cbc62b141fb2ad96
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-02 14:01:20 +00:00
Oswald Buddenhagen
c00e11d573 make .prl processing less convoluted
don't look up the files and normalize the paths multiple times, as this
is inefficient and hard to understand.
on the way, processPrlFile() got unnested, and libExists() got nuked.

note that a missing QMAKE_PRL_TARGET will be now complained about, which
really should never happen.

Change-Id: Ibcd77a7f963204c013548496ecd2d635e1a4baba
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-02 14:01:13 +00:00
Oswald Buddenhagen
3e01f1ad3b make processPrlFile() munge the path less when replacing the target
don't prepend the normalized path to the target name, but replace only
the filename in the original string. this ensures that any variables in
the path are preserved.

Change-Id: I58c2b54b7114bfdbf659e6a6ce3e02c2611900d4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-02 14:01:03 +00:00
Oswald Buddenhagen
3e73e3552c make lflags deduplication independent from link_prl
the dependency doesn't seem to make any sense.

while the deduplication is a bit naive and thus dangerous, it was
already enabled by default anyway by virtue of link_prl being enabled by
default, so this amounts to a non-change for by far most projects.
use no_lflags_merge to disable it.

Change-Id: Ia441931ddbc41ed617aee21e6fe8821e3448d2bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-02 14:01:00 +00:00
Oswald Buddenhagen
2677cc47fc merge processPrlFiles() into findLibraries()
seems pointless to tear apart the functions, on the way duplicating some
boilerplate.

Change-Id: Ide3697ca1c931e8de607ac48c21cecce4781fe13
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-02 14:00:56 +00:00
Oswald Buddenhagen
b39cda2ec2 remove QMAKE_<lib>_SUFFIX support
this feature was added with a dubious commit message a decade ago, was
undocumented, and there are no public traces of it being used.

if i had to guess what it was meant for: to be able to consistently use
-lfoo throughout a project and centrally (e.g., in .qmake.cache) choose
to use foo<bar> (bar possibly being "d") instead. however, more explicit
methods are being used instead, including in qt itself.

Change-Id: Ic3a98dc3aec59876f26909fbf9f7aba32baa05bf
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:56 +00:00
Oswald Buddenhagen
119cb65017 remove support for CONFIG+=compile_libtool
"why not use libtool?"  -- sam
"srsly dude?!"  -- ossi

[ChangeLog][qmake] Support for CONFIG+=compile_libtool was removed. Use
CONFIG+=create_libtool and/or custom compilers instead.

in addition to its utter insanity and superfluousness, this feature was
apparently quite broken anyway (QTBUG-35745).

Change-Id: I8147a2953f5f065735ae3a2206cd5d33a7c1809a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:53 +00:00
Oswald Buddenhagen
ba9f4942b0 remove questionable libtool "compatibility" code from prl processing
this code would get enabled when *not* compiling with libtool, and would
try to use the real library in .libs/ when one tried to link the .la
file (i.e., it would reproduce libtool's functionality). that directory
structure is found only in build directories, so this code was
apparently meant to support mixed projects. that doesn't sound useful.

on top of that, the other code paths that were supposed to treat .la
files like .prl files were disabled before initial release (because
Somebody (TM) noticed that their code "doesn't behave well"). this code
here did the same thing, but at the wrong abstraction level.

as a side effect, this removes an infinite recursion problem in that
code.

Task-number: QTBUG-46910
Change-Id: If5291f5ff42c1412075c195753162c54598a250e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:51 +00:00
Oswald Buddenhagen
3cd49cb628 remove pointless code path
there is no need to consider the "-framework foo" syntax, as we fully
control the list and insert elements exclusively as "-framework" "foo" a
few lines down.

Change-Id: I95fa8b46f53673ea3df1a67a2a44d11f7d679cc6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:47 +00:00
Oswald Buddenhagen
e0470ba2fe remove pointless code from prl processing
the code had a dead variable assignment and no side effects.

Change-Id: I9add8f1776f23a29c103b46dc725b9f386a4495a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:45 +00:00
Oswald Buddenhagen
ffe7f408ea remove bizarre prl substitution code
it appears to have been some weird attempt at back-mapping file names to
-l arguments, which has been made ineffective with the partial #if 0.
i can't even describe what it did at this point.

Change-Id: Ie31cbbe7fab8b21b039bfff5877397af07731f1b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:41 +00:00
Oswald Buddenhagen
d1cebb09b6 make /LIBPATH: deduplication code more like in the unix generator
Change-Id: If7e83a46b1a2ad92723a222daffa687d74636858
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:38 +00:00
Oswald Buddenhagen
5df87614e3 remove link_highest_lib_version misfeature
in retrospect, we were too conservative in 925fd32a2d making the
"feature" optional - it simply makes no sense to have qmake
automatically find the highest major (!) version of a library based on
a loosely defined platform-specific convention (not standard, unlike
ELF's .so versioning) with side effects.

Change-Id: Iba92df433b199a9fbff88358f6e0f6835f2e813d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:36 +00:00
Oswald Buddenhagen
cbbeed519b remove magic patching up of libraries specified by file name
the assumption is that if somebody bothers to actually specify a file
name, they'll most probably go all the way to specify the *correct* file
name. otherwise, they'll use -L/-l flags to specify the libs in a
cross-platform way and rely on qmake's magic.

this code was initially added for the purpose of invoking
findHighestVersion() under windows. this has been off by default for a
while now.

at some point, the code did also swap qt for qt-mt and vice versa if the
specified one was missing. this is obviously gone for a while as well.

the unix code was pretty much broken since day one: there was a regex
match on lib<stub>.* against <stub> itself, which obviously could not
have ever succeeded. consequently, the subsequent code ran into a path
that tried the file name with a trailing dot (instead of a new
extension), which never produced anything meaningful.

[ChangeLog][qmake][Important Behavior Changes] The library lookup has
been simplified. It may be necessary to be more explicit in some edge
cases now.

Change-Id: I5804943f1f7a16d38932b31675caabbda33eada7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:33 +00:00
Oswald Buddenhagen
f734599629 unify handling of library prefixes and extensions
make sure that all specs define QMAKE_{PREFIX,EXTENSION}_{SH,STATIC}LIB,
and adjust the code to make halfways consistent use of these variables,
in particular on windows; Win32MakefileGenerator::getLibTarget() is gone
as a result, as is QMAKE_CYGWIN_SHLIB. still, tons of hardcoded "lib"
references remain in the unix generator, because no-one cares.

Change-Id: I6ccf37cc562f6584221c94fa27b2834412e4e4ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:30 +00:00
Oswald Buddenhagen
d98a23eb7c remove references to $$QMAKE_CYGWIN_EXE
it would cause the unix generator to set TARGET_EXT, but that wasn't
used anywhere. so remove the dead code. if it ever gets re-introduced,
it will be as QMAKE_EXTENSION_EXE.

Change-Id: I44ce3e612651fd229177e37ab6c8879cd8c474b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:25 +00:00
Oswald Buddenhagen
9db1644165 inline NmakeMakefileGenerator::getPdbTarget()
it was used only once, and virtual for no reason whatsoever.

Change-Id: I99411be3dac93d8a129441f656b2443d09108564
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:23 +00:00
Oswald Buddenhagen
6c4d7667e4 remove support for {rvct,arm,ti}_linker
rvct and armcc support are remnants from symbian, while the ti linker
support was never completed in the first place.

Change-Id: I5c9d7f0ce67de24c348cbee4af618a499fe06f16
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:20 +00:00
Oswald Buddenhagen
c111e1553e remove overuse of trimmed()
there is no reason to expect the various list elements to be
space-encumbered, or to tolerate it if they were.

Change-Id: I1a2e5c8d30456b640408503334c55f9262792db5
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:15 +00:00
Oswald Buddenhagen
34a967abc9 de-duplicate calculation of target base
Change-Id: I546fe454f925dd9ad39ba444fa78455c8dbdfde6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:12 +00:00
Oswald Buddenhagen
e88334e013 don't support arbitrary flags in LIBS on windows
there should be no flags other than /LIBPATH: in LIBS (and the variables
that end up in it) - these belong into QMAKE_LFLAGS.

while not very important, this change enables the use of drive-relative
paths using unix path separators.

note that on unix, arbitrary flags must be supported in LIBS due to GNU
ld's --push-state and related position-dependent flags (-whole-archive
in particular). luckily, on unix, flags start with a dash, not a slash.

Started-by: Dyami Caliri <dyami@dragonframe.com>
Change-Id: Ie5764f14d34ad13020ca010499594eed8c69a4a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-01 16:19:08 +00:00
Martin Afanasjew
3964b683f8 qmake: Fix 'Libs:' line in .pc files on OS X
On OS X with a framework-based build of Qt, the 'Libs:' line of the
.pc files generated by `qmake` references the framework. This requires
two separate arguments to the linker: The fixed string '-framework' and
the name of the framework (e.g. 'QtCore'). Only the latter might need
quoting. Prior to this fix, they were treated as a single argument (e.g.
'-framework QtCore'), thus always quoted because of the contained space,
and later lead to errors when trying to link a Qt framework discovered
via `pkg-config`.

Change-Id: I5c11ee651048832007e2ee4ebcbcf2e3212c8f48
Task-number: QTBUG-47162
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-09-28 13:10:42 +00:00
Joerg Bornemann
7a1bc0d3ff fix race in debug_and_release builds of static libs for Unix
Consider a debug_and_release build of a static library.
Set DESTDIR to different values for debug/release.
Let TARGET be the same for debug/release.
Now qmake would generate code in Unix Makefiles like this:
  rm mylib.a
  ar mylib.a ...objects...
  rm debug/mylib.a
  mv mylib.a debug/mylib.a
and for release analogous. This clashes when building in parallel.

This patch resolves this conflict by reducing the commands to:
  rm debug/mylib.a
  ar debug/mylib.a ...objects...

We believe that every ar implementation that's in use for Qt
is able to operate on files in subdirectories.

[ChangeLog][Important Behavior Changes][qmake][Unix] QMAKE_POST_LINK
steps of static libraries are now required to operate on $(TARGET) in
$(DESTDIR) instead of $$OUT_PWD. This matches the Windows backends.

Task-number: QTBUG-48287
Change-Id: I192f488ed74c56bc32862426d9e9d4237d9b8135
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-09-22 14:12:32 +00:00
Joerg Bornemann
d4ebbac1b3 fix parsing of WinRT compiler options
Set defaults before parsing compiler options.
UsePrecompiledHeader, CompileAsWinRT and GenerateWindowsMetadata
options were overwritten after parsing the options.

Task-number: QTBUG-46978
Change-Id: I8c4e423cd13f575fa679b114108b693937908549
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-09-18 09:28:36 +00:00
Oswald Buddenhagen
78f6229222 fix relative rpaths on linux
$ORIGIN (or $LIB) needs to be escaped to survive the trip through
make and the shell.

this shouldn't break anything, as there was simply no way to get it
right so far.

Change-Id: I86337c5994d10dae2e80dd2f858f74874b14bca7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-17 16:35:55 +00:00
Oswald Buddenhagen
554f365322 don't pretend that non-mac supports relative QMAKE_SONAME_PREFIX
unlike in DT_RPATH/DT_RUNPATH and DT_NEEDED, $ORIGIN & co. cannot appear
in DT_SONAME.

Change-Id: I4da23f8419806bdc05d6844ce3397ef43b82914c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-17 16:35:50 +00:00
Jonathan Meier
d05bb9ffb0 Fix qmake messing up headers of generated Visual Studio solution files
While generating Visual Studio 2015 solution files for a project using
the subdirs template qmake writes out both the header for version 2015
and version 2013. The problem is a case fall-through.

Task-number: QTBUG-48110
Change-Id: Ib6ddc1ceb306be9b3098d7b7c66a8ffabbd86481
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-07 08:56:34 +00:00
Liang Qi
afab1546a7 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qmake/doc/snippets/code/doc_src_qmake-manual.pro
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/io/qstorageinfo_unix.cpp
	src/corelib/tools/qbytearray.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/corelib/io/qprocess/tst_qprocess.cpp
	tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
	tests/auto/network/access/qnetworkreply/BLACKLIST

Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
2015-08-26 20:06:57 +02:00
Tor Arne Vestbø
e7e75b8ee2 Fix lookup of Info.plist from mkspecs when shadow-building
Task-number: QTBUG-47450
Change-Id: I87c45154deecd09a5c75f09e607177fa42459e95
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-08-25 11:38:34 +00:00
Morten Johan Sørvig
4738b450d2 Mac: Remove invalid bundle identifier characters
Valid characters are (A-Z,a-z,0-9,-,.).

It is unlikely that we will see anything more exotic
than '_' in bundle/library names, go ahead and replace
that character only.

Task-number: QTBUG-46824
Change-Id: Ia97b7cd6247f40a970b4919363ffb66fb347186c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-08-18 13:34:58 +00:00
Oswald Buddenhagen
f5885f71fd fix quoting in plist creation
unlike everywhere else in this file, destdir is not pre-quoted here.

Task-number: QTBUG-47775
Change-Id: Ia5b0c56bbdd3eb095f81b0f615d68a338ffa52c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-08-18 13:28:24 +00:00
Maurice Kalinowski
d7b847112a WinRT: Fix Visual Studio 2015 project generation
- ApplicationTypeRevision has been updated to 10.0 in the final VS2015
release
- For Universal App project one needs to specify
WindowsTargetPlatformVersion and WindowsTargetPlatformMinVersion
- Disable adding Qt libraries to the DeploymentFiles variable for
Universal Apps. Before an error occurred during build as windeployqt
asked to package the very same files. However, windeployqt also takes
care of plugins and hence we prefer to rely on windeployqt and disable
the link step parsing.

Change-Id: I5180519cabde60dbc7786ef27a6fbe0ef2ac44f3
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-07 10:33:07 +00:00
Maurice Kalinowski
f43a2c20d3 WinRT: Fix build for Windows 10
The SDK Version has been updated, hence include and lib directories were
wrong. Luckily, Microsoft introduced an environment variable in the
final VS2015 release to identify the location. Also has the benefit to
reduce hardcoded paths.

Change-Id: I9726db031d87d119bc7326154b24554c4b685d57
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Mika Lindqvist <postmaster@raasu.org>
2015-08-06 19:36:17 +00:00
Tor Arne Vestbø
e405665318 iOS: Refactor xcodebuild exclusive build logic into standalone makefile
Instead of going to qmake to generate the makefile that we want, we write
the makefile directly and include it from the generated makefile. This
leaves us with a single top level makefile for handling exclusive builds
through xcodebuild, and covers all the various build configurations in
a unified manner. It also allows for improved test device handling.

Change-Id: I66851f181ac4da2c8938645e0aa95ffa0fee33c7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-04 11:59:01 +00:00
Björn Breitmeyer
e5b8c38530 Fixing Wec2013 qmake support for VS2013 SDKs.
SDKs generated from VS2013 use a different folder for
build settings than those generated from VS2012.
Check both folders, before rejecting a potential
SDK.

Change-Id: I5bee5cc3771352adaab07d39ebbc350618f6c573
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-07-21 07:53:35 +00:00
Marc Mutz
521ad6048f qmake: polish some function objects
... by marking the ctors (if any) explicit and the
function-call operator const.

Change-Id: Ia65fbad0dfdccbb31d630a5501c4d6f0f5aa3623
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-08 12:31:08 +00:00
Marc Mutz
51bf806b41 qmake: mark some types movable
They are already held in QVector.

Change-Id: Ib1266956c860ecd4671501ab12ab932a8ce9b7d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-08 12:31:00 +00:00
Liang Qi
0aa2d318b1 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qglobal.h
	src/corelib/global/qsysinfo.h
	src/corelib/global/qsystemdetection.h
	src/corelib/kernel/qobjectdefs.h
	src/plugins/plugins.pro
	tests/auto/widgets/itemviews/qlistview/qlistview.pro

Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
2015-07-01 11:05:26 +02:00
Liang Qi
4dd8a63fc1 Merge remote-tracking branch 'origin/5.5.0' into 5.5
Conflicts:
	src/plugins/platforms/cocoa/qcocoafiledialoghelper.h

Manually fixed src/testlib/qtestcase.cpp to return the right type.

Change-Id: Id1634dbe3d73fefe9431b9f5378846cb187624e4
2015-06-27 13:54:35 +02:00
Jochen Seemann
ee73df8363 allow running msvc2013 mkspecs from msvc2015 shell
Visual Studio 2015 integrates the Windows Runtime development
tools, including the msvc2013 compilers.
This patch fixes the error that mspdb120.dll is missing.
It is typically included through PATH variable of the shell,
which points to the "wrong" location in this case.

Change-Id: I46289721912d6b517c6083612582f67536d28b11
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-06-22 07:53:29 +00:00
Joerg Bornemann
059e1df345 fix PCH related regression in vcxproj generator
When PRECOMPILED_HEADER is set to foo/bar/stable.h and
PRECOMPILED_SOURCE is empty, then a C++ file foo/bar/stable.cpp
is generated that contains the include "stable.h".
We must pass the exact string "stable.h" to the /Yc compile
switch instead of "foo/bar/stable.h".
Commit dc612acdc6 introduced this
regression to allow to have PRECOMPILED_SOURCE in a different
directory than PRECOMPILED_HEADER.

Change-Id: I1a7e096c0455b946a5660d23c70c72abd4c7ac1b
Task-number: QTBUG-46679
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-06-22 06:24:47 +00:00
Richard Moe Gustavsen
b5220d9dff pbuilder_pbx: disable bit code for Xcode projects
With Xcode7, Apple added support for compiling apps to bit code
instead of binary (*). But this is only supported when the deployment
target is at least 6.0. And in Qt-5.5, the deployment target is
still set to 5.1.1. The result is that every Qt application will fail
building once people move to Xcode7.

Instead of bumping the deployment target (which we plan to do
for Qt-5.6), we choose to switch off bit code for now.

 *: https://developer.apple.com/library/prerelease/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html

Change-Id: I23001563439a7726506b7cd2dc77a82533b8a27b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-06-16 11:33:47 +00:00
Simon Hausmann
e2f66f9215 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qwindowspipereader.cpp
	src/corelib/io/qwindowspipereader_p.h
	src/corelib/statemachine/qstatemachine.cpp
	src/corelib/statemachine/qstatemachine_p.h
	src/plugins/platforms/xcb/qxcbconnection.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/tools/qmake/tst_qmake.cpp
	tests/manual/touch/main.cpp

Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
2015-06-03 10:23:56 +02:00
Joerg Bornemann
a1c0a59ce6 deprecate DEPLOYMENT variable
Deprecate the qmake variable DEPLOYMENT that was used for installing
files on remote devices for Windows RT and Windows CE Visual Studio
projects. Use INSTALLS for both nmake and Visual Studio projects.

[ChangeLog][core][qmake] Deprecated the qmake variable DEPLOYMENT in
favor of INSTALLS.

Task-number: QTBUG-21854
Change-Id: Ia9d2c69feb7d87b0b9dc69ff7c0a68be35a57acd
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-02 09:59:32 +00:00
Jani Heikkinen
7bc9310a22 Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5.0 2015-06-02 04:20:54 +00:00
M. Moellney
d83bd9c6f5 Introduce qmake RC_DEFINES for RC preprocessor defines
qmake win32 generators by default used values of DEFINES for RC
preprocessor defines, too. For simple defines this works. For
string literals this failed for the .vcxproj files:

DEFINES += "FOO=\"BAR BAR\"" works for CL but fails for RC.

DEFINES += "FOO=\\\"BAR BAR\\\"" works for RC but fails for CL.

This patch introduces the qmake variable RC_DEFINES. The variable
contains the preprocessor defines, that are used for RC. If the
varible is not set, the DEFINES values are used for RC.

Task-number: QTBUG-44184
Change-Id: I4202271759d29de8c1829347ae3ef117eda54b38
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-02 03:37:07 +00:00
Oswald Buddenhagen
6e008cd579 Merge 5.5 into 5.5.0
Change-Id: I27921a25a0fc56afb5429e40fc1e9b4b9a645a9a
2015-06-01 19:44:29 +02:00
Liang Qi
fcfd31c9fd Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/global/qglobal.h

Change-Id: I2c0f7544bf194f2d0f59218fd583c822901487b0
2015-06-01 17:46:58 +02:00
Oswald Buddenhagen
275709fb43 don't process .prl files recursively
they are self-contained, as they are the result of another project's
full resolution. consequently, recursing them just burns cycles, and
additionally introduces the risk of an endless loop if the file is
botched.

Task-number: QTBUG-12711
Change-Id: I401ee691c170092cc61fe05538cec4272ed8f922
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-06-01 13:27:06 +00:00
Oswald Buddenhagen
85c12d5745 fix incorrect path separators coming from installed .prl files
we use qmake properties in the installed .prl files, so the paths
need to be converted to native separators before emission.

Task-number: QTBUG-46217
Change-Id: If3fb0a84488795478fc2a701271c931c62eba6aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-06-01 13:27:03 +00:00
Maurice Kalinowski
99b08dd9d2 WinRT: Add qmake support for Windows 10
This allows creation of applications for
- x86
- x64
- arm

While the arm build theoretically also allows to launch on
a mobile, it currently asserts on runtime. Either we will
create a new mkspec for Windows 10 Mobile in the future,
or do runtime checks for the environment. That also depends
on whether there will be a separate SDK by Microsoft.

Change-Id: I510bfc88410a5b5a1eb7c37f7f43888d1e5dda0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-05-26 11:09:41 +00:00
Tor Arne Vestbø
34adfc1372 qmake: Place Info.plist in correct location for plugin bundles
Like application bundles on OSX, the plugin bundle has its Info.plist
in the Contents directory.

Change-Id: I216fa79857924beb0e9c5fcc4a8d06b197a3f383
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-24 11:46:07 +00:00
Oswald Buddenhagen
8e797477b9 remove vestiges of -prebind magic
since commit 22edeb3f4 (private; anno 2002), the generator would extract
-prebind and translate it into a PREBINDING property in the pbx file.

the writeout to the pbx file got lost in the rewrite for Xcode 3.2
(commit 66f6e5b1; anno 2012).
this isn't particularly bad, as prebinding is obsolete since OS X 10.3.4.

we now go the last mile and remove the handling of the flag. that means
that remaining projects which still use it (meaninglessly) will get a
warning from Xcode, which is kinda what we want.

QMAKE_LFLAGS should have never been part of the library iteration loop.
it was added there in the prebind handling commit, so we can get rid of
it again now.

Change-Id: Id7dee2b1e248bb2bd7aa7a3e66f82057921afffd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-05-22 19:04:24 +00:00
Oswald Buddenhagen
bcf3a3c113 fix quoting of qmake parameters in 'qmake' target
we need to do full shell quoting, not the limited whitespace quoting.

Task-number: QTBUG-46224
Change-Id: I41bc9aee556ca680dce0875b58159a31db962452
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-22 19:04:21 +00:00
Oswald Buddenhagen
12106b66b9 move symlinking loop into the symlink container emptiness conditional
it obviously makes no sense to set up the loop if the container is empty.
as we now have that conditional anyway ...

Change-Id: I6d95c0102734852443c188012bfcb076d879581e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:44 +00:00
Oswald Buddenhagen
6e3ba36a06 bundles: create Versions/Current only if versioned resources are present
QMAKE_FRAMEWORK_VERSION has a fallback to VER_MAJ (which derives from
VERSION), so it's pretty much always set, thus defeating the previous
check.

amends 6cb495de.

Task-number: QTBUG-46215
Change-Id: I2c5560c469617ebeab978e4de78df00baf38d49d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:41 +00:00
Richard Moe Gustavsen
189280026f xcode generator: use absolute path when creating PBXFileReferences for libraries
Currently, the Xcode generator uses "sourceTree = <absolute>" for
all PBXFileReferences. But the paths we use for referencing
libraries are relative. This patch will change this, so that we
always use absolute paths to be consequent.

This will fix a crash in Xcode that happens when opening
projects generated by Qt.

Change-Id: I3a372b93598a777c96ba353205cf19710a5923f5
Task-number: QTBUG-45966
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-15 13:39:48 +00:00
Richard Moe Gustavsen
d1528919de xcode generator: don't change output_dir when opening a pbx file directly
ProjectBuilderMakefileGenerator::openOutput should only change back
Option::output_dir when creating a pbx file inside an Xcode project.

Since the pbx file will be placed inside a different directory than
output_dir when creating an Xcode project, MakefileGenerator::openOutput()
will redirect output_dir to be inside the Xcode project as well. Since
we don't want this redirection, we change output_dir back to what it
was once the call returns. But we should only do this when creating
the whole Xcode project, since only then we create a pbx file that
is different from output_dir in the first place.

A bug with this is seen when making qt_makeqmake.mak (which is a
helper makefile inside the Xcode project). That file will only
regenerate the pbx file (and not the whole Xcode project), which
means that we don't enter the fileName.isEmpty() section, which
means that output_dir should stay as it is.

Task-number: QTBUG-45826
Change-Id: I03d5c3dec395ff4768f9272fd1981c6fd35efb1e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-05-15 12:09:58 +00:00
Oswald Buddenhagen
93f581e1f2 fix wrong path separators in extra compiler commands
Change-Id: I19a2c53c301becbbe5b70e47067f9a3355f7b04a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-08 15:35:12 +00:00
Oswald Buddenhagen
82449d7251 fix (un-)installation for TEMPLATE = aux
don't try to install the primary target, as it obviously doesn't exist.
however, we must not disarm bundle installation.

Change-Id: I3074150f749220d77c1210a4978e71aff9c9a3a9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-08 15:35:05 +00:00
Oswald Buddenhagen
6cb495dee3 make QMAKE_FRAMEWORK_VERSION work independently of TEMPLATE
QMAKE_BUNDLE_DATA itself does as well, and it can refer to versioned
resources.

Change-Id: I3d9bf23c2ff81dbb1cd929f3f0e0ce1e67f3258a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-27 18:58:47 +00:00
Joerg Bornemann
fc08ac53a0 remove superfluous method re-implementation
Remove a superfluous implementation of
VcprojGenerator::replaceExtraCompilerVariables.
The implementation in the base class is exactly the same.
Use that instead.

Change-Id: Ie7d995be1b0d55fbefd15ae6b7a992237d97839c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-27 13:25:27 +00:00
Oswald Buddenhagen
6e2e0e061f automatically distclean internally generated artifacts
specifically, .prl, .pc, and .la files, and QMAKE_SUBSTITUTES outputs.

Change-Id: I27685125668f0ec2aa81a8f003d3605accf2ab36
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 19:16:54 +00:00
Oswald Buddenhagen
0ce189d20f fix distclean target for plugins under unix
Change-Id: I5ebaba8575dfac9597e1ead92d42955ff626e1b1
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 19:16:52 +00:00
Oswald Buddenhagen
e8dc128d1d don't fail to fix path separators in extra compilers' clean targets
this affects only files explicitly listed via the .clean member without
placeholders, so more or less a corner case.

Change-Id: I7bd55948130aaee116d1a4bebbad0c445b76197b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 09:50:58 +00:00
Oswald Buddenhagen
f228404c24 untangle handling extra compiler .clean member, take 2
fixes clean targets of (most) extra compilers being empty.

amends commit 0812b5b318.

Task-number: QTBUG-45132
Change-Id: I069bca124587df261597a4f8183a4695cd834e29
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 09:50:54 +00:00
Oswald Buddenhagen
5fb0b71a12 fix {ALL,CLEAN,DISTCLEAN}_DEPS writeout to makefile
it helps enormously to put spaces between target names ...

Task-number: QTBUG-45533
Change-Id: Ic41f8287c6c37761b1be3ad7c383b5c7fb714b12
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 09:50:51 +00:00
Oswald Buddenhagen
c4d82dbfc0 make diff between aux and app TEMPLATEs smaller
people may use extra compilers which refer to CXXFLAGS & co., so set
them up "as normal".

Change-Id: I858ca63370a7aed66e04f5417da078b896feefc4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 09:49:14 +00:00
Joerg Bornemann
3c1cb24fe4 fix extra compilers with indirect outputs in VS projects
Evaluate the .output variable of the extra compiler to determine
the file extension of its output.
The VS project generator needs it to determine the filter that
will contain the output file.

Change-Id: Iab1e154a712342401e17421c08975fad13967a5b
Task-number: QTBUG-45717
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-23 09:49:01 +00:00
Oswald Buddenhagen
4c96367410 make fileFixify() calling convention somewhat sane
instead of allowing arbitrary input and output base paths, restrict them
to the project input and output dirs (in any permutation), which are the
only cases ever used anyway.
this permits much clearer call sites, and allows later optimizations.

Change-Id: I48d149a4417af5c858e66ec57c476a5bc6b17f17
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:20 +00:00
Oswald Buddenhagen
6234dec41f unhack Xcode shadow building
explicitly use the correct directories instead of temporarily changing
into the output dir. this makes the code less obfuscated.

Change-Id: Ia935987f486151ae556910703cc20945c7610ffc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:17 +00:00
Oswald Buddenhagen
2c0730839b Revert "Use relative path for QMAKE_BUNDLE_DATA"
turns out that a relative path makes some versions of Xcode crash.
so use an absolute path again.
fileFixify() has been fixed for shadow builds to make this possible.

This reverts commit 6ccf0a326e.

Task-number: QTBUG-45424
Change-Id: Ica87c6c29f990f56e42c399b6d9b1c7eacdd13a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-04-21 12:06:13 +00:00
Oswald Buddenhagen
6accf40a14 make fileFixify(FileFixifyAbsolute) pay attention to in_dir
... instead of sheepishly assuming qmake_pwd().
it also canonicalizes consistently with the relative output path now.

Change-Id: I86231f7259179020643405f3c0e696a74031aa4e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:10 +00:00
Oswald Buddenhagen
ed4bdd3eec fileFixify(): remove bizarre canonicalization
it would trigger only if the input file name was already absolute,
matched the native path separator, and some (likely) other conditions.

as this behavior was almost unpredictable, it would be not very useful.
so save ourselves the headache and just remove it.

Change-Id: Ic457f487f6d0ce9f7a5f192859c9efa9c2de2b63
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-21 12:06:06 +00:00
Oswald Buddenhagen
b532250237 remove pointless argument to build_args()
it's always empty.

Change-Id: Icd97b5ac5b77c119174fdce2671f69c88c607428
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:03 +00:00
Bjoern Breitmeyer
2e18c9af26 Fix incorrect pass by value.
Make sure we don't pass by value, but by const reference.

Change-Id: Ia432e881d2b8116f22a30dfa31186479784ee4a1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-21 11:37:54 +00:00
Bjoern Breitmeyer
60a384cf2f Add QMake support for WEC2013 SDKs
CESDKHandler now retrieves available WEC2013 SDKs from the registry and
assembles a working build environment.

Change-Id: Ifa70f53aca9d1bf2fadf178a331f46c1efca90ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 11:37:48 +00:00
Maurice Kalinowski
50bf54c627 WinPhone: Re-invoke windeployqt in the MSIL directory
Visual Studio copies all files to be deployed into the MSIL directory
and then invokes MDILXapCompile on it, which checks for managed code and
translates it into native code. The problem is that all entries of the
package will be copied into the MSIL directly, losing the subdirectory
structure (for instance for plugins). Hence we recreate the directory
structure manually by invoking windeployqt a second time.

Task-number: QTBUG-41753
Change-Id: I3d99cbc531bbe883f87b45de37ba71d93472c042
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-04-09 11:06:50 +00:00
M. Moellney
fa1b2dc4a0 Fix qmake generating bizarre msvc /VERSION values
The msvc_nmake and msvc_vcproj generators deduced the exe/dll header
version number from the VERSION variable in a "bizarre" way:
VERSION=1.2.3.4567 was converted to /VERSION:1.234567.
But a minor number beyond 65535 is not accepted by the linker.
This fix deduces the major and minor from the major and minor of
VERSION: VERSION=1.2.3.4567 leads to /VERSION:1.2.

In addition, a new variable is introduced: VERSION_PE_HEADER.
With this variable, legacy pro files that rely on the bizarre
behavior can re-create it:
VERSION=1.2.3.45 and VERSION_PE_HEADER=1.2345 lead to the old
result: /VERSION:1.2345 by just taking the VERSION_PE_HEADER to
overrule the new behavior.

Task-number: QTBUG-44823
Change-Id: Ie093ade83290c098fe2b2a429ce5d6ed6dc750ea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-08 15:47:12 +00:00
Oliver Wolff
32849f4997 qmake: Rework dll deployment
QT_INSTALL_LIBS is not the right place to check for Qt dlls, as they
cannot be found there in a non-developer build. In order to be able
to find the dlls and make adding dll locations easier for the user,
QMAKE_DLLS_PATHS was added. On Windows, the variable points to Qt's
bin directory by default.

Task-number: QTBUG-44960
Change-Id: Ie4e5beeaadee798a055599387e842d7c0502c27a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-07 12:55:24 +00:00
Liang Qi
ce9519593a Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
	mkspecs/android-g++/qmake.conf
	qmake/generators/unix/unixmake2.cpp
	src/gui/image/qimage_conversions.cpp

Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
2015-03-31 10:03:31 +02:00
Tor Arne Vestbø
94ea7b7132 Add XCTest logger backend to QtTestLib
Will be active when running test apps through Xcode's 'test' action,
and reports QtTestLib test objects and functions to Xcode as XCTest
cases.

This allows running tests on both iOS Simulator and iOS devices from
the command line, through xcodebuild, without relying on any 3rd party
tools. It also integrates Qt test failures and passes into the Xcode
IDE, which may be useful for closer investigation of test failures.

The feature is limited to Xcode 6.x.

Change-Id: I33d39edbabdbaebef48d2d0eb7e08a1ffb72c397
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-27 16:53:43 +00:00
Joerg Bornemann
49217e9657 add DISTFILES support for Visual Studio projects
Files in DISTFILES are placed into a "Distribution Files"
folder under the project node.

Task-number: QTBUG-43162
Change-Id: Ib75aacf1010d9ea63af89d4a9cc92275d714b3cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-03-27 13:38:15 +00:00
Tor Arne Vestbø
2094903a14 Xcode: Completely filter out environment variables in build log
17d690952b missed a few instances that should have showEnvVarsInLog = 0.

Change-Id: I8f1106426447670b0057aeb421efc09bf117e969
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-16 10:37:04 +00:00
John Brooks
3f8e3373e1 Fix QMAKE_INFO_PLIST regression with relative paths
In de5553aa, qmake was fixed to resolve QMAKE_INFO_PLIST based on the
current pwd to fix QTBUG-21267. This fix was lost as part of 8c138054
in 5.4.

This fixes the error:

"WARNING: Could not resolve Info.plist ..."

when using qmake for shadow builds on OS X.

[ChangeLog][qmake][OS X/iOS] Fixed QMAKE_INFO_PLIST path resolution
for shadow builds

Change-Id: Icb42b2b3a44856f9b9a86a008081a3353951640d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-13 03:48:29 +00:00
Joni Poikelin
fe59121d24 Remove MSVC created lib file for shared library in distclean target
MSVC creates .lib file when ever dll with exports is built. Remove
this file too in distclean target.

Task-number: QTBUG-44685
Change-Id: I84ecb57626926b5bce06a200ff2b705fd2117686
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-12 13:07:26 +00:00
Tor Arne Vestbø
17d690952b iOS: Use Xcode project to filter out environment variables instead of shell
Xcode has a setting for script phases to filter out the environment
variables, so we don't need to use grep.

Change-Id: Ica1c64321385ab3e3b47cf6f8f4d4191bd963540
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-03-09 13:01:12 +00:00
Oswald Buddenhagen
95d385466d centralize setup of shell-related variables in spec_post.prf
it makes no sense to let every spec do that separately, as it's fixed
by the generator+shell.

putting it into a file which is loaded regardless of the spec also
allows us to remove the hardcoded fallbacks from qmake.

if somebody overrode the values in their spec for some weird reasons,
they'll need to override spec_post.prf.

shell-{unix,win32}.conf are now dummies and print warnings.

Task-number: QTBUG-37269
Change-Id: I66c24fb4072ce4d63fdbfc57618daa2a48fa1d80
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-03-06 19:08:40 +00:00
Tor Arne Vestbø
08f6af608a Xcode: Generate scheme manually, instead of letting Xcode do it
A scheme is required to be able to run tests through Xcode, even from the
command line, but Xcode doesn't auto-generate the schemes until launched
as an application. Xcode also auto-generates schemes for all our targets,
but we only need one for the primary application target.

Change-Id: Ia42f3825aba3ffde3be93be55e165d6284434853
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-06 19:01:43 +00:00
Frederik Gladhorn
34b14a8472 Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
	examples/xml/htmlinfo/simpleexample.html
	examples/xml/rsslisting/rsslisting.cpp
	qmake/generators/win32/msbuild_objectmodel.cpp
	src/3rdparty/harfbuzz-ng/src/hb-private.hh
	src/corelib/global/qlogging.cpp
	src/corelib/io/qstorageinfo_unix.cpp
	src/corelib/thread/qwaitcondition_unix.cpp
	src/gui/kernel/qguiapplication.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
	src/testlib/doc/src/qt-webpages.qdoc
	tests/auto/other/qaccessibility/tst_qaccessibility.cpp

Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
2015-02-24 21:02:08 +01:00
Oswald Buddenhagen
217f21c479 remove nonsensical path stripping
we strip the path a few lines above already.

Change-Id: If7524b8e744d2f1ab2f5a6920097d25671449829
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:54 +00:00
Oswald Buddenhagen
0812b5b318 untangle handling extra compiler .clean member
it's easy when it is a simple list of files (or just absent). however,
it can also contain expandos, and in this case it's definitely not a
good idea to treat it partly (but not really) as a single shell command.

Change-Id: I7ef32a56f276b06579fc7094357c5f7612eaf205
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:51 +00:00
Oswald Buddenhagen
6c4d8ee835 fix fixPathToTargetOS() nesting
first replaceExtraCompilerVariables(..., NoShell), then fix the final result.

Change-Id: If8cebeaa59f48d91b33b5a74e6a48a0d2d049643
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:49 +00:00
Oswald Buddenhagen
5527411437 remove pointless fixPathToTargetOS() calls
it makes no sense to call it on paths that are fixified right before or
after, as fileFixify() calls it itself.

and verifyExtraCompiler() calls normalizePath() on its file argument.

Change-Id: I8fb21e129fd29428d1855de73483087842bc1bdd
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:47 +00:00