Commit Graph

128 Commits

Author SHA1 Message Date
Oswald Buddenhagen
059200a44b move .qmake.cache search to Option
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>
2012-02-28 09:13:31 +01:00
Oswald Buddenhagen
bf29a8a27d don't look for features in PrefixPath
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>
2012-02-28 09:13:00 +01:00
Oswald Buddenhagen
dd7befcfd8 scope context saving more minimally
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>
2012-02-28 09:12:30 +01:00
Oswald Buddenhagen
e34ee31270 remove fallback re-initialization of TARGET after parsing project
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>
2012-02-26 13:23:49 +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
Rohan McGovern
8583bc914a Fixed resolution of QMAKESPEC on Windows.
base_vars["QMAKESPEC_ORIGINAL"] is not guaranteed to be set the first
time resolveSpec is called, since an include() can wipe it out.  Change
it so that resolveSpec is called repeatedly until some
QMAKESPEC_ORIGINAL is set.

The code which attempted to remove all of the path up to the last / was
incorrect and must have been dead code (or its wrongness didn't matter)
until now.

Change-Id: I2b31ae10fc284ac7293c3cd95e5a2fd503ca7ab0
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-02-23 21:51:24 +01:00
Oswald Buddenhagen
a0da58b5dd make resolution of default spec less inefficient
resolve only once, in particular on unix.

Change-Id: I090698fc6029322a3a16d179d461af3e8336f6ad
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-02-21 22:31:00 +01:00
Oswald Buddenhagen
d5afe6e7e4 remove bizarre late feeding of user_configs into base_vars
there is no obvious reason why this should happen. if base_vars is used
again, the user configs will be parsed again, too.

Change-Id: Ib56e01a468cdb5e81d610bcaf0163bf730cbae05
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-02-21 18:41:40 +01:00
Oswald Buddenhagen
af93c70de7 consolidate Read* options
this brings some clarity which combinations are actually possible, which
allows for some optimization later on.

Change-Id: I930027e426c5f9abea8d21eb1ebaa39bd29787b8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-09 22:11:13 +01:00
Giotis Nikos
6b807a283c Fix qmake evaluation of QMAKE_TARGET.arch on msvc2010 x86_64
This change is needed because msvc2010 tools have a '\' character at
the end of environment variable VCINSTALLDIR. This variable on msvc2008
does not have this '\' character at its end. Without this change
QMAKE_TARGET.arch on msvc2010 x64 evaluates to x86 instead of x86_64.

Task-number: QTBUG-22686

Change-Id: Ifba833e9361c97568b8b3de9976023e8537b208a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-08 07:48:43 +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
Oswald Buddenhagen
365b5f7a92 "cache" is used only locally, so move it into scope
Change-Id: I0ba45d5620a8e5a79fdc6a1854245a0bfcc489f0
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-27 10:54:48 +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
Orgad Shaneh
f9b94a7ee1 qmake: Normalize paths instead of converting to native separators
Task-number: QTBUG-22738

Change-Id: I40163a883d84beff79f52bff141d61dfe921c129
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-19 00:17:32 +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
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
Joerg Bornemann
981dd3b314 qmake: remove symbian support
Change-Id: I1db834500921681676a6f46e7750bdd81bf0093d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-07 13:26:41 +01:00
Marius Storm-Olsen
289d5aed37 Make qmake load default_pre.prf for each project, like default_post.prf
If you ran qmake with 'qmake -r', default_pre.prf would only be run once
while default_post.prf would run for every sub-project.

This makes it more symmetrical and correct.

Change-Id: I1d096c38dffb16f1d256c511ed9e2912cfaefe66
Reviewed-on: http://codereview.qt.nokia.com/1716
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-07-21 20:40:51 +02:00
Marius Storm-Olsen
5e4d13e55c Remove loading "default" as a fall-back for missing "default_pre"
"default" was used a very long time ago, and it's time to let it go.

Change-Id: I230573ef778789f6e1a5a7df3543e660392da39b
Reviewed-on: http://codereview.qt.nokia.com/1746
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-07-21 20:40:51 +02:00
Oswald Buddenhagen
68711f6ea7 fix access to free()d memory
the 'item' reference may become invalid inside the loop.

this approach was chosen (instead of making 'item' a non-reference) to
keep the code more in sync with creator (where the string type is more
complex).

Change-Id: I60a4b0654dc47c0e3466d43904c358eb7e3e64e2
Reviewed-By: Marius Storm-Olsen
Reviewed-on: http://codereview.qt.nokia.com/1702
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-07-15 16:00:06 +02:00
Oswald Buddenhagen
fe9cb4a508 fix $$resolve_depends()
make it a proper topological sort. before, it could not resolve diamonds
correctly.

Change-Id: I17ffd81020ab36e7e5dbcfd120793ba8d9c6cf18
Reviewed-on: http://codereview.qt.nokia.com/1435
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-07-11 18:58:41 +02:00
Oswald Buddenhagen
0f32f596ea inline resoveDepends()
that's common practice for the expand functions, and that one isn't even
particularly big

Change-Id: I66c22e11edb66bd00d211fc1282eb75f5dd4832d
Reviewed-on: http://codereview.qt.nokia.com/1456
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-07-11 18:58:41 +02:00
Oswald Buddenhagen
1aa9affcf1 fix misnomer: $$resolve_depends() => $$sort_depends()
... and re-add a real $$resolve_depends(), just in case.

Change-Id: I489d6056546340ce95280fe7fd571e30c14470e7
Reviewed-on: http://codereview.qt.nokia.com/1455
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-07-11 18:58:41 +02:00
Oswald Buddenhagen
fc42ffa15a invert the output order of $$resolve_depends()
it needs to go from highest order to lowest order.
that's not relevant unless doing static linking.

Change-Id: Ieb69e3949b4d9cc2d2a62f5661f31e3dc88ac882
Reviewed-on: http://codereview.qt.nokia.com/1454
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-07-11 18:58:41 +02:00
Oswald Buddenhagen
a84c87f1ad make 1st argument of $$resolve_depends a variable
this is braindead, but it's consistent with the rest of qmake and more
performant. and the argument error message claimed it already anyway.

Change-Id: I973368acc6ffbff17107085ccd68b0334cc3e681
Reviewed-on: http://codereview.qt.nokia.com/1436
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-07-11 18:58:41 +02:00
Jyri Tahtela
f9f395c28b Update licenseheader text in source files for qtbase Qt module
Updated version of LGPL and FDL licenseheaders.
Apply release phase licenseheaders for all source files.

Reviewed-by: Trust Me
2011-05-24 12:34:08 +03:00
Marius Storm-Olsen
bca5a5d6f6 Add resolve_depends(var, prefix) function to qmake
This function calculates the topological order of variables.
We will use it to determine which and in what order to link
module libraries.

The function is not tied to libraries/modules only, but requires
the variables to be ordered to have their dependencies in the
[prefix]<var>.depends subvariable.

Due to the recursive nature of the algorithm it was just much easier
to implement it directly in C++ rather than in a qmake-language
function.
2011-04-27 12:05:46 +02:00
Qt by Nokia
38be0d1383 Initial import from the monolithic Qt.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
Qt Git wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:

http://qt.gitorious.org/qt/pages/GitIntroductionWithQt

If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.

Branched from the monolithic repo, Qt master branch, at commit
896db169ea224deb96c59ce8af800d019de63f12
2011-04-27 12:05:43 +02:00