Commit Graph

122 Commits

Author SHA1 Message Date
Oswald Buddenhagen
4a3012dd3f remove automatic splitting from $$() expansions
$$(FOO) would automatically split the contents of the environment
variable at whitespace (and interpret quoting inside it). the way to
prevent the splitting (but not the quote interpretation) would be using
"$$(FOO)".

this behavior is entirely unexpected and thus an incredibly effective
source of quoting problems - according to a grep over the whole qt
sources, there isn't a single case where things were done right. in qt
creator, well over half the cases are wrong.

also, the "feature" seems entirely pointless: nobody uses spaces as
separators in environment variables.

consequently, simply remove it, even in a patch release. i'm postulating
that nobody will complain.

Change-Id: I9ed3df1b0d1ef602acd78ceb118611d294561da6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/566d28316dd73bfe4a8ea34839989ee9df7e3895)
2013-05-17 14:49:59 +02:00
Friedemann Kleint
80011dde39 Fix Krazy warnings about includes/header guards in proparser.
Change-Id: Ie0067544492a207255a3ff3f43d95d2976c73c5e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-12 15:26:28 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Eike Ziller
fe74a9a722 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/fakevim/fakevimhandler.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	tests/auto/cplusplus/cxx11/cxx11.pro
	tests/auto/cplusplus/cxx11/tst_cxx11.cpp
	tests/auto/icheckbuild/icheckbuild.pro

Change-Id: I3c8351ad35617f56d15b788c8a46d8a6f453ef70
2012-11-09 11:20:10 +01:00
Oswald Buddenhagen
074daa41ff rewrite default spec handling
instead of symlinking (on unix) or creating a forwarding spec (on
windows), just put the default specs into (the bootstrapped)
QLibraryInfo.

Change-Id: I595500ef7399f77cb8ec117c4303bc0a2ffe505f
(cherry picked from qttools/0e75115e557b4cf1c737e3e5524f876a6b85a39e)
(cherry picked from qttools/769fa282ac8a4b98698dada6969452363e0eb415)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-11-06 14:01:44 +01:00
Oswald Buddenhagen
7ab1f97419 resolve only one level of symlinks, and only for the default specs
otherwise we end up in the source tree, which is counterproductive.

Task-number: QTBUG-26869
Change-Id: Id44a94f827dc285c75b9b243c8ef6478e668e3ff
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qttools/29bdcb6008a58203efc62ee58e57d266e60be095,
plus creator-specific amend)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-11-06 14:01:23 +01:00
Oswald Buddenhagen
7d4e3b7b4c fold m_qmakespecFull back into m_qmakespec
the original value is not used any more after the final resolution.

Change-Id: Icadc219f045a1bbfd20506c4c72c53d1fb352969
(cherry picked from qttools/74d548c89dae83b392953f505876d8d383a72ce5,
plus creator-specific amend)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-11-06 14:00:55 +01:00
Daniel Teske
95169eb8e3 Qt4Project: Do a build_pass evaluation
Some projects set TARGET or DESTDIR only in the build_pass

Task-number: QTCREATORBUG-4273

Change-Id: I3673dd93b37b10102a0c1f1ce053e1aef8aaf53f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-10-24 12:48:50 +02:00
Eike Ziller
70b5e1f64d Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: Id870f70aa35c232dbbd455f83429bab80f266c2d
2012-10-16 17:42:10 +02:00
Orgad Shaneh
6e3af2bf2e QMakeEvaluator: Set pro file as source for internal variables
Task-number: QTCREATORBUG-7006

Change-Id: I3f599f92d03b6f9fdf65b12cf4090e28cc497fbd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-15 12:22:44 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Oswald Buddenhagen
f529e22ec3 add tracing functionality to Tok{Return,Break,Next} handling
amends f53ed6c4 after merge

Change-Id: Ib6b4881245b3d6dc160285954be3c3454291e4b4
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-12 17:42:01 +02:00
Oswald Buddenhagen
e730e2bb8a Merge remote-tracking branch 'gerrit/2.6'
Conflicts:
	src/libs/utils/environment.cpp
	src/plugins/android/androidtoolchain.cpp
	src/plugins/projectexplorer/gcctoolchain.cpp
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	src/shared/proparser/qmakeevaluator.cpp

Change-Id: I554e96445a4d2b9ba0cc173ecd766091ee921aa2
2012-09-12 17:27:37 +02:00
Oswald Buddenhagen
f53ed6c4b3 don't pretend that break()/next()/return() are functions
it's a pretty braindead thing to implement control flow statements as
(built-in) functions.

as a "side effect", this fixes return() value handling for lists.

Change-Id: I59c8efa0e4d65329327115f7f8ed20719e7f7546
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-12 17:05:20 +02:00
Oswald Buddenhagen
8f9f655a0c namespace ProFileEvaluatorInternal => QMakeInternal
Change-Id: I0ffa76e802c0cc00d1866e7fe09ae54a6f535a6f
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-04 12:10:52 +02:00
Oswald Buddenhagen
98afdc9279 compile without CamelCase headers
for faster bootstrapping of qmake

Change-Id: I602a023f4acbac276219bfc125863749ad96f754
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-03 19:43:49 +02:00
Oswald Buddenhagen
da62508d78 raise priority of messages about include files & features not being found
they aren't actually a warnings, even if the one about includes says so.
in qmake it is possible to suppress it by disabling *all* warnings, but
that makes no sense.

Change-Id: I16121f7aff0836d516139927333bd2df1f599dda
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-03 19:43:32 +02:00
Oswald Buddenhagen
5c96be2b63 fix inverted condition for "include file not found" message
Change-Id: Ib4bc5b2a277b630a09b5151f632476a399db26a6
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-03 19:42:58 +02:00
Oswald Buddenhagen
e513ee1bb0 fix line number display
the line numbers are limited to unsigned short in the parser and
consequently the evaluator. as that's an internal detail that could
change any time, the display works with ints. so the special value ~0
needs to be converted to -1 in the right place.

Change-Id: Ia9437164b88ecf2077ffc4c01d7e16033970df1b
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-03 19:42:14 +02:00
Oswald Buddenhagen
3c740066b7 avoid indexed access to elements of the value map stack
this makes us independent from the random access performance of the
underlying container.

Change-Id: I0e655320ad607ac43ef6797e52e6179570c155f4
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-03 19:41:06 +02:00
Oswald Buddenhagen
c17c479bb9 factor out evaluateBuiltin{Expand,Conditional} (again)
will need a second entry path, so it's better to have them separate

Change-Id: I52bce5de536fd0ef5d6773d8177550b8d6202d1d
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-03 19:39:56 +02:00
Oswald Buddenhagen
e3eea3a935 factor out evaluateConfigFeatures()
Change-Id: Ida8e871f8a1bcb9598dc83874ed2db17083a7fd5
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-03 17:58:17 +02:00
Oswald Buddenhagen
79fcd3f448 evaluateFile() => evaluateFileChecked(), evaluateFileDirect() => evaluateFile()
this is a more natural naming scheme

Change-Id: I376b16d14924d6c816b4eeab5169f54890164388
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-03 17:58:06 +02:00
Oswald Buddenhagen
c4ec7942f0 add support for extra vars and extra configs
will be needed for qmake build passes

Change-Id: I6c887abd8e9e858954ce90c60ccdd1b70b6aeee3
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-03 17:57:56 +02:00
Oswald Buddenhagen
5af04e6b29 generalize visitCmdLine() a bit
it's basically the most generic unchecked eval function possible.

Change-Id: I8f6ec5c0f35d132500b80912f8d7b221bc183c85
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-03 17:57:48 +02:00
Oswald Buddenhagen
00e9be4246 make messages from dynamic code tell a useful location
"(eval)" does not exactly help to find the error source.

Change-Id: Iecd03e6a4909ca6d7eab846844ca4415ebfa3429
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-03 17:56:24 +02:00
Oswald Buddenhagen
d0bc069e07 remove unnecessary parameter from evaluateFileInto()
all callers use the same value, so just inline it in the function.

Change-Id: Icc3f1301ec332cb18f5011b8abfb20703e94a491
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-03 17:55:23 +02:00
Oswald Buddenhagen
0ad234b691 add tracing facilities to evaluator
as other output code which is enabled only in full qmake mode, this
prints directly to the console.

Change-Id: I6a1578818512fa3b0773faf276a1d56881eb06d7
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-03 17:54:57 +02:00
Oswald Buddenhagen
6f254b37a6 remove source tracking from property fetches
the tracking is meant for literal values only.

Change-Id: I46b29f07010412bbdf2eddcec8ab28774abed4d9
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-03 17:53:33 +02:00
Oswald Buddenhagen
465f2a1562 fix loading of qmakespecs in the qt support classes
it's not sufficient to load the qmake.conf only any more.

Change-Id: Ic699ad5e202d6f3e115e44621b4c6ee2def6edd2
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-08-30 13:45:45 +02:00
Oswald Buddenhagen
c5e87aa0c1 make $$shell_{path,quote}() use correct path separator
follow suit with qmake ...

Change-Id: I0221f6c81bc770c37f501d79c31860549c0c0076
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-08-28 14:37:32 +02:00
Oswald Buddenhagen
43aa104e94 fix non-global s///
QString::replace(QRegExp) pretty much always detaches, so the equality
check was bogus.

Change-Id: Iee9043c1ee3083edaf289886ac11b3e3a501d623
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-08-28 14:33:33 +02:00
Oswald Buddenhagen
2debcc2881 make code run from $$fromfile() & infile() find features
there is actually a qmake test for that.

don't copy anything which is related to loading a qmakespec to the new
evaluator, though - either it will actually load a spec (include(,into))
anyway, or it has a clean slate ($$fromfile() and infile()) and anything
spec-related would be pointless.

Change-Id: I291201a2bf823e863b3ec94be91762954612417d
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-08-28 14:33:22 +02:00
Oswald Buddenhagen
fe87e222fb unbreak infinite recursion check for fromfile() & co.
i broke this by switching to using a separate evaluator. the new
evaluator has an empty file stack, so the check would be pointless.
fix it by recoding and traversing the call chain.

Change-Id: Icb1f19adc6e66a865cd5be78eeb1c10072b4f8fc
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-08-28 14:33:16 +02:00
Orgad Shaneh
07aec935b7 Fix warnings
MSVC warns about pm being unused (because settings() is static)

Change-Id: I750804cc52edc71649545bc03f798a6802c87c7d
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-07 22:22:29 +02:00
Joerg Bornemann
e0e430e1dc fix Windows build in qmakeevaluator.cpp
Change-Id: I83ffaa923acb6abbd0e8996492f90696795901cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-06 17:46:39 +02:00
Oswald Buddenhagen
dd60f95ff3 fix warning: make impossible condition explicit
Change-Id: Ib96b9f117e8a18d91b5e3470f82186dbe84bd320
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-06 15:05:29 +02:00
Oswald Buddenhagen
bdd8cf300b introduce ProKey class
while this is actually just an alias for ProString (with explicit
zero-cost conversions only), it nicely illustrates the use of particular
variables. it also serves to hide the NoHash hack from public view.

Change-Id: Iaf9283c64f320ad84a77d9573d1fde6d401c49df
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-06 15:05:17 +02:00
Oswald Buddenhagen
8b0844d032 fix basic variables not being initialized any more
QMAKE_INTERNAL_INCLUDED_FEATURES is added even before loading the first
prf file, so the check for an empty value map would never trigger. use a
flag variable instead.

Change-Id: If0af31d8466eadb90eca2a2e4024eff03b54e3b1
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-03 13:59:05 +02:00
Yuchen Deng
a3323de814 Fix cross compilation
Change-Id: I092277ae6e9a35910ee9cbaa1806e0d848339bbb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-02 16:51:48 +02:00
Oswald Buddenhagen
5bd33a7999 add cache() function
follow suit with qmake ...

Change-Id: I8be9b0ecdc45c6358fe00d03ea5d9e77c631c3bb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-02 13:49:21 +02:00
Oswald Buddenhagen
48e0923095 cache mkspecPaths
instead of re-generating mkspecPaths on each use (which is exactly once
for the makespec itself and additionally any queries of $$[QMAKE_MKSPECS]),
do it only once.
now projects don't need to inherit the root env's m_qmakepath any more,
as they are guaranteed not to need rebuilding the cache. instead, they
must inherit the cache, obviously.

Change-Id: Id8e80279a11e8d975b73fd542ecc36d24c57f2f4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-02 13:47:38 +02:00
Oswald Buddenhagen
4a9702e921 make sure featureRoots is pre-cached in the root envs
just clearing the cache to signal the need for reconstruction is a pretty
safe way to ensure that every subproject will do the same work.
now projects don't need to inherit the root env's m_qmakefeatures any more,
as they are guaranteed not to need rebuilding the cache.

Change-Id: Ibc0b2d39dabf4a47430975ad30c6b32689de7854
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-02 13:46:57 +02:00
Oswald Buddenhagen
5fecb00738 remove unneeded initializations of basic variables
03a84a7e5 re-introduced them unnecessarily after 55cad4a42 made them to be
evaluated by the parser already.

Change-Id: I1a121567fdd791f5c47c23babc4946a11b3e1f31
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-02 13:45:57 +02:00
Oswald Buddenhagen
2545468f10 make sure every project file evaluation has basic variables set up
now that the basic variables are not magic any more, we need to make
sure they are initialized.

Change-Id: I75a9b66b95f84599fb9af1f4787a752319344fcb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-02 13:45:45 +02:00
Robert Loehning
c45ae0e288 Fixes arguments in string
Change-Id: I825141db85aaf5f9eb1d0f0fbe0d7bb9836b350e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-02 10:51:01 +02:00
Oswald Buddenhagen
f1a3a2d00c don't set m_sourceRoot if it equals m_buildRoot
Change-Id: I3e20c2a9b4455f7e9fcc60202166d1a8a079cba2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 16:48:05 +02:00
Oswald Buddenhagen
369fdc3aee optimization & clarification of m_skipLevel use
as the branch evaluation in non-cumulative mode nowadays actually skips
code instead of merely incrementing m_skipLevel, !m_cumulative implies
!m_skipLevel. based on that we can eliminate some always true/false
conditionals, and hard-wire m_skipLevel to zero if
PROEVALUATOR_CUMULATIVE is not #defined.

Change-Id: I19569ff96f21a5074f677b873ed800a6818f1a6b
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 16:47:47 +02:00