Commit Graph

31 Commits

Author SHA1 Message Date
hjk
5b0bf61640 qtcassert: move actual printing to separate function and enforce style
This also allows simple setting of breakpoints on failed asserts.

Change-Id: I6dd84cbfaf659d57e39f3447386cebc0221b2b84
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-04-17 09:53:44 +02:00
Daniel Teske
20efc0a6f6 Fix reloading removing all BaseTextMarks
It was already broken in 2.4.

Task-number: QTCREATORBUG-7110

Change-Id: I24fae889c67ba5436548b7534d7257b6680a8c81
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-04-05 11:59:09 +02:00
Daniel Teske
9bf9474e8d BaseTextMark: Remove checks for linenumber after updateLineNumber
The breakpoints are deleted in some cases on updateLineNumber, thus we
can't call anything on the mark after calling updateLineNumber

Change-Id: Ib6c7bddc980fc72e9d4f4b9ec9e2eeb8292c1e15
Reviewed-by: hjk <qthjk@ovi.com>
2012-03-13 17:21:36 +01:00
Daniel Teske
b7062b01a0 Add namespace TextEditor around DocumentMarker
Missed in moving the class

Change-Id: Iec712b64338d0ec84d7aa599d36f1a7845be2a74
Reviewed-by: hjk <qthjk@ovi.com>
2012-02-22 11:19:20 +01:00
Daniel Teske
2df2c0655c Initialize ITextMark with a lineNumber
Ensure that it is updated as the lines are moved. That can be later used
to quickly find and remove the marks again.

Change-Id: I2285111996d5c8ef12f792fd73ff00ce186addc1
Reviewed-by: hjk <qthjk@ovi.com>
2012-02-21 18:08:33 +01:00
Daniel Teske
45850c23f2 Move BaseTextDocument::documentClosing to BaseTextDocumentLayout
Centralizing mark handling

Change-Id: Ie29c15d97aa171fbf3516d4242fe3f962091477a
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 17:26:37 +01:00
Daniel Teske
c44d65d3c6 Move DocumentMarker to BaseTextDocumentLayout
Centralizing the markhandling in BaseTextDocumentLayout

Change-Id: I16633db8aba72e81f724aaccc2596f5fff81761d
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 17:26:09 +01:00
Daniel Teske
b9016b900e Move mark related functions to BaseTextDocumentLayout
BaseTextDocument::updateMarksLineNumber() and updateMarksBlock()

Change-Id: I407cddcbe3133a5e8af960d39fe8d499b640c708
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 17:25:42 +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
Friedemann Kleint
34933799fa TextEditor: Compile with QT_NO_CAST_FROM_ASCII.
Change-Id: I8fa683c4f68d6e3d3a3eb95acf2f54f8c56b87b7
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-06 11:41:24 +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
Yuchen Deng
18b675d32f Double-click to select current block
This is a Eclipse-like feature, for select enclosing element.
e.g.
int test() {| // Here is the cursor position
    ...
}
When Double-click, we can select the block: {...}
I think this is a useful feature.

Change-Id: I4ca7ed04056176195d1622714effda9079ae0e44
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-11-08 14:53:34 +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
Leandro Melo
3945b9a70f Editors: Make sure folded blocks remain consistent
When folding indents change and a block becomes no longer
folded we need to update the user data. This patch tries
to handle general inconsistencies that might arise in such
situations. Notice however that there are stil other problems
to be addressed (including issues in Qt).

Task-number: QTCREATORBUG-5771
Change-Id: I38b869832159598d46cde00058308c218ca31f1a
Reviewed-on: http://codereview.qt.nokia.com/2908
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
Reviewed-by: Matthias Ettrich
2011-08-15 10:21:52 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
Oswald Buddenhagen
dc3c156cac Merge branch '2.2'
Conflicts:
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h
	src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.h
	src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
	src/plugins/qt4projectmanager/qt-maemo/qt4maemotargetfactory.cpp
	src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
	src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
	src/plugins/qt4projectmanager/qt4target.cpp
	src/plugins/qt4projectmanager/qt4target.h
	src/plugins/qt4projectmanager/qtoptionspage.h
	src/plugins/qt4projectmanager/qtversionmanager.cpp
	src/plugins/welcome/welcomemode.cpp
2011-04-14 12:39:31 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
hjk
f67e9a54c9 Adjust mark area width to mark width.
Patch by Kevin Funk
2011-03-23 10:49:00 +01:00
hjk
1b1896b38b texteditor: give priorities to mark to ensure z-order when drawing 2011-03-02 18:43:26 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
mae
ebc305b0d8 Fix: Folded code is deleted on save
Also fixes a crash when folding code at the very end
of the document

Task-number: QTCREATORBUG-2159
2010-09-07 16:38:03 +02:00
mae
ab8a8c018d Fix brace states
The lexer needs its own lexerState, before it was using
the syntax highlighter user state. This breaks the brace
depth calculation of the highlighter.

Reviewed-by: Roberto Raggi
2010-07-12 11:18:31 +02:00
Olivier Goffart
b6efa77e25 Fix use of unitialized memory 2010-07-09 10:19:03 +02:00
Christian Kamm
7ae3fd5a10 C++ indenter: Refactor to be independent of BaseTextDocumentLayout.
Done-with: Thomas Hartmann
2010-07-08 10:16:17 +02:00
Christian Kamm
88f2e340bd C++: Introduce the new CodeFormatter.
Done-with: Erik Verbruggen
2010-07-02 16:13:12 +02:00
mae
6ef602d121 add basic support to show refactor markers
See BaseTextEditor::setRefactorMarkers(...). The markers support
a clicked signal via BaseTextEditor and tooltips. They feature
a cursor, but are always positioned at the end of the line (not block!).

As special gimmick they do extend the document width when they
are positioned outside the document area.
2010-07-02 13:48:57 +02:00
mae
697cb0daa8 Code folding fix
Remove harmful over optimization (made it impossible to restore
nested folding states)
2010-05-20 16:40:28 +02:00
mae
e07c34017e Rework code folding
The new and cleaner foldingIndent in the block user data will
make it easier to support other kinds of indentation for various
other programming languages (like Python).
2010-05-20 15:11:31 +02:00
Thorbjørn Lindeijer
8e9a70addf Renamed TextEditDocumentLayout to BaseTextDocumentLayout 2010-04-26 14:42:11 +02:00
Thorbjørn Lindeijer
41ab8fbbf1 Moved TextEditDocumentLayout and related classes to their own file
The Parentheses, TextBlockUserData and TextEditDocumentLayout classes
and their member function implementations were spread around the
BaseTextEditor class. Moving them to their own file to make the code a
bit better organized.

Reviewed-by: mae
2010-04-26 14:42:11 +02:00