This change will be needed during migration from QByteArrayData to
QArrayData.
Change-Id: I0c8d6f9ed3ef7c33af62736af55259a8f9a70c0f
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The only use of QUrl in qmake, moc, uic and rcc is due to QVariant's
internals, so let's disable it. This means those binaries are now
probably a lot smaller since the parsing and IDNA code don't need to
be present.
Change-Id: Ie156b0817d119b2ba5d3dcb9712a9fea2ee7d4a1
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
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>
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>
Commit 8e5eb1bddc introduced the assumtion that mkspecs are
immediately below the mkspecs directory itself. This is not true for
e.g. unsupported/blackberry-armv7le-qcc.
This commit restores qmake's ability to find the "root" of the mkspecs
collection no matter how deeply the actual mkspecs are nested.
Task-number: QTBUG-24665
Change-Id: I98faaf8e6ae7b8524277aea6c17e685e507e37b3
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
this makes the "sysrootable" properties more magic, with the raw
versions being omitted from the qmake -query output and automatically
falling back to the "cooked" variant if there is no sysroot set.
this makes the "normal" qmake -query less noisy. this will become even
more obvious when i add more "overloads" of the properties.
Change-Id: I08000986427264ec6238c8fe0a77f5cecdbf1201
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
the feature is rather obscure and unlikely to be used by anyone.
Change-Id: I2dfb4ca4d5d1f210d385c013f46bc6389fd6ea2d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
make is perfectly capable of doing shadow builds
Change-Id: I7e1c27cddc385b7a17ae5645b9cd26fa56d2f029
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
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>
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>
the project build root can of course be empty - if there is neither an
mkspecs/ nor a .qmake.cache - or no project in the first place (-query).
Change-Id: I9595b0b4ad80a9086dcd48c9ae62b3e8bd1b6f2f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
The -spec argument was interpreted as a relative directory as
soon as it contained a slash. Fix this by checking if the
directory exists before attempting to interpret it.
Change-Id: Ide8f0418abc719b0be582d2d72642a141f6c6dea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This will be used later on as a base class for QTemporaryFile and
QSaveFile.
Change-Id: Ic2e1d232f95dc29b8e2f75e24a881ab459d3f037
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
clean up the somewhat convoluted code paths which forced re-evaluation.
now that the spec+cache are evaluated in a completely clean context
anyway, there is no point in re-evaluating them for build passes.
Change-Id: I12279083238e9ca7028af97f45e2638c8dc715b8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
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>
load()/include() with a target namespace would inherit the current
context. however, if you source a project with all bells and whistles,
this makes completely no sense and may be actually counterproductive.
infile()/$$fromfile() would have interited only the functions from the
current context. that was only a hack to support abusing them.
Change-Id: I2e992b923d9e5b0e5056001ca49b35de573abc63
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
this is a hack from the times when these functions were (ab)used to
inspect proper project files, but the inclusion was done with a clean
project, so that the included files did not have any functions to work
with.
Change-Id: I19925e8ead597ca38df040000c183e368b32c06d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
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>
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>
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>
this is a one-time operation which depends only on the invocation, so
this new home is much more appropriate.
Change-Id: I07c66d95a9ae01a664cec17564995311fb78ec9b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
that way qtbase will find its spec without hacking .qmake.cache.
note that passing "-spec default" on the command line would have already
triggered the normal path, so artificial limitation did not even provide
safety against abuse (it is arguably pointless/counterproductive for
other projects than qtbase to have a default spec).
Change-Id: Ib0c3e6498fd70cd6f9561951d72a47165878bb33
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
nothing to be found in <sourcedir>/include.
neither in <builddir>/src/corelib/xml.
Change-Id: I381391a64542dc2ac7b421b6646c60a1b7a14639
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
makes the file a "tad" more concise
Change-Id: I81d9721942890659ac93b32f5988f9c005c88e87
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
the only difference is in the copy & del commands. the msys tools are
tolerant about windows paths, so this just works.
the in-makefile variant detection is stolen from tools/configure/.
Change-Id: Ia283c1fe2e2aaa8cd5b1dfd7ae29244115f07d65
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
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>
that is, spec/../features/ (i.e., mkspecs/features/) - and not any
directory up to the root.
Change-Id: Ie5fdf2898fba5ac93583571edc24629471604798
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
make it table-driven and have it cache the immutable values from
QLibraryInfo.
Change-Id: I07ed89152aa964bc9edf4436ee7c42f99cc6bcd3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
moving the detection of .qmake.cache to the qmake startup had the side
effect that a suddenly popping up cache would not be picked up by
nested projects any more.
this is not supposed to work in the first place, but the syncqt hack for
building against non-installed modules relies on it. until we have
cleaned that up properly, we need a way to notify qmake about the
appearance of the cache file.
Change-Id: I450646b936e3bb2ef2ed3aba05df58e521ccdc61
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
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>
there is no reason for doing that. there is even reason for *not* doing
it (the enums running out of sync).
Change-Id: Ieb7d015ca497a6675cc85da4c2e0af0c1533dd7a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
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>
qmake would look for mkspecs/ in the directory containing the current
project file. this makes completely no sense with recursive projects:
a) nobody would make per-project specs and b) specs meant to be global
would not be found.
consequently, we look for a project root when starting qmake and use
only that directory.
if .qmake.cache is found/set, we assume that to be the project root.
otherwise, we search for mkspecs/ the same way we search for the cache -
just to up until we find one or hit the root. if we are shadow-building,
search the build dir as well.
Change-Id: Ie66b189a40c21203d956e681cbef44a89f98cd17
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
this is way more predictable than resolving it later.
Change-Id: I0ce27977b795bde9235e1d51d6f2d0d917f2398c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
this is a one-time operation which depends only on the invocation, so
this new home is much more appropriate.
Change-Id: I11ef30a8227afed06e58e64e65809dba25e81567
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
it's generally redundant with DataPath which we already look into.
this is consistent with where mkspecs are looked for.
i don't think anyone will notice this "loss" ...
Change-Id: Iab7c35cc22ba53e1005f26b5d85d41cf4dafad07
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
no point in saving the context when we are not actually modifying the
current context.
Change-Id: Id6f51a163e86bdf402aa0713737b655db68e7ee8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
we already initialize it before parsing a project. if a project is daft
enough to clear TARGET, it does not deserve differently than breaking.
Change-Id: I6c727bc27d72a00e84b676ae3c169024bdb2d929
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
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>