Commit Graph

78 Commits

Author SHA1 Message Date
Oswald Buddenhagen
14bbab09c1 introduce ability to build projects for the host system
when qmake runs into the new option(host_build) command, it will restart
the project evaluation with a host spec.

the new default host spec is called default-host (gasp!). it is
overridden with the pre-exising -spec / -platform option, while the new
-xspec / -xplatform option overrides the pre-existing default spec.
specifying -spec but not -xspec will set the xspec, too, so the behavior
is backwards-compatible. same for the XQMAKESPEC override read from
.qmake.cache and the environment variable.
the cleaner solution would be adding -hostspec, to be symmetrical with
the override semantics, but that would deviate from configure in turn.

Change-Id: I4297c873780af16ab7928421b434ce0f1d3820da
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:37:49 +02:00
Andy Shaw
4524187129 Remove unnecessary code from the XCode generator
Since we only support XCode 3 and later, then all of the legacy code can
be safely removed.

Change-Id: I9be8555aaa62c716b2277c2b97f41aa02d27ef13
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 17:40:21 +02:00
Thiago Macieira
28aa3324de Port away from QString::{to,from}Ascii in qmake
Properly use from/toLocal8Bit when referring to user data, even file
names.

Change-Id: I8fc7afa2ea570f8b1b1eecf354f01d6dfe0883cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-14 17:33:04 +02:00
Mark Brand
8e053a5dfc fix static library names when generating .pc files for pkgconfig
219a688ac1 added the version extension
which only occurs on the DLL import library.

Change-Id: Ie913adf039d7f3a9aadf43f4af014289a8aeacbe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Hib Eris <hib@hiberis.nl>
2012-04-19 19:46:07 +02:00
Lars Knoll
64255ef650 Merge remote-tracking branch 'origin/api_changes'
Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
2012-04-17 12:58:52 +02:00
Joerg Bornemann
ac7dd2782f qmake vc(x)proj generator: don't create bogus directories
When creating the temporary project object,
Option::output_dir must be adjusted temporarily.

Task-number: QTBUG-22788
Change-Id: Ibf8897a46b63f48b9e33d7e2168b09e559cecec7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-17 03:26:32 +02:00
Joerg Bornemann
8987e5d2cb qmake/Win: fix incomplete generated version resource
Since Windows Vista the resource language must be included to
make the version information visible in Windows Explorer.

Two new variables have been introduced:
RC_LANG (default: 1033) - resource language
RC_CODEPAGE (default: 1200) - resource codepage

Task-number: QTBUG-23218
Change-Id: I29e102d19501e3b7a43d5096fc4806bc38a4d846
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-04-17 03:26:32 +02:00
Joerg Bornemann
31cfe5ca1b qmake vcxproj generator: fix handling of /MANIFEST:NO linker option
Task-number: QTBUG-23513

Change-Id: I5dd6fb6fd7910e43acd28057133a3ad6613cfc1a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-04-17 03:26:32 +02:00
Joerg Bornemann
65425be8fe qmake vcproj generator: unused variable removed
Change-Id: Iaf8bb1772846001297e1a421c3860f5e4d090a35
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-17 03:26:32 +02:00
Lars Knoll
9bd0323551 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/corelib/io/qurl.cpp
	src/gui/kernel/qwindow.cpp
	src/tools/moc/generator.cpp
	src/widgets/kernel/qwidget_qpa.cpp
	src/widgets/styles/qstyle.h
	src/widgets/widgets/qtabbar.cpp
	tests/auto/corelib/codecs/utf8/tst_utf8.cpp

Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
2012-04-16 12:04:34 +02:00
Joerg Bornemann
99a2074369 qmake vc(x)project generator: fix VC++ Express detection
If VC++ 2010 Express and VC# 2010 Express are installed, then the
installation path is written in two places into the registry.
We're now filtering detected installations with the same installation
path.

Task-number: QTBUG-24956

Change-Id: I401430e7aa81d96c523d8172d2a2e9d40ebdb3ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-12 04:15:05 +02:00
Oswald Buddenhagen
143c4d3e13 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/widgets/styles/qwindowsxpstyle.cpp
	tests/auto/gui/kernel/qwindow/qwindow.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp

Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
2012-04-10 15:31:45 +02:00
Joerg Bornemann
0174c966f7 qmake vcxproj generator: properly escape XML attributes
Task-number: QTBUG-24954

Change-Id: I21299440ba3f268c2fa1e14d37003cdc3e6a35ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-05 17:48:15 +02:00
Yuchen Deng
c7f8f459bd Fix build all failed for 'TEMPLATE = aux'
NMAKE : fatal error U1073: don't know how to make 'all'
Stop.

Change-Id: I387a417d37e38811706a1ff460df8ee581c6a33f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-02 12:41:32 +02:00
Kent Hansen
95d6f8a4cf Merge master into api_changes
Conflicts:
	src/corelib/tools/qvector.h
	tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp

Change-Id: I877256e95f3788e617437f4e9661a88047f38cd6
2012-03-19 10:03:48 +01:00
Olivier Goffart
3abc6be685 Build qmake with QStringBuilder.
QStringBuilder will be enabled by default so qmake should build with it.

qstringbuiler.cpp has to be compiled in just for the convertFromAscii
(The alternative was to build with QT_NO_CAST_FROM_ASCII, but that would
be too much work)

Change-Id: I1fbeed7ed8a9d3bc38ef591a687c50644980e2fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-16 23:02:15 +01:00
Oswald Buddenhagen
c0791b86ab allow the unix generator to run in windows host mode
this is a complete bastardization of the concept and breaks the (unused)
debugging feature to create proper unix makefiles under windows, but
apparently it permits cross-compiling unix targets under windows.

Change-Id: I4ee95a20e7d6a6b2063ec7aa22f52c1a97d78a77
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-16 18:12:41 +01:00
Oswald Buddenhagen
2640b71be4 remove support for QMAKE_PLATFORM_DIR
this was a somewhat magic support for sysroots, automatically rewriting
a number of path-holding variables. this was (as usual) completely
undocumented, extremely fragile, and we are coming up with something
better now anyway.

Change-Id: I045910f532cb3efc839ea81c7a48f8db695e4092
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-08 23:52:34 +01:00
Oswald Buddenhagen
6c612c9338 move postProcessProject() call to sane location
there is totally no reason to call it unless the project is actually
used for makefile generation, and the excessive calls actually mess up
things.

Change-Id: Idb7912a5404f6054010d2f29cce820a167de4f6f
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-07 22:46:29 +01:00
Max Desyatov
9d5e721e96 escape *_script_file usages in MingwMakefileGenerator::writeObjectsPart
Task-number: QTBUG-24595
Change-Id: I1e78a6015247b9e41ae2b05b50fdedf0613f00f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-06 12:28:26 +01:00
Oswald Buddenhagen
703ef4f79e make QMakeProject's copy c'tor actually behave like one
instead of initializing base_vars with the original's vars, initialize
vars itself. this has two consequences:
- there is no need to call read(0) to initialize vars
- one cannot usefully call the complex read() anymore, as that would
  re-initialize vars from base_vars

this is much closer to an actual copy than the previous "seeding with
existing project".

Change-Id: Ib007bc5b779aedb680a27329aa578f7c604a4308
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-06 06:34:47 +01:00
Lars Knoll
96232be146 Merge remote-tracking branch 'origin/api_changes'
Conflicts:
	dist/changes-5.0.0
	mkspecs/features/qt_module_config.prf
	qmake/project.cpp
	qmake/property.cpp

Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
2012-03-04 21:45:05 +01:00
Oswald Buddenhagen
c679b2f0a6 get rid of Option::user_configs
merge them into before_user_vars. they are evaluated right after another
anyway.

Change-Id: I11859284b363fee01233f6e20989444fef711d0d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-02 21:33:08 +01:00
Oswald Buddenhagen
dce3821b8a make evaluation of spec+cache independent of build pass context
don't inject the build pass specific variables into the project even
before evaluating the .spec file and the .qmake.cache. they are not
supposed to base configuration on that - feature files should do that
later.

the immediate advantage of this is that base_vars is never manipulated
upfront any more, which allows for cleaner setup paths. also, we can do
more caching of the spec+cache contents.

Change-Id: I19d7f8bec1fb7c3b54121e26794340b287055ebf
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-02 21:33:08 +01:00
Oswald Buddenhagen
93ee903da7 clean up build pass project initialization
instead of messing with the Option singleton, add a way to inject
extra config values into QMakeProject.

Change-Id: Ia347dcc38af2c72913e30ebf5c2b4044f93b4f5f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-02 08:43:21 +01:00
Oswald Buddenhagen
012f799254 revamp -sysroot and -hostprefix handling
instead of being a variable added to the makespec (via qconfig.pri),
QT_SYSROOT is now a property.

the QT_INSTALL_... properties are now automatically prefixed with the
sysroot; the raw values are available as QT_RAW_INSTALL_... - this is
expected to cause the least migration effort for existing projects.

-hostprefix and the new -hostbindir & -hostdatadir now feed the new
QT_HOST_... properties.

adapted the qmake feature files and the qtbase build system accordingly.

Change-Id: Iaa9b65bc10d9fe9c4988d620c70a8ce72177f8d4
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-01 23:18:23 +01:00
Andy Shaw
221fe8776b Add support for XCode 4 into qmake
This adds support for XCode 4 into qmake and also indirectly fixes a
couple of problems that are relevant for XCode 3.2 too

Task-number: QTBUG-17247
Change-Id: I722470ad1854bd740cbbd28ff4956057a0e1906b
Reviewed-by: David Forstenlechner <dforsten@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
(cherry picked from commit b5871311457ca97816c0abbb8b935570bbfb657c)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-01 00:09:57 +01:00
Rohan McGovern
98dd1781d9 Merge master -> api_changes
Includes fixes for tst_qfiledialog2, tst_qtextedit autotests on mac.

Change-Id: I49cac26894d31291a8339ccc1eb80b6a940f0827
2012-02-29 09:23:14 +10:00
Hib Eris
78faefdbb1 Implement missing replacements when installing .pc files for win32
This implements replacements for win32 makefile generators similar
to the replacement functionality in unix makefile generators.

To enable Makefile code generation for replacements in win32 makefile
generators, you must set QMAKE_STREAM_EDITOR to e.g. sed.

When building for win32, sed is normally only available in the
mingw/msys build environment and when cross compiling on unix.
In these cases QMAKE_STREAM_EDITOR is set to sed in qmake.conf.

For other win32 build environments QMAKE_STREAM_EDITOR is not set
in qmake.conf and the replacements Makefile code is not generated.

Change-Id: Ie5de5d517eafaeaa2544f1e972aec3fe11d0a6f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-29 00:05:38 +01:00
Oswald Buddenhagen
e76d72aec5 don't generate bogus TARGETs
Change-Id: Ia99cd8862157e5630506d02b3c7e9b35d4bc3302
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-27 20:52:45 +01:00
Marc Mutz
8397a44bed QByteArray: deprecate QT_NO_CAST_FROM_BYTEARRAY-protected operators
The QByteArray::operator const {char,void}*() implicit
conversions are a source of subtle bugs, so they right-
fully can be disabled with QT_NO_CAST_FROM_BYTEARRAY.

  const char *d = qstring.toLatin1(); // implicit conversion
  while ( d ) // oops: d points to freed memory
     // ...

But almost no-one ever enabled this macros in the wild
and many were bitten by these implicit conversions, so
this patch deprecates them.

I would have liked to remove them completely, but there
are just too many occurrences even in Qt itself to hope
to find all conditionally-compiled code that uses these.

Also fixes all code that needs to compile under
QT_NO_DEPRECATED (in qmake/, src/tools/).

I984706452db7d0841620a0f64e179906123f3849 separately
deals with the bulk of changes in src/ and examples/.

Depends on I5ea1ad3c96d9e64167be53c0c418c7b7dba51f68.

Change-Id: I8d47e6c293c80f61c6288c9f8d42fda41afe2267
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-26 09:14:11 +01:00
Hib Eris
219a688ac1 Add TARGET_VERSION_EXT to pkgConfiglibName
The libName that is used in pkgConfig files should include the
TARGET_VERSION_EXT.

This is needed because in Win32MakefileGenerator::fixTargetExt(),
the TARGET_VERSION_EXT is added to the library name.

In Win32MakefileGenerator::processVars(), if TARGET_VERSION_EXT is empty,
it is set to VER_MAJ.

On platforms != Windows, TARGET_VERSION_EXT does not seem to be used.

We probably got away with this so far because pkgconfig files generation
for win32 was just added in 4.8 and nobody uses them yet, and because on
platforms != windows the TARGET_VERSION_EXT is not used.

Change-Id: I56f239e389f0ef926030e4c2376cadd92c4f673c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-24 16:21:37 +01:00
Hib Eris
cbf8f03cf4 Create target pkgconfig dir in qmake generated Windows Makefiles
Change-Id: Icea70987ee3c6040ca3ba278a578849cb74156f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-24 11:29:43 +01:00
Andreas Hartmetz
553ffa0118 Revert "Escape project file name in makefile rebuild rules."
It was the result of miscoordination between Andreas Holzammer and me,
duplicating the functional change of commit
ea2c9f764f.
This reverts commit 8b7a9b4898.

Change-Id: I9a47746c1c12ca00b2dc5c5d50e99f9bf990e3f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-23 16:38:45 +01:00
Stephen Kelly
7a7d82ffd9 Implement QMAKE_SUBSTITUTES.config = verbatim.
Change-Id: Ie0b333fa7fae2283e99e42f9cd7bab4e84991f40
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-11 13:30:31 +01:00
Andreas Holzammer
8b7a9b4898 Escape project file name in makefile rebuild rules.
Change-Id: I5407c2477613119b5aea2d00eb88cc24d35788ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-11 13:30:31 +01:00
Andreas Holzammer
e5830479d6 Escape Dependencies of precompiled header right.
Change-Id: I847c85250b78a934bd29e09250d209d9ef412f7f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-10 11:24:48 +01:00
Friedemann Kleint
9f54846d95 qmake: Work around MSVC compiler bug.
Disable optimization for getProjectUUID() as it triggers
ASSERT: "&other != this" at qstring.h:720 with -O2.

Change-Id: I51b31d4318ba9be187c186623099171d8f48235b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-05 19:03:18 +01:00
Andreas Hartmetz
ea2c9f764f Escape path names in qmake-generated Makefiles.
qmake-generated Makefiles since 4.6 (according to bug report) contain
recursive qmake invocations with absolute paths to .pro files, where the
absolute paths are not escaped.

Task-number: QTBUG-11776
Change-Id: I49772c7d9147efea3bb7b9623c61d92aa0bb6857
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-31 11:47:11 +01:00
Jason McDonald
5635823e17 Remove "All rights reserved" line from license headers.
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.

Change-Id: I311e001373776812699d6efc045b5f742890c689
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 03:54:59 +01:00
Jason McDonald
629d6eda5c Update contact information in license headers.
Replace Nokia contact email address with Qt Project website.

Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-23 04:04:33 +01:00
Kurt Korbatits
0d128aded5 qmake wasn't handling spaces in names when dealing with extra installs.
When installing extra binaries the paths where not being escaped,
causing stripping and deleting to fail when dealing with filenames
that contained one or more spaces.

Change-Id: Iba4517b1110f6af30f7e2662cb86024a8b7b81f7
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-14 05:36:54 +01:00
Oswald Buddenhagen
3e4f7ed5ed QMap => QHash
this should make the evaluator quite a lot faster. the total win for
qtbase/src is only 6%, though.

i made some effort to avoid that output files get randomized. however, i
didn't bother to keep debug output sorted.

Change-Id: Id9cef4674c0153c11ebbb65cb63bf8c229eb56e3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-10 16:16:34 +01:00
Joerg Bornemann
ece75a8adf qmake: fix default value for C++ optimization in vcxproj files
For the debug configuration the optimization should be turned off.

Task-number: QTBUG-23421

Change-Id: Ib63e0c51f9ab31180ff8ee01a1f6c57ab77e390e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-08 18:21:00 +01:00
Joerg Bornemann
c85121989f qmake: fix /MP option for VS 2010
Setting QMAKE_CFLAGS+=/MP in a project file did not work for VS 2010.

Task-number: QTBUG-23490

Change-Id: I39c349bf8dc2a4add2f32a430a245a20cc54147e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-08 18:20:54 +01:00
Friedemann Kleint
1ff1288c04 Make QUuid a class.
Silence MSVC warnings about forward-declarations as class
in the metatype system.

Change-Id: I676662e5919585e98c87413fd8360d6f41f73631
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-06 19:24:23 +01:00
Jason McDonald
1fdfc2abfe Update copyright year in license headers.
Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 06:36:56 +01:00
Tor Arne Vestbø
47df122259 qmake: Add object_parallel_to_source config option
This solves the problem of two source files in the same project
having the same name, which ends up with colliding object files.
It also solves issues with moving files around in the source tree
when the GNUmake option is used together with gcc_MD_depends,
where the dependency file would end up with a dependency to the
old source location.

We already have object_with_source option, but that does not play
nicely with shadow-builds. The new option tries to keep the same
hirarcy in the output dir (while still respecting OBJECTS_DIR),
as the sources. Any source with a path outside of the root project
directory (absolute or relative, ../../foo.cpp), will be put inside
the objects directory with the full path appended.

Change-Id: I0c96291974f4801f4c55a26485d512b15c144c00
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-07 12:55:28 +01:00
Tor Arne Vestbø
f9d5d23508 qmake: Don't assume that GNUmake is able to resolve arbitrary dependencies
Extra compilers may define a depend_command that's used to generate
dependencies for each input. When GNUmake was enabled we failed to
run this command, which was affecting resource files, as resource
dependencies are handled by an extra compiler defined in resources.prf.

The result was that changes to resources included in a resources-file
did not trigger a re-run of qrc and subsequent recompile of the
resource object file.

We must always run these custom dependency commands, even when GNUmake
(and the extended gcc_MD_depends option) is enabled, as GCC is only able
to handle regular #include-type dependencies. Hence, the check for the
'include_deps' flag was removed from doDepends(), and the check for
GNUmake was moved to the one place where it still made sense -- when
deciding whether or not to do recursive dependency checking.

Change-Id: I5ddb75c873120c90f798808efc52e81500786301
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-11-28 15:08:01 +01:00
Tor Arne Vestbø
ca572a6144 qmake: Allow extra compilers to have the makefile depend on its inputs
And enable this configuration option for the resource compiler. This
results in a re-run of qmake whenever you touch a qrc file, which is
needed to keep the dependencies up to date. Otherwise you might end
up in the situation where you add a file to a qrc, edit the file some
time later, but a rebuild does not regenerate a cpp file and compile
that, so the final binary is stale.

Technically this dependency problem is present for all source files,
and qrc files are no different than any cpp file that you add a new
header #include to, or adding a Q_OBJECT macro to a header. To pick
up these changes we have to re-run qmake, so that qmake can run its
internal dependency checking, and any extra compiler dependency
commands.

The reason we're making this change for rcc files it that conceptually
people treat them as a "project" files, and expect them to behave similarly
to .pro or .pri files, in that editing the file will invalidate the
makefile. In practice this is often what happens when adding new
headers, as you touch the project file when changing the HEADERS
variable.

Task-number: QTBUG-13334
Change-Id: If69149678e7fba6d812d31dcc17877427f9a6122
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-28 13:35:42 +01:00