Commit Graph

39 Commits

Author SHA1 Message Date
Thiago Macieira
ca4a5e7f03 Fix the rest of the warnings about integer sign change with ICC
None of these change the code in any way. The solutions applied are:
 - change the type to a more appropriate one, if possible
 - use ~0 instead of -1 when flags were intended
 - cast a -1 to the proper type otherwise

Change-Id: Ifcc125528f32b8c8f9ab20bea103e2a693045bf8
Reviewed-by: hjk <qthjk@ovi.com>
2012-05-22 18:51:32 +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
Erik Verbruggen
ea27d72d19 Fix crash when doing "Move into file" refacoring action.
Change-Id: I0b42953b7bce6b594387777691aca4c2683a5828
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-19 13:59:46 +01:00
Leandro Melo
1c1b3840c5 Editors: Fix refactoring changes indent ranges selections
This also fix an error by 1 when reindenting for the extract function quickfix.

Change-Id: Icd666edf4c4473322a4d4d9ed5f3ca7fbbfb7d83
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-16 16:01:51 +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
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
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
26f855ca47 RefactoringFile: Use editor's cursor, if possible.
This fixes 'undo' with quick fixes not preserving the original cursor
position.

Change-Id: If6475a5afab3e806ea713c769f730c6ffd773298
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-10-20 15:45:54 +02:00
Christian Kamm
71cbd765b2 RefactoringChanges: Fix problems with encodings.
Task-number: QTCREATORBUG-6140
Change-Id: Iedbfca6987bffa2670df39f5f461690218f6da14
Reviewed-on: http://codereview.qt-project.org/5233
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-20 13:25:36 +02:00
Christian Kamm
fb91b88b9c RefactoringChanges: Add missing virtual destructor.
Change-Id: I6237e7c3a8c1e4a1a223c6f1a66c4e866406ca2b
Reviewed-on: http://codereview.qt.nokia.com/3312
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2011-08-22 13:42:40 +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
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
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
Oswald Buddenhagen
45c9cf7a12 add/unify i/o error handling
lots of use of Utils::FileSaver and Utils::FileReader

Task-number: QTCREATORBUG-1619
2011-04-18 14:10:14 +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
Leandro Melo
ea313f3ec8 Text editor: Introduce per project settings
With some refactorings to make the code look better.

Reviewed-by: con
2011-02-21 17:22:24 +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
793d1cba77 Start on some cleanup of EditorManager API and usage. 2011-01-05 10:41:34 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
Christian Kamm
f0f623bcb8 Fix crash related to 'add definition from declaration' quickfix.
Reviewed-by: hjk
Reviewed-by: Erik Verbruggen
2010-10-07 14:54:04 +02:00
Erik Verbruggen
f1de90c872 C++ Editor: fixed cursor positioning after quickfix action. 2010-09-24 10:05:29 +02:00
dt
08ccda5862 EditorManager: Change openEditor/activateEditor to not do mode switching
Also introduce a indirection, modes have now types, edit and debug have
the same type, and editors do have a prefered type of modes instead of a
prefered mode.

That fixes the bug that if the prefered qml editing mode was set to
design, then in switching between qml editors would
- in Edit Mode: stay in edit mode
- in Debug Mode: switch to debug mode
2010-09-14 15:23:11 +02:00
Christian Kamm
bbe64796a0 QuickFix: Introduce CppRefactoringFile. 2010-08-13 12:51:22 +02:00
Christian Kamm
1ae9940b32 QuickFix: Add a warning to RefactoringChanges::removeFile. 2010-08-12 14:26:30 +02:00
Christian Kamm
03b443b86b QuickFix: Simplify getting a Document for a C++ refactoring. 2010-08-12 14:21:35 +02:00
Christian Kamm
0355e37e53 QuickFix: Migrate to a nicer API for cross-file quick fixes. 2010-08-12 14:21:35 +02:00
Christian Kamm
235f4d1d26 QuickFix: Clean up RefactoringChanges and add missing functionality.
* Can change files without opening an editor.
* Can open an editor without changing a file.
* Default to reindenting new files.
* Allow reading a file temporarily to access document and text.
2010-08-12 14:21:35 +02:00
Roberto Raggi
d3761d10e2 Use 1-based locations. 2010-07-29 15:17:24 +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
9135c8ccb1 Quickfix for adding a declaration to a class from a definition. 2010-07-12 09:53:58 +02:00
Roberto Raggi
c3657634ed Added workaround for indentation not working when inserting text at the beginning of a range. 2010-06-22 15:59:21 +02:00
Roberto Raggi
27f6b2ceb5 Renamed CppRefactoringChanges::parsedDocumentForFile(). 2010-06-22 12:13:30 +02:00
Roberto Raggi
eb749ec3a2 Generalized the changeset operations. 2010-06-22 12:13:30 +02:00
Erik Verbruggen
297b281ced Added infrastructure to change multiple files at once. 2010-06-14 15:03:10 +02:00