Commit Graph

1454 Commits

Author SHA1 Message Date
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
hjk
21c0cdee40 Core::Filemanager: make some methods static
This follows suit to the ICore changes.

Change-Id: Iba2de1b1e3f2574fd1459892eae702e6af1cc7dc
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-25 19:23:11 +01:00
hjk
b0b105d575 ProjectExplorer: make currentProject static
This saves one function call compared to the instance()->currentProject()
pattern and is typically less to type on the caller site.

Change-Id: I65568f30205fc90e2aaca7e8e7f0192241df8c85
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-24 19:20:13 +01:00
hjk
4a21f0c3c8 Use new static ICore interface.
Change-Id: I9b690d9b150c8d162b15370f9f8986267c9128f1
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-24 18:48:47 +01:00
Eike Ziller
50b1d6742a Windows build fix.
Change-Id: If5389209dad8dbd4c78d9faff41323ae3218cd78
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-24 14:14:00 +01:00
Leandro Melo
474fa9a7ff Fix assert
Change-Id: I41b4b444fdce6d73c0c62aa1d98a7c9d80a6a4c9
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-01-24 14:06:05 +01:00
Eike Ziller
cd2dab2922 Implement "search again" for find usages (C++)
Change-Id: Ia3dc174c64da9194401883a1a989a712cb7aaed8
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-24 12:34:04 +01:00
Leandro Melo
8e3c88f02b C++: Share symbol finder across editor instances
Change-Id: I75880597d237bbbe1393dd02153cedba1165bed6
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-24 11:41:49 +01:00
Leandro Melo
efe9bca20c C++: Replace non-absolute-critical asserts for soft ones
Change-Id: I021074a78d90929b4e83b8aff9db1ae7995e8c6a
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-24 09:58:59 +01:00
Leandro Melo
35bcccb500 C++: Remaining fixes in symbol finder
Should have gone in the previous fix commit...

Change-Id: Ibca55cbd6fd58caee7d61f5e8f8c37f67391c597
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-23 21:00:43 +01:00
Leandro Melo
b97b45a341 C++: Fix "reference" file in symbol finder
Througout the initial review the singleton was transformed into an
ordinary class, but a error was introduced: The "reference" file was
incorrectly assumed to be the editors file, which is wrong, since
it should be the declaration file.

Change-Id: Iad3e25a690fa8bd07a18184b24b10f8dea965332
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-23 17:17:00 +01:00
Leandro Melo
6caa899bfc Compile fix
Change-Id: I22dfa74f8f10a601103b179eb037604d5a747077
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-23 12:45:48 +01:00
Leandro Melo
466ea4842c C++: Improve file accuracy when finding symbols
This patch introduces a priority-based mechanism when searching for certains
symbols in the snapshot. The priority corresponds to how similar the file path
from the "reference" symbol is to the file path from the "candidate" symbol.
This solves a variety of issues when matching "equivalent" symbols but that
are in another file/project, such as when following a function declaration,
a forward class declaration, or adding a definition through a quickfix.

There's now a symbol finder which will compute the "best" search order and cache
the most recent results. A consequence is that following symbols in some cases
is slower, but not apparently significatly.

Note: The "find" functions were moved from the Snapshot to the new SymbolFinder
class.

Task-number: QTCREATORBUG-6697
Task-number: QTCREATORBUG-6792

Change-Id: Ia518f014275fec1f4d0cb3224bd4e06a9df6d557
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-23 11:34:44 +01:00
Leandro Melo
c287d90604 C++: Rename source/setSource to utf8Source/setUtf8Source
Continuinng a previous commit... This is in order to make
the interface clearer.

Change-Id: Ic1b05217f878578bc84a064927507b75981c47d6
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-13 11:22:28 +01:00
Leandro Melo
fd179ed951 C++: Accept UTF-8 byte arrays in type of expression
The model uses UTF-8 internally and it makes more sense to only
convert when necessary.

A following commit will rename the source/setSource methods in
document for more clarity too.

Change-Id: I960ea0754efabd1436ad4b4299a57faeb65a8bee
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-13 10:17:03 +01:00
Leandro Melo
f04be782ab C++: Preserve original indentation in extract function
Also extend the refactoring changes to allow for reindenting.

Task-number: QTCREATORBUG-6797
Change-Id: I515c9a37d9e62e1d5de52ff99bd492e739a81885
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-12 15:32:02 +01:00
Nicolas Arnaud-Cormos
4095b80793 Add a cache for the header/source mapping.
Now that we are iterating all the files in the project (instead of stopping at
the first success), we need a cache to make the switching fast enough on big
projects.

Change-Id: Ib7d63c93b3303c534ca53856d96333a822046ced
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-11 11:47:54 +01:00
Nicolas Arnaud-Cormos
ab8d39ace1 Fix the switch header/source action.
In case multiple files have the same name (in a complex project), find
the file with the most common path instead of the first one.

Change-Id: I75495dabe7ba8f5142d6b52e7c07d54d5d6f54bd
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-11 11:44:35 +01:00
Leandro Melo
c25f0585d1 C++: Extract function quickfix
Task-number: QTCREATORBUG-5485

Change-Id: Ib6aaeaadad4b421480d22399392768d4bad85bda
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-10 15:31:03 +01:00
Eike Ziller
4c849bc21d Fix warning.
Change-Id: I30ec590b86846f8fdcb0094a848e56002d590b7a
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-20 18:47:44 +01:00
Eike Ziller
bf97079be3 Fix cancelling search for usages.
Change-Id: Ic78cf5030e78759018ea84d0c258c81c8081ae98
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-20 13:15:03 +01:00
Eike Ziller
11907bc072 Fix starting a usage search while another one is running.
Theoretically it could now run multiple searches in parallel, but since
a single search grabs all available threads from the pool, any search
request afterwards is queued for execution when the previous one
finished.

Task-number: QTCREATORBUG-6101
Change-Id: Ifada0ccdd1ce7cfb4aaaaa4de2db070025f91a3a
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-20 12:21:34 +01:00
Eike Ziller
4de9fd8dac Implement "Search Again" for symbol search.
Task-number: QTCREATORBUG-621

Change-Id: I4bd39c88afc1df93712b1d9a76f875516c657f3d
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-20 12:03:59 +01:00
Eike Ziller
26d8b8753c Disable "Search Again" if file filter is disabled.
For example disabled it for "All Projects" searches when all projects
are closed.

Change-Id: Icc65a87577ba51f4362791dc8ecdca3c92819553
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-20 12:03:50 +01:00
Eike Ziller
44f66959a3 Allow multiple simultaneous C++ symbol searches.
Task-number: QTCREATORBUG-6101

Change-Id: Ib632414b13c4d3748bd33f61e7fec98292a1b57e
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-19 12:55:27 +01:00
Leandro Melo
beede7d7cf C++: Automatic Doxygen comment blocks generation
This improves our completion support for documentation
comments. It's now possible to have a Doxygen block
generated when hitting enter after a /** or /*! comment
start. A couple other related options are also available.

Task-number: QTCREATORBUG-2752
Task-number: QTCREATORBUG-3165

Change-Id: I1c81c0b4b370eb1d409ef72a9c7f22c357f202f4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-12-09 10:25:59 +01:00
Christian Kamm
0ba1234108 C++ indenter: Improve member initializer indent.
If you indent the first initializer differently, that will now stick
for the following ones.

Change-Id: Ib08dfbf64282eda41202528b7255e693c350f7c6
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-08 13:55:16 +01:00
Christian Kamm
dc72cff71a C++: Add basic 'insert #include' quick fix.
Change-Id: I3a2fef56d6d1871ea4bbb139f9bdd2bc44dd0123
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-02 13:00:28 +01:00
Eike Ziller
b50e48a1fa Merge remote-tracking branch 'origin/2.4'
Conflicts:
	share/qtcreator/welcomescreen/widgets/ExampleDelegate.qml
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/exampleslistmodel.h
	src/plugins/qtsupport/gettingstartedwelcomepage.cpp
	src/plugins/qtsupport/gettingstartedwelcomepage.h

Change-Id: I268072db01064d71bc4828942d71fc772ddd3539
2011-11-28 08:34:37 +01:00
Jarek Kobus
3d57758d61 Transform always old code style settings
Before, we didn't transform the code style settings
if they were defaults (so no entries were written
for them in the settings). In case someone
changed global tab settings and didn't touch
code style settings in 2.3, the code style settings
were not transformed. Now, we transform them too
so that legacy code style settings in 2.4
(named: "Old Creator") contains old global tab settings.
We also take care of not creating legacy settings
in case neither textTabPreferences nor CppTabPreferences
nor CppCodeStyleSettings were saved (when creator 2.3 used only
defaults or when it's a first run of creator 2.4 without
old settings).
Handle legacy transformation for qml too.
Make a code bit more readable.

Task-number: QTCREATORBUG-6614
Change-Id: I37b8dd4d1170f397b7d304c59575d9ae37884564
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-11-25 09:54:47 +01:00
hjk
f012bf4494 compile fix with namespaces
Change-Id: I1b888ff8bd5c30a13dc8c00824d4cae6990a4b23
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-24 13:03:56 +01:00
Tobias Hunger
0ce9fa2c16 UI files: Do not polute the global Ui namespace
Make sure all ui-files are in the plugin's internal namespace.

Change-Id: Ifb2c3093441e8feb89e46f52fbb386fc316cfd13
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-24 10:49:41 +01:00
Christian Kamm
09f56a5c0d C++ code style: Improve tooltip.
Change-Id: Ib71e3b87bd07292b0aecdbec7ebfb1fcd0efea7e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
2011-11-22 14:49:06 +01:00
Christian Kamm
bc1b724476 C++: Move codegen test into the CppTools plugin.
Change-Id: I4c70a9dbd5445188c3d202427da96e1c6ff90b63
Reviewed-by: Bill King <bill.king@nokia.com>
2011-11-15 15:37:29 +01:00
Leandro Melo
fa7c7c4eca C++: Don't show unused mark for known RAII types
Change-Id: Id552539c6a2cf5d7558adf88bed61a11ab770516
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-11-15 11:12:36 +01:00
Eike Ziller
85cf2b661e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/debugger/qml/scriptconsole.cpp
	src/plugins/git/gitplugin.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h

Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
hjk
82f5573626 more Id type fixes
Change-Id: I3720946ba5485696822976567d83b4d6cb1fb283

x

Change-Id: Iab58bc34bc56371405d132315573b484a533b77c
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-10 15:57:09 +01:00
Daniel Teske
8c25afbec4 runUic: Have a timeout on writing and error out if we can't write
Task-Number: QTCREATORBUG-6449

Change-Id: I592c7e925267d538124b96b899c1f8a6bc8d8955
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-03 13:26:29 +01:00
Robert Loehning
7ec73a3e16 String fixes
Change-Id: Iffa87a0e394b799e3987fa60f0a7559d5c1d0d27
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-03 10:36:46 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
hjk
29279ab8c7 more style fixes of string literal access
Change-Id: I60b0c53681c6a0cc38231e805479deb614aa0096
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-02 18:20:19 +01:00
Daniel Teske
43d417981f Qt Ui Code Model: Don't try to run a empty string if no qtversion is set
Change-Id: I04eedaad849ad744a98f2ca8dc7883d0b3bafd9b
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2011-10-28 10:19:13 +02:00
Eike Ziller
81cce8902e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	qtcreator.pri
	src/libs/qmljs/qmljscheck.cpp
	src/plugins/debugger/gdb/gdbengine.cpp
	src/plugins/debugger/gdb/remotegdbserveradapter.cpp
	src/plugins/plugins.pro
	src/plugins/projectexplorer/buildmanager.cpp
	src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp

Change-Id: Id2dcebf95b94dc46c1d85908ba1d1378aaf362ac
2011-10-28 10:17:44 +02:00
Erik Verbruggen
7270633f86 C++: removed pre-defined macros that should come from windows.h
Task-number: QTCREATORBUG-5734
Change-Id: Ie4aa437616955fd65fcc6adbfc0e9f115caf7e1c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-26 15:28:07 +02:00
Christian Kandeler
6820f22bbd CppTools: Remove function replicating standard library functionality.
Change-Id: I0778aa3d91d8c62fcce7e07e2ceffa1970281ec6
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-10-25 15:14:52 +02:00
Eike Ziller
5dbe570f9c Fix licenses.
Change-Id: I834bc5da86c97ddaeefb43011444da8ed0e85180
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2011-10-18 17:41:23 +02:00
Oswald Buddenhagen
0164e1bea2 Merge branch '2.3' into 2.4
Conflicts:
	src/plugins/debugger/commonoptionspage.ui
	src/plugins/madde/maemoqtversion.cpp
	src/plugins/projectexplorer/runsettingspropertiespage.ui

Change-Id: Ieccda73ddca22f9a2d41351619cb682b06d9bfcf
2011-10-18 13:50:38 +02:00
Yuchen Deng
4ea9c21932 C++: Improve completion assist
Avoid inserting characters that are already there.
e.g.
int testFly() {}
te|Fly()
When triggers a completion, the code will changed to:
testFly()|
But in before, the code will changed to:
testFly()|Fly()

Notice:  Character of '|' show the cursor position.

Change-Id: I6c111e30356b2549aebc6fbea05608e70d6ab41f
Merge-request: 398
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-10-17 12:22:00 +02:00
Leandro Melo
87943ca61c C++: Fix hexadecimals in quick fix
Task-number: QTCREATORBUG-6240
Change-Id: Id3dc48d47f88017b3bc9e026c8e5552d2e9f4d48
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-10-12 14:44:27 +02:00
Christian Kamm
aa3d406faf C++ indenter: Accept attributes in access specifiers.
Change-Id: Ie85b8264c9579e8c8312e30018280fb11f95edda
Reviewed-on: http://codereview.qt-project.org/6328
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
Sanity-Review: Erik Verbruggen <erik.verbruggen@nokia.com>
2011-10-11 12:45:04 +02:00