Commit Graph

124 Commits

Author SHA1 Message Date
Nikolai Kosjar
947207c802 C++: Fix dangling IDocument* in CppCompletionAssistProcessor
Steps to reproduce the crash:
 1. Open some long file, e.g. botan.cpp
 2. Trigger completion and close editor immediately

The IDocument pointer was only used to reference the file name. Instead
of passing an IDocument* to the IAssistInterface, pass the file name.

Change-Id: Iafce9b818806a77968a10541114bc9b7c8665f11
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-03-19 14:12:11 +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
Friedemann Kleint
eb337b06c7 De-inline destructor of CppQuickFixOperation.
Fix gcc warnings about incomplete class CppQuickFixAssistInterface
in deletion.

Change-Id: I3ecd13f134b1ace86e3b7fb1deabacbedd73f796
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-12-11 09:48:18 +01:00
hjk
438e4af735 CppEditor: simplify CppQuickFixOperation interface
Change-Id: Ib3ed82c7f07f80027b18471ffb7b3055fa74eb52
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-11-07 14:29:11 +01: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
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Eike Ziller
d66acb51d0 Rename IFile->IDocument and FileManager->DocumentManager
And adapt the other API respectively.

Change-Id: I1e04e555409be09242db6890f9e013396f83aeed
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-20 13:32:49 +01:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
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
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
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
Leandro Melo
bec4f02495 New code assist API
This is a re-work of our completion engine. Primary goals are:

- Allow the computation to run in a separate thread so the GUI is not locked.
- Support a model-based approach. QStrings are still needed (filtering, etc), but
internal structures are free to use more efficient representations.
- Unifiy all kinds of *assist* into a more reusable and extensible framework.
- Remove unnecessary dependencies on the text editor so we have more generic
and easily "plugable" components (still things to be resolved).
2011-05-18 10:46:20 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
hjk
f576ad9f2c texteditor: merge ITextEditable into ITextEditor
rename BastTextEditor->BaseTextEditorWidget, BaseTextEditorEditable->BaseTextEditor
rename BaseTextEditor{,Widget} subclasses
rename editableInterface->editorInterface
rename createEditableInterface->createEditor
minor cleanups after renamings
2011-02-22 11:23:53 +01:00
Friedemann Kleint
a9a5e3ea17 Exported header cleanup. 2011-01-20 14:03:07 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +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
Friedemann Kleint
0ad2d077b9 Exported header cleanup: Separate out CppQuickFixCollector. 2010-11-01 17:04:48 +01:00
Erik Verbruggen
3ebc328498 C++: added quickfix to insert a method definition.
Reviewed-by: Christian Kamm
2010-09-30 12:19:39 +02:00
Erik Verbruggen
9a00b8ba27 C++: Renamed cppdeclfromdef.{cpp,h} to cppinsertdecldef.{cpp,h} 2010-09-09 15:26:43 +02:00
Kai Koehne
a8747f32e4 CppEditor: Simplify CppRefactoringChanges class
Remove unneeded methods from API.
2010-08-16 16:16:25 +02:00
Christian Kamm
7a5df3c39d QuickFix: Move helpers from QuickFixData to RefactoringFile.
Makes them easy to use everywhere. Also when calling
QuickFixData::textOf and friends, it wasn't really clear which file
they would run on.
2010-08-13 12:51:22 +02:00
Christian Kamm
bbe64796a0 QuickFix: Introduce CppRefactoringFile. 2010-08-13 12:51:22 +02:00
Christian Kamm
0355e37e53 QuickFix: Migrate to a nicer API for cross-file quick fixes. 2010-08-12 14:21:35 +02:00
Erik Verbruggen
b2659950e2 Added the InsertionPointLocator.
For answers to questions about where to insert a snippet/chunk of C++ code. Ok,
currently it will only find the One And Only place to insert method
declarations in classes, and it will need some tuning.
2010-07-27 15:32:40 +02:00
Erik Verbruggen
d980e37e24 Reworked the QuickFix infrastructure. 2010-07-26 13:07:19 +02:00
Roberto Raggi
f895cbb472 Sorry this was not supposed to be committed.
Revert "Revert "Try to fix the type rewriter.""

This reverts commit c9bc1e7c64.
2010-07-20 15:10:02 +02:00
Roberto Raggi
c9bc1e7c64 Revert "Try to fix the type rewriter."
This reverts commit 33b19f0210.
2010-07-20 14:23:46 +02:00
ck
46f537e56a Quickfix: Convert underscore notation to camel case.
Reviewed-by: Roberto Raggi
2010-07-20 11:07:14 +02:00
Roberto Raggi
89cc8993c9 Handle shadow declarations. 2010-07-20 10:44:07 +02:00
Roberto Raggi
33b19f0210 Try to fix the type rewriter. 2010-07-19 20:12:16 +02:00
Roberto Raggi
1702543d80 Added a simple quickfix to declare local variable. 2010-07-19 19:12:24 +02:00
Roberto Raggi
87001994d7 Fixed typos. 2010-07-19 18:43:45 +02:00
Roberto Raggi
e78380fdf2 Share the LookupContext. 2010-07-19 18:27:11 +02:00
Roberto Raggi
80a1a72201 Quickfix missing #include files. 2010-07-19 17:40:35 +02:00
con
5b989680ff Fixes: Completing switch statements with enums in namespaces or classes.
We need to add the fully qualified name to the case statements.

Reviewed-by: Roberto Raggi
2010-07-19 16:46:19 +02:00
Roberto Raggi
fff4203a46 Introduced helpers to rewrite types and names.
Done-with: Erik Verbruggen
2010-07-16 11:04:52 +02:00
Roberto Raggi
06c7cb9b88 Disable Create declaration from definition quickfix. 2010-07-12 15:10:00 +02:00
Erik Verbruggen
9135c8ccb1 Quickfix for adding a declaration to a class from a definition. 2010-07-12 09:53:58 +02:00
con
795ae72e0f Quick fix for completing cases in enum based switch statements.
Reviewed-by: Roberto Raggi
2010-07-09 10:33:00 +02:00
Tobias Hunger
fd9b74dbbb Improve translation quickfix
* Use tr if a tr method is available at the object
 * Use QT_TRANSLATE_NOOP for global string constants
 * Do not offer to translate stuff inside QLatin1String and QLatin1Literal
 * Do not offer to wrap strings inside tr, trUtf8 and QT_TRANSLATE_NOOP
   with QLatin1String
2010-07-06 11:13:06 +02:00
Roberto Raggi
6d8ecb762f Moved the semantic highlighter in a QFuture. 2010-07-06 10:53:34 +02:00
Roberto Raggi
eca8693ebd Use the correct scope name when inserting QCoreApplication::translate(). 2010-07-06 10:36:41 +02:00
Roberto Raggi
d209bd72db Check for possible 0x0 access. 2010-07-05 12:49:03 +02:00
con
8da2d2e9ce Quick fixes converting between hex, octal, and decimal integer literals. 2010-07-05 12:29:51 +02:00
Tobias Hunger
2ec6776548 translation quickfix
* Mark a string literal as translateable, using either
   tr() (if the object is perived from QObject) or
   QCoreApplacation::translate().
2010-07-05 10:39:19 +02:00
con
4be3333bf3 Add "wrap in QLatin1Char" quick fix. 2010-07-01 14:21:54 +02:00