Commit Graph

501 Commits

Author SHA1 Message Date
Mitch Curtis
e237057827 Make insertLineAbove behaviour consistent when at top of document.
Currently, pressing Ctrl+Shift+Enter to insert a line above the current
line does not work consistently when the current line is the first in
the document. For example, if the cursor (|) is not on the first line:

1. #include <QDebug>
2.|#include <QTest>

becomes

1. #include <QDebug>
2.|
3. #include <QTest>

after Ctrl+Shift+Enter. When the cursor is on the first line, however:

1.|#include <QDebug>
2. #include <QTest>

becomes

1. #include <QDebug>
2.|
3. #include <QTest>

after Ctrl+Shift+Enter. This patch corrects the above result:

1. |
2. #include <QDebug>
3. #include <QTest>

This is also in line with Eclipse's behaviour, for example.

Change-Id: I542050b6090ed0cfdf613bf67bbd2651eb99ec9d
Reviewed-by: David Schulz <david.schulz@digia.com>
2012-11-26 15:23:55 +01:00
Orgad Shaneh
65942d2d8d TextEditor: Compile with QT_NO_CAST_FROM_ASCII
Change-Id: If913f595de78dc8bc4eff1a5c3ad7fe8d5a623ae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2012-11-26 13:29:33 +01:00
Orgad Shaneh
7fa69afa6c Use Core::Id for language
Change-Id: I0077558e9e2cf5aa06ac921cb45224e29aa85c9b
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-22 08:32:44 +01:00
Marcel Krems
e440ec8a62 BaseTextEditor: Fixed dragging of ITextMarks.
Only start dragging, when a draggable marker was clicked.
Reset drag after releasing mouse button.

Change-Id: I2dc275fc108b55d84b9ff5c69847b116c3307c41
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-16 10:50:57 +01:00
David Schulz
5aa0412b8e Editor: Fix highlighting issue after code unfold.
Task-number: QTCREATORBUG-8232

Change-Id: I2595855bb7efe669e3c48a16ab162ace54f7015a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2012-11-12 15:22:05 +01:00
David Schulz
f224c68b32 Editor: Fix animate matching parenthesis in folded code
Task-number: QTCREATORBUG-5877

Change-Id: I1012a1f8d8f925ed1a002d457b856df103e9f703
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2012-11-12 15:21:45 +01:00
Orgad Shaneh
10be8c9a48 InfoBar: Use Core::Id
Change-Id: I0918fbc20027a340facbedc685938a72d117d53b
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-09 15:34:50 +01:00
Christian Kandeler
e64543aa61 TextEditor: Remove unneeded ifdefs.
Change-Id: I21b508b4fc911296aee1c077445c7d6c1e765c20
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-06 16:16:10 +01:00
hjk
2a5d883424 texteditor: handle higher prioritized markers first
Change-Id: Id526f7544db89fae9c15afa0605ab9b0ecdcaf8e
Reviewed-by: David Schulz <david.schulz@digia.com>
2012-10-22 09:08:07 +02:00
Vasiliy Sorokin
6a90a1a740 Add Highlight Matching Parentheses setting
Task-number: QTCREATORBUG-8008

Change-Id: If1989eb850e82636c735a319bc7c4950a01dd33c
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2012-10-18 11:05:05 +02:00
hjk
381a60b7db BaseTextEditor: make ITextMarks draggable
Change-Id: I36fd6d49ec99975d059f201aa23db11dd80e4ad6
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-10-11 17:41:21 +02:00
hjk
2e361d20ab TextEditor: adjust ITextMark getters to coding style
bool getters should have an 'is' prefix.

Change-Id: I6d8b0a680e7985fa454b5e7df1b85ace6da264e6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-10 12:17:12 +02:00
Lukas Holecek
f5f04eac92 Editor: Open parent folds recursively until cursor is visible
Fixes case when cursor jumps on hidden line in folded block which is in
another folded block. All parent folded blocks will be unfolded until
cursor is visible.

Change-Id: I3d41542506d9f40cb9e75d1b2818bc5767384d93
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-09 23:57:14 +02:00
Eike Ziller
086dd684ab Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/coreplugin/fileiconprovider.cpp
	src/plugins/cppeditor/cppplugin.cpp
	tests/auto/qml/qmldesigner/coretests/coretests.pro

Change-Id: I0e83becf661ded9316ce6766786c9ef4c2f897a7
2012-10-09 14:27:29 +02:00
Friedemann Kleint
7e33227146 Replace remaining Q_WS_WIN by Q_OS_WIN.
Task-number: QTCREATORBUG-72
Change-Id: I36f532ebd61472cd6e3d8e63decc96613cc7fab4
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-09 12:36:57 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02: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
Vasiliy Sorokin
d47b058c9b Added feature for change note for bookmarks.
Task-number: QTCREATORBUG-5572

Change-Id: I12e84928e1c9d2b212991fafa7de99e0ec618d70
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-10-01 21:08:27 +02:00
Eike Ziller
6faede0860 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h
	share/qtcreator/qml/qmlpuppet/commands/tokencommand.h
	share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/componentnodeinstance.h
	share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceclientproxy.cpp
	src/plugins/git/gitsettings.cpp
	tests/manual/ssh/remoteprocess/remoteprocesstest.h

Change-Id: I00c294e6d911d272615e65fed58562399af97a4e
2012-09-27 20:38:57 +02:00
David Schulz
b1bb59aeff Editor: Fix autocompletion under Qt5
Change-Id: Id8ce9ebe53823abe211e43c7c44ec19a24ed63f5
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-09-27 12:23:50 +02:00
Lukas Holecek
5442e745e7 Highlight matching parentheses under text cursor
In replace mode highlight parentheses that are right under the block
cursor.

Change-Id: I6cef5fe302b0797c66ed9541d28ec495fb1db1d1
Reviewed-by: David Schulz <david.schulz@digia.com>
2012-09-27 09:57:23 +02:00
Lukas Holecek
f750bba667 Fix block text cursor visibility on extra selections
Change-Id: Ica1307863ebaf713cf07a4fdce2623b1d20344c3
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-27 09:41:28 +02:00
Eike Ziller
b947861c59 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.qbp
	src/libs/QtcLibrary.qbs
	src/plugins/QtcPlugin.qbs
	src/tools/QtcTool.qbs

Change-Id: I3acea26888febe8f96d2131932266ed88b9f55f5
2012-09-19 18:02:46 +02:00
David Schulz
71c2f2810e Editor: correct background color for matching parentheses
Task-number: QTCREATORBUG-512

Change-Id: I09a52bcf98e0f2c0bc2e68df4821f94714873580
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2012-09-18 15:50:21 +02:00
David Schulz
00a412f716 Editor: Fix leaving block caret.
After switching from "Overwrite" to "Normal" mode using the Insert-key.

Task-number: QTCREATORBUG-6831

Change-Id: I5507c91318af1f2d2244e9ca978ef9badfd8c2b0
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
2012-09-17 15:41:15 +02:00
Christian Kandeler
405217c111 Utils::HostOsInfo: Introduce controlModifier() method.
Change-Id: Ibd244963c5cd643fc0e8358ceabff0ad5f6599eb
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-13 10:14:53 +02:00
Daniel Teske
4083c11002 Optimize painting after changing marks
Change-Id: Ib9e225bc063df82fcb351ff1e2572aa2d663b8a7
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-11 15:45:55 +02:00
Eike Ziller
5ac721dd58 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.pri
	qtcreator.qbp
	src/libs/utils/utils.pro

Change-Id: I6f0aba746f915d8c51dcf9372f7d9f593562fc2b
2012-09-11 14:02:03 +02:00
Friedemann Kleint
2c3fe560b9 tr()-Fixes: Fix spelling errors in text editor settings.
"Occurrences", "parentheses", "applied to".

Change-Id: I48d3d4e6c10e29888f4f2ee6dfbe02b0b0c5646b
Reviewed-by: David Schulz <david.schulz@nokia.com>
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-09-05 15:29:51 +02:00
Eike Ziller
887456e38a Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemoglobal.cpp
	src/plugins/madde/maemoinstalltosysrootstep.cpp
	src/plugins/madde/maemopublisherfremantlefree.cpp
	src/plugins/madde/qt4maemodeployconfiguration.cpp
	src/plugins/qt4projectmanager/librarydetailscontroller.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qt4projectmanager/qt4project.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	src/plugins/remotelinux/abstractremotelinuxdeployservice.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp
	src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
	src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp

Change-Id: I2560b528596f284e7b45a2260d8d3037891c5d17
2012-09-04 18:04:16 +02:00
Christian Stenger
f3e92100cb Editor: Fix transformSelection() for block selection
Task-number: QTCREATORBUG-7643

Change-Id: I26f9a3637a39a26e82b72de1143e31b5e55b076e
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-09-03 10:10:36 +02:00
Christian Kandeler
e669f05406 Utils: Introduce HostOsInfo class.
The class' member functions are intended to be used
instead of the Q_OS_* macros in all contexts where
the latter are not syntactically required.
This lowers the likelihood of changes made on one
platform breaking the build on another, e.g. due to
the code model missing symbols in #ifdef'ed out code
when refactoring.

Change-Id: I4a54788591b4c8f8d589b8368a6c683d4155c9fa
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-27 17:00:03 +02:00
Konstantin Tokarev
b0da247604 Unified contextMenuEvent implementations of editor widgets.
Change-Id: Ie5dbde8d0443a65a8e96853002c8bdafd2c0d729
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-07-30 10:21:42 +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
Francois Ferrand
6defb83d03 TextEditor: menu for pasting from clipboard history.
Add new action to show a menu of recent clipboard history. When an item
is selected, the item is pasted.

Change-Id: Id7e1a90730404fb63762bf1f20678484ec34cd2b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-06-05 12:08:00 +02:00
Eike Ziller
3934347fe9 ActionManager API cleanup.
d-pointer instead of inheritance
static methods

Change-Id: I7b2f0c8b05ad3951e1ff26a7d4e08e195d2dd258
Reviewed-by: hjk <qthjk@ovi.com>
2012-05-25 10:08:24 +02:00
hjk
21bf0046c3 editormanager: simplify use of interface
Less code on the user side, same meaning.

Change-Id: I14e54a5d2ed8e024a51cce74eaf7c8419ad544be
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-05-11 13:51:14 +02:00
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