Commit Graph

220 Commits

Author SHA1 Message Date
Oswald Buddenhagen
2e22ba59d9 recognize backslashes when evaluating a feature file's relativity
this is an utterly irrelevant non-feature, but whatever.
2011-03-18 21:28:04 +01:00
Oswald Buddenhagen
b83d730322 use proper enum value instead of number for unknown functions
silences compiler warnings
2011-03-16 12:24:37 +01:00
Oswald Buddenhagen
e77c2f5a8b don't give up on parsing errors
instead of erroring out the parse, only error out the evaluation in
exact mode. that way we can do cumulative evaluation even on broken
files.

Task-number: QTCREATORBUG-3093
2011-02-10 14:56:15 +01:00
Oswald Buddenhagen
31e7e7c353 don't claim success in some failure cases
this kinda worked because int(ReturnTrue) == int(true), but there
are more possible return values than that.
2011-02-10 14:56:15 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
Christian Kandeler
53d41cb84b Project file evaluation: Take sysroot into account.
Task-number: QTCREATORBUG-1858
Reviewed-by: Oswald Buddenhagen
2011-01-05 17:58:21 +01:00
con
b1bcf081d8 Merge branch '2.1'
Conflicts:
	src/plugins/coreplugin/basemode.cpp
	src/plugins/coreplugin/basemode.h
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h
	src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp
	src/plugins/debugger/debuggeragents.cpp
	src/plugins/debugger/debuggeruiswitcher.cpp
	src/plugins/debugger/debuggeruiswitcher.h
	src/plugins/projectexplorer/buildconfigdialog.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.h
	src/plugins/qmldesigner/designercore/include/enumeratormetainfo.h
	src/plugins/qmldesigner/designercore/include/modelutilities.h
	src/plugins/qmldesigner/designercore/include/nodeinstance.h
	src/plugins/qmldesigner/designercore/include/propertymetainfo.h
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.h
	src/plugins/qmldesigner/designercore/instances/graphicsviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.h
	src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/qmlviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.h
	src/plugins/qmldesigner/designercore/metainfo/enumeratormetainfo.cpp
	src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp
	src/plugins/qmldesigner/designercore/model/modelutilities.cpp
	src/plugins/snippets/inputwidget.cpp
	src/plugins/snippets/snippetscompletion.cpp
	src/plugins/snippets/snippetscompletion.h
	src/plugins/snippets/snippetspec.cpp
	src/plugins/snippets/snippetsplugin.cpp
	src/plugins/snippets/snippetswindow.cpp
	src/plugins/snippets/snippetswindow.h
	src/plugins/texteditor/snippetsparser.cpp
	src/tools/qml/qmldom/main.cpp
	tests/manual/trk/runner.cpp
	tests/manual/trk/trkolddevice.cpp
	tests/manual/trk/trkolddevice.h
	tests/manual/trk/trkserver.cpp
2010-12-17 17:00:53 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
Christian Kandeler
79c95e4603 Qt project file parsing: Take target options into account.
Reviewed-by: Oswald Buddenhagen
Reviewed-by: kh1
Reviewed-by: dt
2010-11-17 17:36:05 +01:00
Oswald Buddenhagen
8e993e08e6 fix one more raw data leak
again, qregexp was putting our raw string into its cache - this time
hidden behind a qdir::entrylist().

Reviewed-by: dt
Task-number: QTCREATORBUG-2758
2010-10-21 20:02:08 +02:00
Oswald Buddenhagen
7322900692 make ProFileParser API less bug-prone
QString::isNull() vs. isEmpty() discrimination is a time bomb ...
2010-09-02 18:08:22 +02:00
Oswald Buddenhagen
34a8a57d81 fix crash when no command line options are passed to qmake
the root cause is in the API of parsedProFile(): it discerns
isNull() and isEmpty(), which is of course a time bomb.
but in this case the right solution is not trying to parse
the empty string in the first place.
2010-09-02 18:08:22 +02:00
dt
9f68456b65 Give our Profile parser more information from the qmakestep
e.g. DEFINES+=bla on the qmakestep command line now work

Task-Nr: QTCREATORBUG-2091
2010-09-01 12:37:29 +02:00
Oswald Buddenhagen
1fd8672e40 don't crash during setup without valid qt configuration
there is not much point in complaining about internal queries of unknown
properties anyway, so just don't try it.
remove the default value from the complain argument to avoid mistakes
either way in the future.
2010-06-25 12:11:56 +02:00
Oswald Buddenhagen
866b5c7315 whitespace-trim test names inside if() 2010-06-24 20:01:48 +02:00
Oswald Buddenhagen
04bee3be57 change the way how loading of configs & features is controlled
make it an argument of the main entry point instead of a property
2010-06-24 18:57:50 +02:00
Oswald Buddenhagen
4c74b0b973 fix crash on querying an unexistant property from the outside 2010-06-24 18:57:50 +02:00
Oswald Buddenhagen
120641359a set output dir in evaluateFileInto()
that's consistent with qmake, but without practical relevance.
2010-06-24 15:44:37 +02:00
Oswald Buddenhagen
4cd0281f63 assignment-related crash fix
when appending a list with one empty element to an empty list, we'd get
into a state which would subsequently cause an assert.
2010-06-24 15:44:37 +02:00
Oswald Buddenhagen
cc86968051 optimize lookup of built-in replace functions
use lowercasing only as a fallback
2010-06-24 15:44:37 +02:00
Oswald Buddenhagen
e5837686c7 optimize: make map() return a const ref 2010-06-24 15:44:37 +02:00
Oswald Buddenhagen
a49d1bffcb add ProFile::tokPtr(): centralize nasty cast 2010-06-24 15:44:37 +02:00
Oswald Buddenhagen
01c0b84508 fix execution location tracking
function calls need to change _FILE_ - but none of the other
context-indicating variables.
2010-06-24 15:44:37 +02:00
Oswald Buddenhagen
fa79b97511 don't strip path from $$_FILE_ for even for included files
catch up with the recent change in qmake
2010-06-24 15:44:37 +02:00
Oswald Buddenhagen
79073d3d93 make context setup for included files qmake-like
that's - as usual - making things rather braindead:
- the included files inherit the current context's function defs,
  but not the variables
- default_pre.prf is re-loaded for infile()/$$fromfile()
- the entire config is re-loaded for include(file, PREFIX)
2010-06-24 15:44:37 +02:00
Oswald Buddenhagen
d29e19237a use evaluateFileInto() less 2010-06-24 15:44:37 +02:00
Oswald Buddenhagen
e876be997b files include()d into a "namespace" are not real includes 2010-06-24 15:44:37 +02:00
Oswald Buddenhagen
ec1bc28231 Merge remote branch 'origin/2.0'
Conflicts:
	src/shared/proparser/profileevaluator.cpp
2010-06-24 15:17:28 +02:00
Oswald Buddenhagen
74fd5a560f avoid exponential resource consumption
the cumulative mode tries hard to never lose already assigned variable
values. the naive implementation turned assignments into additions,
which made the trivial construct "FOO = $$FOO" double the size of the
array each time it would be executed.
so instead let the assignments be assignments, and then re-add the
values that would be dropped.

Reviewed-by: dt
Task-number: QTCREATORBUG-1595
2010-06-24 13:32:29 +02:00
Oswald Buddenhagen
058354ceab refactor ProFileEvaluator, part 2: split off ProFileParser 2010-06-18 21:21:36 +02:00
Oswald Buddenhagen
0c09acbb25 refactor ProFileEvaluator, part 1: introduce handler interface
externalize the error message and evaluation notification callbacks into
an own handler interface.
2010-06-18 21:21:36 +02:00
Oswald Buddenhagen
752c823de2 better pro eval notifications
more types, and callback even for top-level project file
2010-06-18 21:21:36 +02:00
Oswald Buddenhagen
a82ef5f14e less magic detection of qmake-internal files
feature files are already generally excluded. add the explicitly
injected files (qmake.conf and .qmake.cache) to that. this makes
path-based exclusion superfluous.
2010-06-18 21:21:36 +02:00
Oswald Buddenhagen
68e0c5c695 move value() implementation down to ProFileEvaluator 2010-06-18 21:21:36 +02:00
Oswald Buddenhagen
3ef1bf0f08 micro-optimizations & cleanups 2010-06-18 21:21:36 +02:00
Oswald Buddenhagen
ebb4e044a7 plug raw data leaks 2010-06-18 21:21:35 +02:00
Oswald Buddenhagen
619d830d6a f******ck .... revert "deeeeebug"
This reverts commit 47885c114b.
2010-06-14 14:43:00 +02:00
Oswald Buddenhagen
47885c114b deeeeebug 2010-06-14 12:45:10 +02:00
Bill King
55edbe1c5b Fix parameters hidden by local variables. 2010-06-11 13:35:22 +10:00
Oswald Buddenhagen
0732fd03aa minor optimization: use QString::setRawData some more 2010-06-10 17:14:54 +02:00
con
b0040dc858 Merge remote branch 'origin/2.0'
Conflicts:
	src/plugins/projectexplorer/taskwindow.cpp
	src/shared/proparser/profileevaluator.cpp
2010-06-10 15:00:16 +02:00
Oswald Buddenhagen
1dc99e8ff3 try to sort out the filename encoding mess
use local8bit instead of latin1 resp. 8bit-passthrough, after all.

the situation was as follows:
- if the pro files and file names were all ascii, everything just worked
- if either contained non-ascii:
  - on unix, the evaluator would work as long as the file content
    encoding matched the file name encoding, and the ui would work as
    long as the file name encoding was latin1 (i.e., on no modern
    system)
  - on windows, both would work only if the ansi code page was
    latin1/cp1252 (i.e., on western systems)

i.e., even in the low-level evaluator, only native latin1 systems with
actual latin1 files worked consistently. given this situation, it makes
little sense to make an encoding adapter between the evaluator and the
ui as originally planned. instead, take the easy way out and use
local8bit - this continues to work for native latin1 systems+files in
the backend, and makes the ui work for everything the backend groks and
some more.

Reviewed-by: dt
Task-number: QTCREATORBUG-930
2010-06-09 11:46:10 +02:00
Oswald Buddenhagen
fc421df12d micro-optimizations 2010-06-09 11:46:10 +02:00
Oswald Buddenhagen
f8959aa759 hide includes from within feature files
this fixes the recent appearance of qt_webkit_version.pri in all qt 4.7
based projects.

in fact, the patch does somewhat more: it makes the evaluator provide
the information to the higher layers which is necessary for a truly
hierarchical display of includes. TBD later.

Reviewed-by: dt
Task-number: QTCREATORBUG-1590
2010-06-08 11:09:42 +02:00
con
7f733b1545 Merge remote branch 'origin/2.0'
Conflicts:
	README
	doc/qt-html-templates.qdocconf
	doc/qtcreator.qdoc
	doc/qtcreator.qdocconf
	src/app/Info.plist
	src/plugins/bineditor/BinEditor.pluginspec
	src/plugins/bookmarks/Bookmarks.pluginspec
	src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec
	src/plugins/coreplugin/Core.pluginspec
	src/plugins/coreplugin/coreconstants.h
	src/plugins/cpaster/CodePaster.pluginspec
	src/plugins/cppeditor/CppEditor.pluginspec
	src/plugins/cpptools/CppTools.pluginspec
	src/plugins/cvs/CVS.pluginspec
	src/plugins/debugger/Debugger.pluginspec
	src/plugins/designer/Designer.pluginspec
	src/plugins/fakevim/FakeVim.pluginspec
	src/plugins/find/Find.pluginspec
	src/plugins/genericprojectmanager/GenericProjectManager.pluginspec
	src/plugins/git/ScmGit.pluginspec
	src/plugins/helloworld/HelloWorld.pluginspec
	src/plugins/help/Help.pluginspec
	src/plugins/locator/Locator.pluginspec
	src/plugins/mercurial/Mercurial.pluginspec
	src/plugins/perforce/Perforce.pluginspec
	src/plugins/projectexplorer/ProjectExplorer.pluginspec
	src/plugins/qmldesigner/QmlDesigner.pluginspec
	src/plugins/qmlinspector/QmlInspector.pluginspec
	src/plugins/qmljseditor/QmlJSEditor.pluginspec
	src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec
	src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec
	src/plugins/regexp/RegExp.pluginspec
	src/plugins/resourceeditor/ResourceEditor.pluginspec
	src/plugins/snippets/Snippets.pluginspec
	src/plugins/subversion/Subversion.pluginspec
	src/plugins/texteditor/TextEditor.pluginspec
	src/plugins/vcsbase/VCSBase.pluginspec
	src/plugins/welcome/Welcome.pluginspec
2010-06-08 10:39:45 +02:00
Oswald Buddenhagen
aa61af1493 make the evaluator (even more) thread-safe
the async re-parsing code breaks the assumption that project
parsing only ever starts with a single non-concurrent evaluation
(of the top-level project file), so the population of the base
values in the shared ProFileOption was happily causing crashes.

Reviewed-by: dt
Task-number: QTCREATORBUG-1569
2010-06-04 17:57:04 +02:00
Robert Loehning
356648b7f4 Compile fix.
Reviewed-by: Oswald Buddenhagen
2010-06-02 21:51:27 +02:00
Oswald Buddenhagen
033a148b43 optimize assignments: record number of literals
that way the result vector can be pre-allocated - which gives zero
resizes if no expansions are in the expression.
for the joined argument lists of built-in functions, pre-allocate a
fixed 5 elements, which covers all cases and more.
the argument lists of user-defined functions are not pre-allocated
yet.
2010-06-02 11:05:27 +02:00
Oswald Buddenhagen
a1fa00d2e7 precompile expressions
this gives a rather significant boost, in particular for
expressions which are evaluated repeatedly (includes).
2010-06-02 11:05:27 +02:00
Oswald Buddenhagen
932d77b6dd qmake compat: delete empty elements when assigning values
some replace functions can return empty elements which should be
zapped here (according to qmake, anyway).
2010-06-02 11:05:27 +02:00