aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/basetexteditor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* TextEditor: More BaseText* -> Text* renamingshjk2014-09-261-7344/+0
| | | | | | | *Document* and *Layout* classes, all basetext* files Change-Id: I1c6e376733a434fcb5c7f19c6210dfa031eeafde Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Rename {Core,TextEditor},{Base,}TextDocument classeshjk2014-09-251-17/+17
| | | | | | | | | First step of some more 'Base' removal in TextEditor. s/Core::TextDocument/Core::BaseTextDocument/ s/TextEditor::BaseTextDocument/TextEditor::TextDocument/ Change-Id: I71ba325a2f0ad72ec9dae0d96846cbae72d326f7 Reviewed-by: hjk <hjk121@nokiamail.com>
* TextEditor: Draw background first.hjk2014-09-241-16/+21
| | | | | | | Task-number: QTCREATORBUG-13028 Change-Id: I14ae1794c920b3877f9eca468e1180042b51fb3f Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com> Reviewed-by: David Schulz <david.schulz@digia.com>
* BaseTextEditor: Remove duplicate static functionsTobias Hunger2014-09-241-10/+0
| | | | | Change-Id: Ic2a82e109418162ecb62a05ac63daade710d111f Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Merge remote-tracking branch 'origin/3.2'Eike Ziller2014-09-231-0/+10
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: qtcreator.pri qtcreator.qbs src/plugins/cpptools/cppmodelmanager.cpp src/plugins/texteditor/basetexteditor.cpp src/plugins/texteditor/basetexteditor.h Change-Id: I556a7661872b90b329a46694e335e18cddc28677
| * Make compile with Qt 5.4Kevin Funk2014-09-221-4/+14
| | | | | | | | | | | | | | | | Partial backport of 5da75dba065df3a16d2c58fcd89027750b34f12f Change-Id: I5d0964818934a2a0fc57c97b229469fd5a6c8131 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Only use tooltipOverrideRequested in *Widgethjk2014-09-191-6/+1
| | | | | | | | | | | | | | One signal less, one connection less, less indirection in user code. Change-Id: Ie49d4a76982f2ff9d2b307ed541c33c6a7ea6480 Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Setting flags once is enough...hjk2014-09-181-1/+0
| | | | | | | | | | Change-Id: I671d1b0866f2e6ef332a53228bc12b260ba6187d Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Make sure "global" connections are properly destroyedhjk2014-09-181-8/+11
| | | | | | | | | | | | | | Task-number: QTCREATORBUG-13054 Change-Id: I32234836dc893075978dbc5fe43d696bc0f228f4 Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* | Merge remote-tracking branch 'origin/3.2'Eike Ziller2014-09-161-19/+20
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/qmldesigner/designercore/model/plaintexteditmodifier.cpp src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp Change-Id: I1627f6aa98a442413f8b08b579ecaf9647dc887b
| * Editor: Draw column wrap line after drawing ifdef blocksVicken Simonian2014-09-041-19/+20
| | | | | | | | | | | | Task-number: QTCREATORBUG-12940 Change-Id: I431176c1879236bc107a2c1db11890da5d75f750 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
| * Fix extraSelections callAndreas Holzammer2014-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | extraSelections is a local variable as well as a member function of BaseTextEditorWidget, but if the full qualified name is used the compiler thinks that this is a static function call, which happens with the MSVC 2010. Use the this pointer to use the correct function. Change-Id: I44ce96b2c17e7259274f2103ce70ae9b2ae3a56b Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Prevent overwriting of completion settingshjk2014-09-111-3/+5
| | | | | | | | | | | | | | | | | | This was a regression introduced during the editor setup refactoring. Task-number: QTCREATORBUG-12982 Change-Id: I7b26b4105dfb50357dd2cf97d07153031d0b2dc0 Reviewed-by: Campbell Barton <ideasman42@gmail.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Merge some "assist" related classeshjk2014-09-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Simplifies the code base by removing one level of unused and unneeded abstraction. - Merge {I,Default}AssistInterface to AssistInterface - Merge {IAssist,Basic}ProposalItem to AssistProposalItem - Merge {IGenericProposal,BasicProposalItemList}Model to GenericProposalModel Change-Id: I54ee7b095427383d67a00fc1d87c3808c21d812d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | TextEditor: Move base of operation from Editor to *Widgethjk2014-09-081-1/+1
| | | | | | | | | | | | | | One less level of indirection Change-Id: I4777bd7d54e572f36a490aeb747a8e0f89599049 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Core: Use std::function for info bar callbackshjk2014-09-041-10/+7
| | | | | | | | | | Change-Id: Iae7cbef053bfe86a7692e09f66af91117815d2a6 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Reset mimetype after open() in all BaseTextEditorshjk2014-09-041-1/+4
| | | | | | | | | | | | | | | | This was already done in all major editors and should not harm all others. Change-Id: I7e19d285c4b85419a9a1f9afa961addecf682eaf Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | TextEditor: Flip default to 'duplicatedSupported'hjk2014-09-031-1/+7
| | | | | | | | | | | | | | opt-out now, for all editors created by BaseTextEditorFactories. Change-Id: I01d0a9ff26320fcd0b84ff90ff22c747cf84b84c Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Move CompletionAssistProvider to *Widgethjk2014-09-031-16/+10
| | | | | | | | | | | | | | All the others live there, too. Change-Id: I0a418bf235343d40a53fbee089234765386ee05d Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Remove some refactoring gluehjk2014-09-031-26/+3
| | | | | | | | | | Change-Id: I2f771b4f944c7f23ad43f780ec98937593e400ea Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Make BaseTextEditor reuse parts of *Widget interfacehjk2014-09-031-11/+41
| | | | | | | | | | Change-Id: Ic93b2e14b22af26abf4a03b32c3ac0c22f88a63a Reviewed-by: hjk <hjk121@nokiamail.com>
* | Debugger: Fix/adjust tooltip handling after editor changeshjk2014-09-021-0/+1
| | | | | | | | | | Change-Id: I67ac61619c13b6cec327e8a27b45e9acfa5905f5 Reviewed-by: hjk <hjk121@nokiamail.com>
* | Editors: Automatically add editor/document id to context and use thatEike Ziller2014-09-021-0/+1
| | | | | | | | | | | | | | instead of manually adding a context everywhere. Change-Id: I4336015a6d19349171a255e949da89b0013d6700 Reviewed-by: hjk <hjk121@nokiamail.com>
* | QmlJSEditor: Remove temporary code assists setup hackhjk2014-09-021-5/+0
| | | | | | | | | | | | | | It's taken care of by the normal factory based setup now. Change-Id: Ia53551740cf5ef2998765ea1003ba8e7f9c30e46 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | BaseTextEditor: Remove internal m_editor back linkhjk2014-09-021-16/+0
| | | | | | | | | | | | | | | | Not used anymore. This also means no fallback editors need to be created anymore. Change-Id: I94a7f7a7038164cfa53dce7f4016628da9395e71 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Use a signal to clear contents help id.hjk2014-09-021-2/+4
| | | | | | | | | | | | | | That's the last user of the internal m_editor back link. Change-Id: I32b6e617428b72dc713147cb542b726cf33b6562 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Remove now unneeded BaseTextEditorWidget::editor()hjk2014-09-021-9/+0
| | | | | | | | | | Change-Id: I5e481fd9c31733d033602d152ec42af6e5a09951 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Introduce a *Widget::activateEditor signalhjk2014-09-021-0/+3
| | | | | | | | | | | | | | | | For communication with the EditorManager without explicitly using the editor() member. Change-Id: I89882201924682111365b28804aed28c967bd442 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | EditorManager: Remove editor parameter of addCurrentPositionToNavigationHistoryhjk2014-09-021-1/+2
| | | | | | | | | | | | | | This only triggered activity if it's the currentEditor(). Change-Id: If9239901c5b30bbb0156e9f6964965cf41db7c16 Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Move comment definitions back to *Widgethjk2014-09-021-24/+19
| | | | | | | | | | | | | | Only used there, and avoids back-links to editors. Change-Id: I81206057ce89d42aef7febb840cf9e44b869df0e Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Use signal/signal connection from *EditorWidget to *Editorhjk2014-09-021-7/+30
| | | | | | | | | | | | | | | | This reduces the need for most of the remaining uses of the editor() back link. Change-Id: I557cf4d3b5e1986f811fb17e87bf1825ac6912c6 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Move cursor position label connectionhjk2014-09-021-8/+7
| | | | | | | | | | | | | | ... to a place where there's no need to call editor() Change-Id: I0fcebcf8b36602bf48373a6b57d8a709cc2a7e81 Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Guard one use of BaseTextEditorPrivate::m_editorhjk2014-09-021-1/+2
| | | | | | | | | | Change-Id: I69f1400419d6764201a0bbce2e4e2da51beb247f Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Prevent double deletion in fallback casehjk2014-08-291-1/+3
| | | | | | | | | | | | | | Introduced in ec5ea375e Change-Id: I246b82c7c8dadaea3374b1b019e7601c5a404fcb Reviewed-by: hjk <hjk121@nokiamail.com>
* | TextEditor: Use more direct approach for fallback IEditor constructionhjk2014-08-291-16/+19
| | | | | | | | | | | | | | | | | | There are still a few places where the EditorWidget is the primary object, or several of them per "visible" IEditor (e.g. Diff). Provide a means to streamline setup there, too. Change-Id: I14cfbd68e555ebc539e707032a0e5bef563e0a36 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Find: Avoid virtual signalshjk2014-08-291-1/+1
| | | | | | | | | | | | | | | | Very unusual construct... Task-number: QTCREATORBUG-12922 Change-Id: Ia7c3a3c2520ed53fdb83d91b50a0a6737f87d4f6 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | {Cpp,Text}Editor: Fix duplicating CppEditorWidgetNikolai Kosjar2014-08-291-1/+3
| | | | | | | | | | | | | | | | Fixes local use highlighting and renaming in new split, among others. Done-with: hjk <hjk121@nokiamail.com> Change-Id: Ic604d37d2dc0082fa4a75c2af457f60d6d6cfa66 Reviewed-by: hjk <hjk121@nokiamail.com>
* | BaseTextEditor: Un-slot most widget actionshjk2014-08-281-5/+5
| | | | | | | | | | Change-Id: Id642fc518d03dad5202e0d7bbb6b8b6325abbbab Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: C++-ify texteditoractionhandlerhjk2014-08-271-4/+5
| | | | | | | | | | | | | | Macros are not necessary here. Change-Id: I19e5c38e64f1b7f254c1fcb33d891e02704e3657 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Introduce some convenience text accessors in the editorhjk2014-08-271-2/+27
| | | | | | | | | | | | | | And adjust users. Change-Id: I9329257cfa5f3298731deb07c2881bc37d9a051d Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Remove parts of old editor creation sequencehjk2014-08-261-42/+3
| | | | | | | | | | | | | | Not used anymore. Change-Id: Iee0f6340097341bd584ae559e3f40f0c1364cba3 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | Editor: Fix one pixel offset for folded block previewDaniel Teske2014-08-261-1/+1
| | | | | | | | | | | | Task-number: QTCREATORBUG-5168 Change-Id: I89a9949227e11053dfa2436ae6b0c017c465906c Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | TextEditor: Re-organize Plain text editor setuphjk2014-08-251-25/+40
| | | | | | | | | | Change-Id: I202e66a9cd295a85e3eea31177280e2c5d409ced Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | CMakeProjectManager: Use a BaseEditorFactory derived classhjk2014-08-251-0/+3
| | | | | | | | | | Change-Id: Ia5f2b789d82c63552ec7abe5ec22bbc29100a59a Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | Android: Use a BaseEditorFactory derived class for JavaEditorhjk2014-08-221-0/+18
| | | | | | | | | | Change-Id: Ifc923177744af5058b22fac7fff2f2345cc99135 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Introduce a BaseTextEditorFactoryhjk2014-08-221-11/+100
| | | | | | | | | | | | | | | | | | | | The BaseTextEditorFactory will keep a collection of all relevant creation functions (document, editor, widget, indenter, syntax highlighter) and will use them to create or duplicate base text editors in a uniform way. Change-Id: I255b519e35cf1c28d5e198242f99316951a0235e Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Add a helper function to set up code assistancehjk2014-08-221-0/+5
| | | | | | | | | | | | | | This is needed for further refactoring in the cpp and qmljs editors. Change-Id: Ic25525e5f468e915226e9daa8d118ff76a749e9f Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Replace in-class connection by virtual functionhjk2014-08-211-1/+1
| | | | | | | | | | Change-Id: Ifb51606f71100223631d086318c230a478d70712 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Remove some needless indirection in BaseTextEditorhjk2014-08-211-13/+9
| | | | | | | | | | Change-Id: Ibb446fce6365a0c52ad74d366f24a202ea9cc33f Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | TextEditor: Fix snippet editor crash introduced in d85a4f615hjk2014-08-211-48/+49
| | | | | | | | | | | | | | | | | | | | The SnippetEditorWidget setup is unusual as it doesn't have an associated SnippetEditorFactory/SnippetEditor creation chain and requires manual intervention. This was lost in the conversion to the new construction scheme. Change-Id: I0919295603432e525c2abd0da762acc8207f996c Reviewed-by: Christian Stenger <christian.stenger@digia.com>