Commit Graph

145 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
e0962270d7 replace incorrect uses of fixPathToLocalOS() (mostly)
in most cases, it actually means normalizePath() (because the file name is
used with qt i/o functions afterwards).
this affects QMakeLocalFile::local() as well, so many not immediately
obvious places are affected as well.
there was also one case of fixPathToTargetOS() falling into this category.
this is mostly a no-op, as the qt functions are agnostic to the path
separator.

in some other cases (in particular in the vcproj generator), it actually
means fixPathToTargetOS().
this is mostly a no-op as well, as the two functions are equal except on
msys anyway.

in the <meta file>FileName() functions, the use of a fixPath*() function
is bogus in the first place - fileFixify() already does
fixPathToTargetOS(), and this is correct when the file name is used
verbatim in a make command (which it is). otherwise it's irrelevant.

Change-Id: I26712da8f888c704f8b7f42dbe24c941b6ad031d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:44 +00:00
Oswald Buddenhagen
e3a7237d82 fix quoting issues. all of them. (*)
instead of quoting more or less random variable contents early,
consistently quote everything only right before it is needed. this way
we can be sure that everything is correctly quoted, but not over-quoted.

this removed the need for the insanity that unescapeFilePath() and
similar ad-hoc contraptions were.
this had the somewhat counter-intuitive effect that it was possible to
remove escapeFilePath() calls from PBX::writeSettings() calls - these
were actually only unescaping.

[ChangeLog][qmake][Important Behavior Changes] A lot of quoting issues
have been fixed. As a side effect, qmake has become more sensitive to
over-quoted file names in project files.

(*) ok, maybe not. close enough.

Task-number: fatal: out of memory
Change-Id: I8c51cfffb59ccd156b46bd5c56754c480667443a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:27:29 +00:00