Commit Graph

580 Commits

Author SHA1 Message Date
Leandro Melo
b5739e36cb Gen. highlighter: Improve performance (reg. exp.)
Cache matches of the RegExprRule to avoid unnecessary calls.
This is essentially the same optimization existent in Kate.

A colateral effect of this implementation is a mechanism to
notify the rules when a progress (highlight of the current
line) is finished.
2010-12-07 10:17:26 +01:00
Bill King
6b7535d8b3 tests: fixes 2010-12-03 15:04:19 +10:00
Bill King
4507d64345 tests: make compile 2010-12-03 11:14:01 +10:00
Christian Kamm
c5c4bacda9 C++ indenter: Fix labels.
Reviewed-by: Roberto Raggi
2010-12-01 10:22:41 +01:00
Friedemann Kleint
2960c735df Debugger/CPP: Move helpers to simplify types to CPlusPlus-lib.
Make available for log simplification, etc.
Add autotest, fix broken std::set and MSVC.

Rubber-stamped-by: Christian Kamm <christian.d.kamm@nokia.com>
2010-11-25 13:51:54 +01:00
Christian Kamm
7a616d5896 C++ indenter: Align to next token instead of end of current.
Task-number: QTCREATORBUG-3136
Reviewed-by: Erik Verbruggen
2010-11-22 10:09:39 +01:00
Oswald Buddenhagen
531c70f05b add Utils::QtcProcess
this is a wrapper around QProcess with these features:
- setEnvironment() takes a Utils::Environment instead of a QStringList
- instead of taking a stringlist with arguments, take a single shell
  command string which is fully compatible with the system's native
  shell (the bourne shell on unix and cmd.exe on windows) - with support
  for environment variable expansion, and subject to the shell's
  splitting and quoting rules. if the command is too complex (e.g.,
  contains redirections), it is transparently executed through a real
  shell.
- additionally, the class contains a set of helper functions for
  manipulating (constructing, splitting, etc.) shell command lines.
  in particular, it contains a shell-safe macro expander and the nested
  class ArgIterator which can be used for inspecting and manipulating a
  shell command line without going through the stringlist indirection
  (which is potentially lossy).

some of this is based on KDE code (KShell and KMacroExpander) which i
have written myself.
2010-11-17 13:19:07 +01:00
Oswald Buddenhagen
9bd95ade08 add generic macro expansion classes & functions to Utils
AbstractMacroExpander (any macros), AbstractQtcMacroExpander (%{var}
style macros, which is a hybrid of printf format specifiers and unix
environment expansions) and expandMacros() for the actual string
manipulation.
2010-11-17 13:19:06 +01:00
Oswald Buddenhagen
0641ed0eaa change Environment::expandVariables() semantics
instead of being os-agnostic, interpret the os-native expansion style,
so it is consistent with proper (shell) command lines.

don't interpret quotes, as this function is meant for expanding isolated
filepaths, where nobody would expect quoting. instead, use the windows
style of simply not doing an expansion if a referenced variable is not
found, which should be good enough - it's rather unlikely that something
which happens to be an expansion of an existing variable is actually not
meant to be one.
2010-11-17 13:19:06 +01:00
Thomas Hartmann
f6fb0d82ed Test: Extend QmlJS code model test. 2010-11-11 11:49:11 +01:00
Christian Kamm
87afbf3933 Add simple stub non-functional autotest.
Done-with: Thomas Hartmann
2010-11-11 11:49:10 +01:00
con
ab41c294d0 Make extension system tests work in new location 2010-11-08 15:12:06 +01:00
con
71fd308c61 Move extension system auto tests. 2010-11-08 15:12:06 +01:00
con
06afc48da1 Make extension system tests running again. 2010-11-08 15:12:06 +01:00
Christian Kamm
d2468a4491 C++ indenter: Fix for GNU and Whitesmiths style switch statement.
Task-number: QTCREATORBUG-2994
2010-11-04 14:09:47 +01:00
Bill King
42c083cd5a tests: fixes compile 2010-11-04 10:06:06 +10:00
Oswald Buddenhagen
65650b26a5 make shellQuote() nicer
- unify unix and windows paths
- on windows:
  - we don't need to care for trailing backslashes, as we never append
    directly to quoted strings
  - simplify, as this doesn't need to be fast.
    unfortunately, it's impossible to use
      ret.replace(QRegExp(QLatin1String("(\\\\*)$")), QLatin1String("\"\\1"));
    as that matches foo\ twice (once one backslash and once an empty
    string).
2010-11-03 17:45:59 +01:00
Tobias Hunger
cf3a418cd8 Fix spelling in comments
Krazy was complaining about those.
2010-11-03 12:45:34 +01:00
con
a031112bef Add auto test for file search. 2010-11-02 11:13:43 +01:00
con
beaff08200 Fix test compilation on Mac by using rpath. 2010-11-01 15:10:44 +01:00
con
59c301a8c8 Make tests compile on Mac. Use qtLibraryName instead of qtLibraryTarget.
qtLibraryTarget is only defined if used with TEMPLATE=lib, which makes
it fail in pri files that are used for app pro files. The tests still
don't run because of run time linking issues.
2010-11-01 14:55:37 +01:00
Bill King
2c84d4c9d6 tests: more autotest cleanup 2010-11-01 13:58:04 +10:00
Bill King
bc04081622 tests: make qmakeable again 2010-11-01 11:43:36 +10:00
Bill King
f928757517 tests: Allow tests to use creator libs/plugins directly (linux/mac) 2010-11-01 11:40:20 +10:00
Kai Koehne
c4ca0060e3 QmlProject: Don't use RegExp for simple wildcard matching
QRegExp matching is quite expensive, and has to be done for every file
in the project directory tree against all possible suffixes. Optimize
for the common case that the pattern is "*.suffix" by doing a
fileName.endsWidth(suffix) in this case.

This speeds up loading of examples/declarative/declarative.qmlproject by
about 30%.

Reviewed-by: Christian Kamm
2010-10-29 09:41:20 +02:00
Oswald Buddenhagen
35bb61590d Merge remote branch 'origin/2.1'
Conflicts:
	doc/qtcreator.qdoc
	share/qtcreator/templates/mobileapp/app.pro
2010-10-25 11:27:30 +02:00
Bill King
2ede8e3c16 tests: get tst_codegen running again, if not passing yet. 2010-10-21 14:52:56 +10:00
Bill King
524a9ac4a8 tests: more test project cleanup 2010-10-21 14:49:58 +10:00
Christian Kamm
e7a6bae170 C++ indenter: Add autotest for C++0x 'for' statement.
Reviewed-by: trustme
2010-10-20 10:51:13 +02:00
Bill King
d95f3324c7 tests: remove unnecessary TARGET = tst_$$TARGET
"CONFIG += testcase" does this for us, and is the proper way to do this.
2010-10-20 15:03:01 +10:00
Bill King
5217ca8096 tests: get qmldesigner coretest running again 2010-10-20 14:57:07 +10:00
Bill King
54c8a2e5b5 Tests: Get autotests compiling again. 2010-10-20 14:16:04 +10:00
Christian Kamm
5ac981a0ac C++ indenter: Fix indentation after namespace aliases.
Task-number: QTCREATORBUG-2574
Reviewed-by: Roberto Raggi
2010-10-19 12:49:43 +02:00
Bill King
9293453ced Merge branch '2.1'
Conflicts:
	tests/auto/fakevim/fakevim.pro
2010-10-12 10:01:27 +02:00
Leandro Melo
2d245f8194 Generic highlighter: Fix autotest.
Reviewed-by: Bill King
2010-10-11 16:49:52 +02:00
hjk
41ee5dcc52 fakevim: make autotests compile 2010-10-11 16:22:23 +02:00
Bill King
ef516bf46a Merge branch 'master' of scm.dev.nokia.troll.no:creator/mainline 2010-10-11 15:57:29 +02:00
Bill King
aeecc6067b autotests: removed as it's unuseably out of date 2010-10-11 15:57:18 +02:00
Christian Kamm
b78c1ef6da Merge remote branch 'origin/2.1'
Conflicts:
	README
	doc/qt-html-templates.qdocconf
	doc/qtcreator.qdoc
	doc/qtcreator.qdocconf
	share/qtcreator/templates/wizards/qtcreatorplugin/MyPlugin.pluginspec
	src/app/Info.plist
	src/plugins/bineditor/BinEditor.pluginspec
	src/plugins/bookmarks/Bookmarks.pluginspec
	src/plugins/classview/ClassView.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/debugger/breakhandler.cpp
	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/imageviewer/ImageViewer.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/qmljseditor/QmlJSEditor.pluginspec
	src/plugins/qmljsinspector/QmlJSInspector.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/tasklist/TaskList.pluginspec
	src/plugins/texteditor/TextEditor.pluginspec
	src/plugins/vcsbase/VCSBase.pluginspec
	src/plugins/welcome/Welcome.pluginspec
	tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp
	tests/manual/fakevim/fakevim.pro
	tests/manual/ssh/errorhandling/main.cpp
2010-10-11 14:16:33 +02:00
hjk
6d0f0c7cd3 debugger: fix auto tests
Reviewed-by: Friedemann Kleint
2010-10-11 12:35:30 +02:00
Erik Verbruggen
7334ed9ec4 C++: fixed translatable quick-fix strings. 2010-10-08 13:15:21 +02:00
Erik Verbruggen
192ca70649 C++ Parser: fix infinite loop when recovering from incorrect @selector expression. 2010-10-08 13:15:21 +02:00
Christian Kamm
7e3294a8ce C++ indenter: Don't get confused on 'for (a in b)'.
Reviewed-by: Roberto Raggi
Reviewed-by: Erik Verbruggen
(cherry picked from commit c2d890f65e)
2010-10-08 13:09:26 +02:00
Christian Kamm
ed6585c312 C++ indenter: Add another ObjC test. 2010-10-06 15:39:53 +02:00
Christian Kamm
c2d890f65e C++ indenter: Don't get confused on 'for (a in b)'.
Reviewed-by: Roberto Raggi
Reviewed-by: Erik Verbruggen
2010-10-06 15:35:01 +02:00
Thomas Hartmann
f2ada23d26 QmlDesigner: using Qt 4.7 again
We need to support the N900

Reviewed-by: Kai Koehne
2010-10-06 09:47:13 +02:00
dt
6b6d9871b8 Merge remote branch 'origin/2.1'
Conflicts:
	share/qtcreator/templates/mobileapp/app.pro
	share/qtcreator/templates/qmlapp/app.pro
	src/plugins/cpptools/cpptools.pro
2010-10-04 16:07:46 +02:00
Thomas Hartmann
9a49ad003a QmlDesigner: using QtQuick 1.0 instead of Qt 4.7
huge renaming from Qt to QtQuick
propertyeditor qml files moved from Qt to QtQuick
auotests fixed
files used in tests fixed

autotests pass

Task-number: QTCREATORBUG-2556

Reviewed-by: Kai Koehne
2010-10-01 13:21:09 +02:00
Bill King
bbe790debe tests: make compile again 2010-10-01 11:32:36 +10:00
Christian Kamm
b58ebe7d29 QmlJS indenter: Fix incorrect indent after break/continue.
Make sure to push a transitory state before leave(true) so it only
finishes the statement - and not the surrounding statement!

Reviewed-by: trustme
2010-09-30 19:03:29 +02:00