Commit Graph

83 Commits

Author SHA1 Message Date
Oswald Buddenhagen
b64b4431c2 avoid deadlock in cache() during spec/cache loading
if we end up calling cache() from within the initialization of the base
context, we cannot wait for for the completion of that initialization
before we proceed, obviously.

Change-Id: If30c6f3665fe423e767373a8821c406b2f5e0eca
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-08-13 16:33:00 +02:00
Oswald Buddenhagen
d022a2d19c lock baseEnv in cache()
as we modify the environment, it must be properly locked.
this implies that initFrom() also needs to be called with a lock.

Task-number: QTCREATORBUG-9835
Change-Id: I48bae9af9adaa0518e5a9db0ba08ff057ae14f9f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-29 16:30:24 +02:00
Oswald Buddenhagen
66802ef8bf implement simple VFS to support caching during project parsing
this tremendously speeds up loading of qt 5.1 based projects (including
qt itself) under mac os, as these look up the sdk dynamically, and use
caching to avoid doing that in every subproject.

Change-Id: I833253f81c3159056fab2ff888f293b36cc2ef56
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-06-04 15:42:13 +02:00
Oswald Buddenhagen
571234786a don't unnecessarily use QFileInfo::filePath()
just directly use the filename we constructed it from.

Change-Id: Ia428a2cb4b192fea6bde62dfbf35361bcfc4b21e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-06-04 15:41:47 +02:00
Oswald Buddenhagen
3729f4aa31 make stubs for dangerous/useless qmake functions in limited mode
instead of having them "not implemented" (and consequently getting
errors), just let requires(), system(), mkpath(), write_file(), touch()
and cache() do nothing. this is likely to cause followup failures which
are harder to detect, but the amount of scary noise we are producing now
is not really acceptable. furthermore, in qtcreator these failures
actually terminate the "precise" evaluation, which breaks Run
Configurations.

Task-number: QTBUG-28159 (in different repo)
Task-number: QTCREATORBUG-8550
Change-Id: I1bdeb759e895e4200f09332dadf8a6cef348182f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qttools/94ab2efb2d155d3c1ca7b91c1daf443a149bcf1f)
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-05-28 10:10:22 +02:00
Oswald Buddenhagen
2c660bd5b5 make error() abort the qmake run, not just the current file
Change-Id: I82fc55680f9ffb227e25acb39c797596225ba89e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/0da7f097249f71726140a38647bb4824b09fad7b)
2013-05-17 14:52:40 +02:00
Oswald Buddenhagen
9a33891d49 fix non-bootstrapped $$system()'s line end conversions on windows
Change-Id: I026da1312bc28619dc7aa5974b7f4c00710517ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/d92fd4ca54ae71e9c0190d15df9c131435a4be68)
2013-05-17 14:52:33 +02:00
Oswald Buddenhagen
fd74944d9e don't allow overloading of built-in functions
the functions are not versioned or scoped, so user-defined overloads would
mess up qmake's own feature files. it seems safer to break user projects
than to allow the user to break qmake.

Change-Id: I020a2e6416bbb6e2fd2ece339629d848c00c8398
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/849f1f9efda601bcfd3760256205a2014e0bc936)
2013-05-17 14:52:28 +02:00
Oswald Buddenhagen
b154c3255b remove support for non-lowercased $$eXpaNd() functions
we have been warning about such functions for a while now, now execute.
the qmake language is (generally) case-sensitive, so this wasn't all
that useful anyway.

Change-Id: I1388ac2d5a1104389aeb3347e739a0d5e69e138d
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
(cherry picked from qtbase/b04192d94b9fb680f99ae38ff008919c0ad371ea)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-05-17 14:52:13 +02:00
Oswald Buddenhagen
aa2508ba41 Fix qmake's pro file cache to interact correctly with write_file
When writing a file with write_file() we have to inform the pro file parser
cache to discard the file if it's existent in the cache, to ensure that
calling include() after write_file() always works.

Change-Id: I7d09269a57de55ca30b0e11dd40770de9f919f64
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/f45d6414ad6ef1d75f049a61411cd954bcae29c3)
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-05-17 14:52:06 +02:00
Oswald Buddenhagen
a64eac0a74 don't send output of $$join() and $$sprintf() through split_value_list()
in the case of sprintf it's surprising, in the case of join it's
anti-thetical.

Change-Id: I4eb7e56d31ac6ed68adf852f1a19b33554d38eb4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/ae94bf2b7a6373def9239ae5f54b143e1f6ffe09)
2013-05-17 14:51:22 +02:00
Oswald Buddenhagen
7b5776d754 support alternative and multiple suffixes in $$resolve_depends()
this is undeniably a new feature, but it's needed for a bugfix.

Change-Id: I951a3128eb580404ee0c7e3cdcb4d6170e899f70
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/87054805872429c1c17135f9ae5364b050d3fdff)
2013-02-06 14:52:40 +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
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 10:48:18 +01: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
Eike Ziller
b947861c59 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.qbp
	src/libs/QtcLibrary.qbs
	src/plugins/QtcPlugin.qbs
	src/tools/QtcTool.qbs

Change-Id: I3acea26888febe8f96d2131932266ed88b9f55f5
2012-09-19 18:02:46 +02:00
Orgad Shaneh
0e13cf3faf Fix warnings
Warnings came up using MinGW 4.4:
* botan.cpp: integer constant is too large for 'long' type
* dnssd_clientlib.c, dnssd_clientstub.c: ignoring #pragma warning
* hostutils.cpp: comparison between signed and unsigned integer expressions
* qmakebuildins.cpp: 'QString windowsErrorCode()' defined but not used

Change-Id: I80827f7f740ff380f13cef96d6b43baaa7e179cb
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-17 13:14:15 +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
f3d437870e put core implementation of $$shadowed() into QMakeGlobals
to make it available to a wider audience

Change-Id: I7a706f8d31de97d8214ba5ea745e19d1dbfda1bc
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-07 19:59:09 +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
1ea709889e fix path separator in system() for bootstrapped builds on windows
Change-Id: Ic472eb88f9d253fc182fb5c776560443c810321f
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-03 19:43:40 +02:00
Oswald Buddenhagen
93b8270bd9 make use of real environment a separate option
only creator needs to set an own environment - the testreader, lupdate
and qmake don't.

Change-Id: I4ff561a3008d423969a3f331bdc5d16b281a020b
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-03 19:42:37 +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
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
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
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
fddd20ffad fix return() sanity check
the value map stack always has at least one map on it.

Change-Id: I836de07a14754b995403065443d3758bfc6a8683
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-28 14:34:00 +02:00
Oswald Buddenhagen
12e9472934 unbreak $$system() in bootstrapped mode
Change-Id: I43eb4a7a94b6df3d964b7bfd1747f953f436ba10
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-08-28 14:33:37 +02:00
Oswald Buddenhagen
b9829ab0a6 fix leaking of raw data in a bunch of new expand functions
Change-Id: Ifa7e481e7d84c50ca52c780f84156e0a5c8d9e98
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-15 12:11:17 +02:00
Oswald Buddenhagen
e15f1cee01 make $$relative_path() minimize already relative paths
follow suit with qmake ...

Change-Id: I8346bff6e31dcd32b182dd489b85636da6283e2a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-15 09:19:32 +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
c07695a423 add missing map() call
the other branch in the function also does it

Change-Id: I74e27fa0bb997b95df904f5be48d1f251814c323
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-06 15:04:42 +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
10a87a96c3 add "blob" and "lines" modes to $$cat() and $$system()
follow suit with qmake ...

Change-Id: I091c2f10f547d8f339a2f0cadf5a49cfe0a88cea
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-02 13:45:14 +02:00
Oswald Buddenhagen
212a12f312 directly forward system() output to console
this makes it identical to the bootstrapped path used by qmake itself.

this applies only to full qmake mode.

Change-Id: I7100315fe95d0ee900f6bea2552c9292e3d1a07d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-02 13:45:03 +02:00
Oswald Buddenhagen
fa91da2d41 add write_file() function
follow suit with qmake ...

Change-Id: I4e57e160b811b6496adf208b49f1dd0df0b57563
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 16:49:02 +02:00
Oswald Buddenhagen
b7c3b390f5 add touch() function
follow suit with qmake ...

Change-Id: I906bf83bbbb106cddd8becd85faef8e1c4c5d64f
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 16:48:49 +02:00
Oswald Buddenhagen
5febcd2ddc add mkpath() function
follow suit with qmake ...

Change-Id: I9ad3b3a6765b5e44cb9da87401f29c838d59491d
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 16:48:31 +02:00
Oswald Buddenhagen
1c98f30e80 add log() function
follow suit with qmake ...

using fputs() instead of the fancy handler functions, as this is only for
qmake, which would just print to stdout anyway.

Change-Id: I0433d8157ce8c6e580b3fec6f622896b972f7b48
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 16:48:20 +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
Oswald Buddenhagen
459d6f8e40 don't print an empty line if system() produces no stderr
Change-Id: I88d85c70334de2a5f913b6c67d0d253094979fd8
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 16:47:04 +02:00
Oswald Buddenhagen
76db45fafe make error() actually cancel execution in non-cumulative mode
Change-Id: I50289cdfe906c923076a4a2dc57f7ca35c8e9b90
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 16:45:57 +02:00
Oswald Buddenhagen
986c953ac6 minor speedup of message()/warning()/error()
properly identify the function in the dispatcher, to save an additional
string comparison later.

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