Commit Graph

439 Commits

Author SHA1 Message Date
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
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
a91001d44d BaseTextEditor: Remove stray qDebug.
Change-Id: I544c23aa06d533933162bcc9623ef632981e5053
Reviewed-on: http://codereview.qt.nokia.com/3191
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-08-18 15:36:07 +02:00
Friedemann Kleint
610f77ed33 Header cleanup in TextEditor.
Change-Id: I832d255a4d8f291426d54ad0353641db515a511a
Reviewed-on: http://codereview.qt.nokia.com/3182
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-08-18 14:23:43 +02:00
Leandro Melo
3b0a43802e Editors: Enhance smart backspace behavior
Adds a new smart backspace behavior option. Now it's also possible
to simply unindent (like a backtab). This is particularly useful
when the cursor is not inside an "indentation area" but the user
still wants to go backwards by indent levels when possible (for
example before a comment that appears after the code line). The
option also allows the user to reach a new indent level which has
not been seen so far in previous lines.

The original follows indentation user setting will be lost with this
patch, but we consider this ok for not very "significant" settings.

Change-Id: I49efb6b0309d9b7d7ff2a589413446bc16fb753c
Reviewed-on: http://codereview.qt.nokia.com/3105
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-08-18 10:09:17 +02:00
Christian Kamm
676036a1c8 QmlJS: Allow for more markers than just Qt Quick Toolbar.
Change-Id: Id132b2fd42034a354baa548760083ca47d62697b
Reviewed-on: http://codereview.qt.nokia.com/2904
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-08-15 12:54:38 +02:00
Eike Ziller
99ba300ae3 Merge remote-tracking branch 'origin/2.3'
Conflicts:
	qtcreator.pri
	src/libs/libs.pro
	src/plugins/debugger/watchwindow.cpp
	src/plugins/remotelinux/maemopackagecreationstep.h

Change-Id: Ic67c46256d0060ee9845b92ef82539f6f8fbe639
2011-08-10 16:03:57 +02:00
Eike Ziller
b1c881ceaa Highlight matches when opening editor from advanced text search.
When you close the search pane it will remove the highlight, even if the
find tool bar is open with a different search, though.

Task-number: QTCREATORBUG-2606
Change-Id: I7defe15c844d37ae80ab66c6b9e68e1ef1afdf92
Reviewed-on: http://codereview.qt.nokia.com/2786
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-08-09 15:44:31 +02:00
Jarek Kobus
0c8df0597f Refactor: Get rid of BaseTextEditorWidget from Indenter
Provide directly TabSettings instead.
This will be used for indenting a text for which
there is no editor instance.

Change-Id: Ia5f11a481f42464cf4820efdf2c7c4c32166f55e
Reviewed-on: http://codereview.qt.nokia.com/2622
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-08-05 10:29:41 +02:00
Eike Ziller
bfed87f9c4 Avoid multiple context menus popping up.
On Mac in debug mode, right-clicking on extra text area would first open
the markers menu, and after that the menu where you select which debug
widgets to show (like Stack or Locals and Expressions).
Opening the markers menu in a context menu event on the extra area is
both the more sensible thing to do, and works around the Mac
inconsistency.

Task-number: QTCREATORBUG-4699
Change-Id: I38efaffac80a98773deeeada3d0e3ef4f872c03b
Reviewed-on: http://codereview.qt.nokia.com/2434
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-08-01 13:27:49 +02:00
Leandro Melo
d89e2e14f1 Editors: Introduce option to constrain tooltips
It's now possible to have tooltips popup only when the Shift key is down.
This has been requested quite a lot.

Task-number: QTCREATORBUG-5282
Change-Id: Ibc8568737fecbeff981ba97d9f155a70f6072413
Reviewed-on: http://codereview.qt.nokia.com/1881
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
2011-07-20 15:46:18 +02:00
Christian Kamm
1dfd78a9c8 Indenters: Fix dangling pointer when project settings are deleted.
Task-number: QTCREATORBUG-5390
Change-Id: I68517955a86fbb2ded53f6235a7fe27793e2b2c8
Reviewed-on: http://codereview.qt.nokia.com/1481
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2011-07-12 11:50:53 +02:00
Thorbjørn Lindeijer
405a16292f Extend the editor sidebar background to the folding markers
Previously, there was a gab between the text and the sidebar which
contained the folding markers. This is disturbing for some users.

Change-Id: Ib3c90d9cb01de533d16049bc1a0f5f10f1f7847a
Task-number: QTCREATORBUG-2915
Reviewed-on: http://codereview.qt.nokia.com/355
Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
2011-06-21 13:09:52 +02:00
Leandro Melo
8e84872ace Documentation: Code assist API
Change-Id: Id703725708823edc24171f7c1b28befe99032d63
Reviewed-on: http://codereview.qt.nokia.com/154
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-05-27 08:44:13 +02:00
Christian Kamm
779fafcbfe Make C++ code style configurable.
Change-Id: Iaf08edb2361146e6b5e1cbafdb716a23c938875b
Done-with: Jarek Kobus
Task-number: QTCREATORBUG-2670
Task-number: QTCREATORBUG-4310
Task-number: QTCREATORBUG-2763
Task-number: QTCREATORBUG-3623
Task-number: QTCREATORBUG-567
Reviewed-on: http://codereview.qt.nokia.com/74
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-05-24 12:45:07 +02:00
Leandro Melo
2b2b5aec23 Editor: Removing comments
They are not really necessary. This workaround is used in quite a few
places. Also, the commit message which introduces them
(230445996816eafaa43e40341f382bf63d9d73a8) is already explanatory.

Change-Id: Idb94ab77b47008e7867b9fba21843778aeaaebb7
Reviewed-on: http://codereview.qt.nokia.com/72
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-05-23 16:22:33 +02:00
Christian Hoenig
10dd9c9a8c Workaround to fix cursor movements with invisible cursor
Task-number: QTCREATORBUG-4957
Change-Id: I730550b4d558a2d7fbe34a4052b6cfc5e27fe6e5
Reviewed-on: http://codereview.qt.nokia.com/71
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-05-23 16:16:15 +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
Oswald Buddenhagen
9ac137fb06 add auto-saving of modified editors
Task-number: QTCREATORBUG-2847
2011-05-12 20:10:03 +02:00
Oswald Buddenhagen
882e34ee28 rewrite editor info bar handling
the info about the bars is now stored in the IFile, not in the
EditorView. this is somewhat more expensive for the bars which
identically apply to all editors of one type, but fixes consistency
issues between views.

additionally, it is now possible to set several simultaneous
info bars per file, which ensures that no information is lost.

Co-authored-by: mae
2011-05-12 20:10:02 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
con
14487af86c Merge remote branch 'origin/2.2'
Conflicts:
	src/plugins/projectexplorer/gcctoolchain.cpp
	src/plugins/projectexplorer/target.cpp
	src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
2011-04-27 11:27:29 +02:00
con
a130ebf413 Debug views menu would show after using the text marker menu.
The right-click event that is handled by the extra text area for the
marker menu needs to be accepted, so it's not propagated further as a
context menu event.

Reviewed-by: Friedemann Kleint
2011-04-27 09:25:16 +02:00
Oswald Buddenhagen
fae7dc9584 add errorString output argument to IFile::reload() & IEditor::open()
add/unify read error handling in all affected classes
2011-04-18 14:10:13 +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
70d392d235 core: make context and widget IContext data members 2011-04-14 11:15:07 +02:00