Commit Graph

514 Commits

Author SHA1 Message Date
hjk
d006ca80a6 texteditor: use an enum instead of QString as color ids
Change-Id: I658412c18d5ccfe978ec444451c6417ffb18d71c
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-05-03 13:11:25 +02:00
Konstantin Tokarev
7ae82b9f94 Added TextEditor commands FollowSymbol and JumpToFile.
Most of editors have "jump to file" or "follow symbol" actions. This
patch reduces amount of related boilerplate code.

New actions are made optional to prevent shortcut clash (both use F2).

Change-Id: I2af580ed9d6789df25f4487ba001f3b83887c504
Reviewed-by: hjk <qthjk@ovi.com>
2012-03-28 08:38:41 +02:00
Eike Ziller
7931159c09 Merge remote-tracking branch 'origin/2.5'
Conflicts:
	src/libs/qmljsdebugclient/qmlprofilereventlist.cpp
	src/libs/zeroconf/servicebrowser.cpp
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qmlprofilerengine.cpp
	src/plugins/qmlprofiler/qmlprofilertool.cpp
	src/plugins/qmlprofiler/qmlprofilertraceview.h
	src/plugins/qmlprofiler/tracewindow.cpp

Change-Id: Ib5e7579efffe74f2bf6871690d1e398e1062f986
2012-03-21 09:57:56 +01:00
hjk
cec1150d55 texteditor: allow quickfixes also in overwrite mode
We now temporily switch to insert mode instead. Completely blocking
would break quickfixes in fakevim, as it keeps the texteditor in
overwrite mode most of the time.

Change-Id: Ibc492c80bf02fd2a203a607edc6966c338854a9f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-16 15:17:23 +01:00
Yuchen Deng
012ff2d22a Editor: Add feature for set/unset UTF-8 BOM
Change-Id: Iec7e36b1d7a526d7fa8a8096110b91f9c4cc44f9
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-03-15 11:11:03 +01:00
Robert Loehning
b41171c847 Normalized connect()s
Change-Id: Id353ab140a46e06ffc3abf667ab3b234e749e17c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-03-06 12:46:52 +01:00
Orgad Shaneh
f7e8449867 TextEditor: Select current block on double-click only with left-button
Change-Id: I749765d24891a331ada8364a13e23114e963df1e
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-03-01 22:18:15 +01:00
Daniel Teske
6f0fa5114d Make TaskMarks clickable and jump to the right task in the taskwindow
That means it is no longer possible to make bookmarks on lines with
errors or warnings by simply clicking. That's not nice.
It might be better to do something different, but let's see how the
feedback to this is.

Change-Id: I34788ff638ed49c21001d03cd60f992ffabd6153
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-03-01 12:07:18 +01:00
Daniel Teske
407e1eaa9f Marks: If there are more then 3 marks, paint the highest priority
Also make the mark area 2 pixels wider so that 3 marks fit.
And adjust the priorities of marks, so that bookmarks and breakpoints
are visible even if there are multiple tasks on the line.

Change-Id: Ie8e3e7fa4db262c4243fb61772b6373ea283f1c9
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-03-01 12:07:07 +01: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
3aab8beaf4 Supply c++11 flags and per-project info to c++ code model.
A manual squash/merge of the changes below, plus a couple of subsequent
code fixes.

59085aa5fbb99e2d786cd2c1a06c24a111ccb49f:
    Modify CppModel::ProjectInfo

    Adding per project node information, to pass on the correct
    defines/includes for each file, instead of aggregating them incorrectly.

    Also split up SOURCES and OBJECTIVE_SOURCES.

    Also ask the toolchain to convert the compilerflags to flags the
    codemodel understands, for now only gcc and only c++11.

    Also make the toolchain aware of the flags used to compile, so that it
    can emit the correct defines.

    Note: No header files are passed on.

74028802314cd4e75b41b46407433e07090a304d:
    GCC: Evaluate cxxflags when checking for predefined macros

ebaaa4957e4c02cc9637a998eddae1d0acd74f83:
    MSVC: Take cxxflags into account when checking for predefined macros

9bfce7e889bcf7bcc47bf880e3ea25945ca7d0d7:
    Compile fixes

Change-Id: I9de94ad038dfc5dc1987732e84b13fb4419c96f5
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
2012-02-16 15:17:17 +01:00
Daniel Teske
bb4f25b748 Rename BaseTextEditorPrivate to BaseTextEditorWidgetPrivate
As it is the private class of BaseTextEditorWidget.

Change-Id: I49c9b4e85cffbca3d0a61dd82e93596e7bf29376
Reviewed-by: hjk <qthjk@ovi.com>
2012-02-16 13:59:47 +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
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
Daniel Teske
cf4c131541 Add ITextMark::visible() to make ITextMarks not take any space
Change-Id: Ib07cdc5cbe9a26385f82e6a845d72f218de7b2a6
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-14 14:27:06 +01:00
Adam Treat
fe9eeece40 Adds two actions to indent and unindent a selection.
Add actions to the basetexteditor to indent and unindent a selection.  These actions
are equivalent to Key_Tab and Key_BackTab respectively.  The advantage of having
actions here is the user can override them and assign any key binding they want.
Thus, I could assign Ctrl+I and Shift+Ctrl+I to them and have the same behavior
as Kate.

Change-Id: I0a305a7b45018072a78f2880ea15650ea92095a1
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-02-10 12:42:29 +01:00
David Schulz
73c3258683 Editor: deselect text on contextmenuevent if...
... the event was raised on a position outside of the selection

Task-number: QTCREATORBUG-6734
Change-Id: Ida4ede1e5e7c118799212a1a6cf4766eec969b4a
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-02-09 15:04:58 +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
Fawzi Mohamed
6308632e5d texteditor: do not allow block selection to modify readonly editors
Task-number: QTCREATORBUG-5391

Change-Id: Icd896f39c183a0bf5e402ad65189b009dabdadc1
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-26 12:42:15 +01:00
Morten Johan Sorvig
b0cd54c1ec Replace Q_WS_MAC with Q_OS_MAC.
We want to carry over all mac-specific code paths
to Qt 5. WS_MAC is no longer set; OS_MAC is.

This change is compatible with Qt 4 builds since
OS_MAC is set whenever WS_MAC is. (OS_MAC would
also be set for the theoretical X11/Mac platform,
but that's anyway not a supported configuration
for Creator)

Change-Id: Ib25d8c4e83e7e27d911124cd48aa17fdb875923f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-01-26 11:06:12 +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
Leandro Melo
a03087ceb9 Editor: Ensure cursor is visible before completion popup
Task-number: QTCREATORBUG-6843

Change-Id: I4f4108bdf37cb1451d998e226e97b3ee7fbc3a33
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2012-01-24 13:27:26 +01:00
David Schulz
43a603524b remove selection of text by pressing down-key
on the last text postion

Task-number: QTCREATORBUG-5757
Change-Id: Icc1714a29e5eb74e7d6db413285232a2042f95f2
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-24 12:56:00 +01:00
Bojan Petrovic
a138465848 C++: Select All select the symbol while renaming symbol
https://bugreports.qt.nokia.com//browse/QTCREATORBUG-5520

Change-Id: Ifb163adb2609e17cdbc3df1e90b7e583c75fac49
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-20 15:27:09 +01:00
David Schulz
f09e849c96 Highlighting single characters
only if you're searching for whole words

Task-number: QTCREATORBUG-6372
Change-Id: I10700258cacdc5af52554824a971041d6a1c2b22
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-12 15:36:14 +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
Leandro Melo
b8d9b28f1e Editor: Introduce circular clipboard
This is a clipboard within Creator only. It allows the user to paste/navigate
through the recently copied content by repeatedly triggering a shortcut (which
is by default set to Ctrl+Shift+V).

Task-number: QTCREATORBUG-146
Change-Id: Ie449ab4b304548d5037a0c877bbbc0344d654325
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-12-14 14:06:46 +01:00
Leandro Melo
eed9ab2901 Editor: Update layout accordingly when restoring state
Whenever blocks are folded/unfoled we need to request a layout update.

Task-number: QTCREATORBUG-6666
Change-Id: I123b99c697a034cb04871bc41f42eac4f39895a2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-12 16:42:52 +01:00
Leandro Melo
7f3764bfe3 Editor: Support triggering tooltips from keyboard
There's an option in Text Editor->Behavior->Mouse and Keyboard to enable
tooltips upon pressing and releasing the ALT key.

Task-number: QTCREATORBUG-6644
Change-Id: I782ddf5cdbfbffd7847497f654efb3391220f1b6
Reviewed-by: hjk <qthjk@ovi.com>
2011-12-08 13:59:09 +01:00
Leandro Melo
67ab31c224 Editor: Bookmark when Shift-clicking the gutter
Task-number: QTCREATORBUG-2852

Change-Id: If539f812bce76c1c1e7b63e7133e2a7c962990ea
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-12-02 11:07:07 +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
Harald Fernengel
f9623b5ad6 Small include header fixes
QtXmlStream classes live in QtCore, not QtXml. Also add a few headers
that are not implicitly included in Qt 5 any more. This greatly eases
transition to Qt 5 which not having any side effects on the Qt 4 build.

Change-Id: I1293ef4360015b885dcea8c4099e8e5b9e254c91
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2011-11-09 14:02:40 +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
Eike Ziller
912cd548c0 Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/madde/maemopackagecreationstep.cpp
	src/plugins/projectexplorer/buildmanager.cpp
	src/plugins/qmljstools/qmljsqtstylecodeformatter.cpp
	src/plugins/qmljstools/qmljsqtstylecodeformatter.h
	tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp

Change-Id: I63ab2ba5dac006c37ccfbae55b023396a4676ff7
2011-11-01 18:16:38 +01:00
Leandro Melo
24fc61857c Editor: Support floating point values for tab stop
Task-number: QTCREATORBUG-833

Change-Id: I76a4b69d6e9402f045a98712531475aff5e8d0ac
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-10-31 14:57:04 +01: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
Nicolas Arnaud-Cormos
635ca2a51a QmlEditor: show the id name when folding a block.
If the id of an element exists, it will be displayed instead of the normal "..."

Change-Id: I4e6633743b0e2ae014b7fbad3c752ef318c73659
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-10-22 21:11:32 +02:00
Robert Loehning
f3753e504f Removed unread variables
Change-Id: Ifd0bec1762d97a957515931408269a153ae136d2
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-10-21 14:09:25 +02:00
Joerg Bornemann
4cb8ec6a32 fix <S-Ins> short cut in text editor
Only <Ins> should switch to overwrite mode.
<S-Ins> is supposed to paste text.

Change-Id: I66dd94d210488312a222a408cddb793451d14580
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-10-18 12:01:10 +02:00
Joerg Bornemann
a10aabc967 overwrite mode support for the text editor
Change-Id: Ibe0b8123429721511ebfde15a604229982fdc5d1
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-10-14 11:02:20 +02:00
Nicolas Arnaud-Cormos
7fc4de0b65 Editors: Add an option to enable/disable the camel case navigation.
The user can change the setting in Option->Text Editor->Behavior.

Reviewer's note: We do have alternative ways to disable camel-case
operations through the shortcuts. Nevertheless, this particular option
has been quite requested since it disables every camel-case based
operation at once. In addition, it seems that the shortcuts are still
not "visible" or "expected" for many users.

Change-Id: I04364760f4b43123fd9e06c0c52ba9e6a5688e2c
Merge-request: 392
Reviewed-on: http://codereview.qt-project.org/6419
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-10-11 11:04:58 +02:00
Christian Kamm
4088fc8241 Find: Increase delay between search highlight updates.
Currently when you type quickly in the current-file find text edit
it may feel slow because the highlights are updated for each keystroke.

This change increases the minimal delay between highlight updates from
10 ms to 50 ms. That means the delay is still barely noticeable, but
changing the search text stops feeling sluggish.

Change-Id: I41cf2a3282bdbd81afb6f6afb84d52fca16dd184
Reviewed-on: http://codereview.qt-project.org/5876
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-30 13:47:30 +02:00
Leandro Melo
d8dedb439c Editor: Keyboard option for overriding delete word's start/end
Regular and camel-case version.

Task-number: QTCREATORBUG-5160
Change-Id: I749fbc4c768d4f11fb741fd1b9d00ddee56eb965
Reviewed-on: http://codereview.qt-project.org/5537
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-09-26 15:10:39 +02:00
Jarek Kobus
2244911826 Implement Code Style schemes
Task-number: QTCREATORBUG-5092

Change-Id: I218cef02f7c242e4dfae59b1b8021ea618e60d07
Reviewed-on: http://codereview.qt-project.org/5160
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-23 10:23:15 +02:00
Leandro Melo
a298a0c306 Editor: Unindent backpace mode should not apply for parag. separators
QChar:isSpace also includes paragraph separator, for which the backspace
behavior should be the normal one.

Change-Id: I80c362a4e11b436259f85fea4c73de874fc64249
Reviewed-on: http://codereview.qt-project.org/5389
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-09-22 15:57:23 +02:00
Leandro Melo
fa281be8bf Editor: New option for surrounding auto brackets
Notice that this option already existed in the auto completer. However,
from the user perspective it was synchronized with auto insert brackets.

Task-number: QTCREATORBUG-5835
Change-Id: Ia87a2ca38d89dba51380a4fdb58a5a3689ed9265
Reviewed-on: http://codereview.qt-project.org/4885
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-09-14 12:29:31 +02:00
hjk
488330255d core: rename uniqueidmanager.{cpp,h} as the class UniqueIdManager is gone
Change-Id: Iffe04bc3bb0103cbac605f0734bbfd66eb7fd854
Reviewed-on: http://codereview.qt.nokia.com/4215
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-09-05 18:04:55 +02:00
Friedemann Kleint
bd5a1a9bce Extract Core::TextFile from TextEditor::BaseTextDocument.
Use it in BaseTextEditor and Designer to preserve CRLF
of the files.

Task-number: QTCREATORBUG-5901
Change-Id: I7599ce78649a3b09f2e5118d02f8cbf3db27ed31
Reviewed-on: http://codereview.qt.nokia.com/3591
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-08-26 08:23:16 +02:00