Commit Graph

24 Commits

Author SHA1 Message Date
Leandro Melo
a1c2580443 Compile fix for use of QVarLengthArray
Change-Id: Ia68a121f61aab3667d1a4c99ba348fbfe2e98d4d
Reviewed-by: Bill King <bill.king@nokia.com>
2011-11-21 17:16:36 +01:00
Christian Kamm
fa6c3cc1ec C++ function signature: Automatically rename argument uses in body.
Task-number: QTCREATORBUG-6132
Change-Id: I7c21e648cfc2e85803a3bf4df0a615a1e276f96a
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-11-21 15:04:27 +01:00
Christian Kamm
a072941617 C++ function signature: Improve preserving of default arguments.
Task-number: QTCREATORBUG-5978
Change-Id: Iab0bba3c16b4cd435f0dc6339db49f209f1359d3
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-11-21 15:04:19 +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
Christian Kamm
c2eb453228 QuickFixes: Sort by priority.
* Generally changes the BasicProposalItemListModel's sort to take the
  BasicProposalItem::order member into account.
* Currently only the QML completion and quick fixes set the order.
* This means the 'Apply signature changes' quick fix is now further up
  than the 'add definition' quick fix.

Change-Id: I7b5bc82aa37fca232fddd630ab3273437e1bcc09
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-11-04 12:16:41 +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
Christian Kamm
f746c746ea C++: Improve calculation of function argument count.
Reuse Function::argumentCount instead of reimplementing it.

Change-Id: I05ba2dbee087e5dfd53c7af3ec94d214f6e37a54
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-10-21 13:28:49 +02:00
Christian Kamm
9cc4751857 C++ function signature: Abort on unexpected function name.
Change-Id: Iaaa3907f709ea9ed567f59725399efd9024f3bc0
Reviewed-on: http://codereview.qt-project.org/5319
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-26 12:45:47 +02:00
Christian Kamm
d8c7dc8c52 C++ function signature: Don't try to reuse nonexistant context.
Change-Id: I890cccc25c5ba774691edee860845e22a7b7ec78
Reviewed-on: http://codereview.qt-project.org/4876
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-14 10:44:53 +02:00
Christian Kamm
d298cffeb0 C++ function signature: Add shortcut to marker tooltip.
Change-Id: Ied3268bb624df4201ca42beb76d20b9a638d5918
Reviewed-on: http://codereview.qt-project.org/4746
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-13 14:33:44 +02:00
Christian Kamm
34dc80529d C++: Don't jump to change when applying function signature quickfix.
Change-Id: I93abf773717b3f82fc6fa15e1916f48bc3edec95
Reviewed-on: http://codereview.qt-project.org/4675
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-13 14:33:31 +02:00
Christian Kamm
fc7dae4096 C++ function signature: Allow most specifiers to be replaced.
Except for some SimpleSpecifiers and AttributeSpecifiers. Fixes a bug
where NamedTypeSpecifiers would not be replaced when the return type
was adjusted.

Change-Id: Ie093615ebf1b26d181b888fcbcc341e5bdf85fd1
Reviewed-on: http://codereview.qt-project.org/4749
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-13 11:50:06 +02:00
Christian Kamm
5a0a44bf92 C++ function signature: Don't accidentally eat specifiers.
You could accidentally delete specifiers like 'static' or 'virtual' with
the 'apply function signature changes' quick fix before.

Change-Id: Ia97a33f663a01063fad4d432551715ebf27a18d5
Reviewed-on: http://codereview.qt-project.org/4538
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-12 11:23:52 +02:00
Christian Kamm
f9effd16b3 C++ function signature: Fix problem with multiline declarations.
QTextCursor::selectedText() has null chars where the tokenizer expects
newlines.

Change-Id: I15ae87ef8525c89812a61b80abda91d36bf56576
Reviewed-on: http://codereview.qt-project.org/4450
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-08 14:56:42 +02:00
Christian Kamm
465890ac31 C++: Jump to better location when function signature is updated.
This will allow using 'Follow Symbol' to jump back after the change.

Change-Id: I99fd3ebc63a2af58b12eee9d7055a4c2f249e97d
Reviewed-on: http://codereview.qt.nokia.com/4186
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-05 12:14:36 +02:00
Christian Kamm
e99f915623 C++: Trigger function signature change via quick fix.
This way we don't need to override Return and Escape.

Change-Id: I1548118c06ee7338ba3dd9d84b82b9314ab16782
Reviewed-on: http://codereview.qt.nokia.com/4183
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-05 12:14:27 +02:00
Christian Kamm
688595e7ba C++ function link: Don't add name if name is commented.
Change-Id: Ibc38898585f6e5be625ccfc0e1304ccb44a7f167
Reviewed-on: http://codereview.qt.nokia.com/3955
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-01 09:25:24 +02:00
Christian Kamm
13a2e49dda C++: Set property on CppEditorWidget when in function link.
To allow FakeVim to pick up on the state and pass through Enter/Return.

Change-Id: Ia203a1b3fa8877d90cbaf4b46183bb01a6de1362
Reviewed-on: http://codereview.qt.nokia.com/3856
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-08-30 10:20:10 +02:00
Christian Kamm
3dcf168165 C++ function link: Disable function links on name change.
Change-Id: Ib5e3a3a381568347a7a465f956f7daad15f10ab0
Reviewed-on: http://codereview.qt.nokia.com/3596
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-08-26 08:47:36 +02:00
Christian Kamm
6d5c0c0d78 C++ function link: The symbol can be unavailable on parser error.
Change-Id: I7a95adcaafff5ff845ae0fdef5bea8c3846a6ffe
Reviewed-on: http://codereview.qt.nokia.com/3599
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-08-25 15:00:18 +02:00
Christian Kamm
6235ec5120 C++ function links: Use line+column instead of offset for target.
It's more robust if text before the target is changed in a minor way.

Change-Id: I48e27c5d194dd2dcff4b064bf59538b4660015d7
Reviewed-on: http://codereview.qt.nokia.com/3097
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-08-19 11:12:17 +02:00
Christian Kamm
8a6d767a8f Refactoring changes: Cleanup and improvements.
Previously RefactoringFiles were usually passed around by value.
However, since a RefactoringFile may sometimes own a QTextDocument
(when it was read from a file), that's not great and caused the
file to be reread after every copy.

With this change RefactoringFile becomes noncopyable and is always
owned by a shared pointer.

This change also allowed having const RefactoringFiles which is
useful because they can be safely used from other threads. See
CppRefactoringChanges::fileNoEditor.

Change-Id: I9045921d6d0f6349f9558ff2a3d8317ea172193b
Reviewed-on: http://codereview.qt.nokia.com/3084
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-08-19 11:12:09 +02:00
Christian Kamm
fa0f114f74 C++: Fix function signature link for foo(void).
Change-Id: Icc8861a5127272750c5aa0b6340967ddf0a5a085
Reviewed-on: http://codereview.qt.nokia.com/3016
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-08-17 07:47:57 +02:00
Christian Kamm
8f14bc0ea2 C++: Synchronize function decl/def refactoring.
When editing a function declaration or definition the code model
may realize the same changes have to be applied somewhere else. A
refactoring marker will pop up that can be clicked to perform the
changes. Alternatively, press enter to apply.

Change-Id: I2299a2ecfb6a8f87d4853fc7cfa99486f890a1d3
Reviewed-on: http://codereview.qt.nokia.com/2909
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-08-16 11:13:12 +02:00