aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/textmark.cpp
Commit message (Collapse)AuthorAgeFilesLines
* TextEditor: Add a mechanism to provide dynamic icons and tooltipshjk2020-09-241-6/+41
| | | | | | | | ... to TextMarks more easily by allowing callbacks in addition to fixed values. Change-Id: Ica9e7d54dd1a53a59dc11812857402d0b7594d6c Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: Calculate annotation color based on editor color schemeDavid Schulz2020-09-161-1/+5
| | | | | | | | Amends 9182d4eda75033bbbebf50e87e518adc33d499f6 Fixes: QTCREATORBUG-24644 Change-Id: Id34bfbc4ea3d1102835c7c1cf3afa1580dff01d8 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Editor: Use optional for text mark colorDavid Schulz2020-01-071-5/+4
| | | | | | | instead of an additional hasColor member Change-Id: I658401bb91374b10420e070625cf61049cb3cc64 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* TextEditor: more FileName -> FilePath renamingDavid Schulz2019-10-011-1/+1
| | | | | Change-Id: Ia61868806db47561e7bf7ae9b3cfb1e62a085a7a Reviewed-by: hjk <hjk@qt.io>
* Avoid warning on empty expressionshjk2019-07-231-1/+1
| | | | | | | | For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-8/+8
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-02-191-0/+3
|\ | | | | | | Change-Id: I7bdb6a4658c5fca1a7e1dda5adbb5613dabc6d18
| * TextEditor: Add more space before TextMarks' tooltip actionsNikolai Kosjar2019-02-151-0/+3
| | | | | | | | | | Change-Id: I6331d60026da865f29c5ed2455f2399414f99900 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Fix Qt 5.13 deprecation warning about QFontMetrics::width()Friedemann Kleint2019-02-151-1/+1
|/ | | | | | | | | Replace by QFontMetrics::horizontalAdvance(), fixing: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] Change-Id: I9991ffefe6e87e872dc35ba291d562e06b28ca64 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* move text document for file path convenience functionDavid Schulz2019-02-141-5/+2
| | | | | | | | Move it from language client utils to a static function inside the text document. Change-Id: I91bc72d0e978c1d843082e12bb8a0fa60a1bbc5e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clang: Add tooltip action to copy to clipboardNikolai Kosjar2019-02-011-7/+42
| | | | | | | | | | | | | ...as selecting text in the tooltip was difficult and eventually got disabled due to other problems - see d58c0a9ac8123fd81c335b322defbbb567de840d. This adds support for actions in TextMarks. They are displayed as QToolButtons in a dedicated column in the tooltip. Change-Id: I84ee3c3e4af573a80953786881d1333b00e4200c Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Support hyperlinks in TextMark tooltipOrgad Shaneh2018-10-081-0/+1
| | | | | Change-Id: I3fa4470fb06469286901025c350d636fcdd9410a Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: ModernizeOrgad Shaneh2018-09-201-3/+3
| | | | | | | override, auto, nullptr, member initializers. Change-Id: I04c6ebb683849568973bd7782fb5a3279267141e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use FileName in TextMarkEike Ziller2018-05-031-8/+9
| | | | | Change-Id: I3666d95dc8ef3b7da099d6d30f5cb4678a349493 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: reduce annotation painting artifactsDavid Schulz2017-10-091-3/+6
| | | | | | | | | | Request an update covering the complete annotation rectangle if it is not part of the event rectangle and Correctly calculate the position for the gradients. Task-number: QTCREATORBUG-18855 Change-Id: I68b61459e6fd94949baebba25f965226f9d5e441 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-07-251-23/+44
|\ | | | | | | | | | | | | Conflicts: qtcreator.pri Change-Id: If5f4a9821a23ac0df81eb84b3980f9cf7ecd70ba
| * TextEditor: Make annotation position configurableDavid Schulz2017-07-211-23/+44
| | | | | | | | | | | | Change-Id: Ib59c9770390523e1863ac507ce43512ba679c591 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-07-211-17/+16
|\| | | | | | | Change-Id: I02e54f45d233b89ddaee9c87da9b9af2a56374b8
| * TextEditor: Avoid removing text marks that were not added to hashOrgad Shaneh2017-07-211-1/+2
| | | | | | | | | | | | | | TextMarks with empty file names are not added, no reason to remove them. Change-Id: I8647deaa1136294d2f7c3c63337d967afea675c2 Reviewed-by: David Schulz <david.schulz@qt.io>
| * TextEditor: Improve readability of text annotationDavid Schulz2017-07-201-16/+14
| | | | | | | | | | Change-Id: Iddcf6951b44a73cd3e9d740d9aba725fa4d7d663 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | TextEditor: Initialize some membersTobias Hunger2017-07-201-1/+1
|/ | | | | | | Coverity was complaining about these, in some places even rightly so:-) Change-Id: Ia85cdd2c74f05edba6f0d4534aa9f2ee2a750595 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: Simplify annotation rectangle computationDavid Schulz2017-07-181-20/+30
| | | | | Change-Id: Ie04f545d24696d66645c367b2c25d643c3691908 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* TextEditor: Add line annotationsDavid Schulz2017-06-301-3/+87
| | | | | | | | Displaying short descriptive text of a TextMark at line end. Currently implemented for ClangTextMark and BookMark. Change-Id: Idc6b579bda0382ad94b2e236b715696396b10460 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* TextEditor: Fix updating TextMark priorityDavid Schulz2017-06-271-2/+7
| | | | | | Change-Id: Ie88b75507faf1f467b4e044f2b06e25aae32bdcf Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Editor: Simplify text marksDavid Schulz2017-06-221-105/+12
| | | | | | | | | Moving defaultToolTip and color from TextMarkRegistry to TextMark. Allowing every instance of a TextMark object to define these information. Change-Id: Iec1794372cf902b34d343402074e3999e7f9faf7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Simplify TextMarkRegistryDavid Schulz2017-05-301-18/+52
| | | | | | | | The registry is an implementation detail and doesn't need to be exported so move it to the textmark.cpp file. Change-Id: Ic103b122cb20063fa4bc220bdc90cecff27054aa Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* TextEditor: Set widthFactor from TextMark ctorUlf Hermann2017-03-161-2/+2
| | | | | | | | | | The text marks are added to the document from their ctor. The document then uses the widthFactor to calculate the space needed for them. If the widthFactor is only set afterwards, the calculated space is wrong. Change-Id: Ic7d24f99cc78d1bf084b2b1cfdf6b955496072f3 Task-number: QTCREATORBUG-17833 Reviewed-by: hjk <hjk@qt.io>
* Use icons and default tool tips in text mark popupDavid Schulz2016-09-061-4/+36
| | | | | Change-Id: I4487d642e066479e8e344ed77e539de92fbca651 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Merge remote-tracking branch 'origin/4.1'Eike Ziller2016-08-311-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/qmakeprojectmanager/makestep.cpp src/shared/qbs Change-Id: If1787ed23afa786ed2cef57f53c1db642559cbe0
| * Editor: Use correct pointer in guardDavid Schulz2016-08-251-1/+1
| | | | | | | | | | | | Task-number: QTCREATORBUG-16253 Change-Id: Ie046af69c37784c1a42cc693971b42baaef2f6ff Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | TextEditor: Remove unnecessary hash lookupDavid Schulz2016-08-221-3/+4
| | | | | | | | | | Change-Id: I50b80ad43c7a4dc56207497e948993946d977101 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Add default tool tips to text marksDavid Schulz2016-08-221-0/+18
|/ | | | | | | | | The default tool tip should describe the general purpose of the mark which is displayed in the UI when no tool tip is explicitly set for the text mark. Change-Id: I27aff26cf0f3458d454428e805a9b323191dc393 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: Use full tooltip in ClangTextMarkhjk2016-07-251-0/+8
| | | | | Change-Id: I39cc64acbdbcd5e5156e1514acaf9674a91e81a4 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* TextEditor: Enable tooltips for textmarkshjk2016-07-191-14/+9
| | | | | | | | Adjust bookmark code, add tooltips for clang diagnostics. Change-Id: I489d499f5431fcb29f27611d4350298acb30baac Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* TextEditor: Use Qt5-style connectsOrgad Shaneh2015-12-181-6/+6
| | | | | | | The heavy lifting was done by clazy. Change-Id: I380120e3419d2a3c0e272f51cc3e0d5f6aaa5e9b Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* TextEditor: Move constructor has now noexceptMarco Bubke2015-09-011-1/+1
| | | | | | | | | Otherwise the copy constructor will be used too and we get an error because it is private. Change-Id: Ibfe70939ebe34fa9a524b9844a20d962eb09bd97 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* Clang: Add diagnosticsMarco Bubke2015-08-311-0/+14
| | | | | | | | Diagnostics are now moved to the clang backend process. Fixits are supported too. Change-Id: I20faacf466bbf78dec479220c3d7b336a47bc453 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Editor: Add Check for TextMark color definition.David Schulz2015-06-031-0/+10
| | | | | | Change-Id: I805402a5ec9595bd31b6d72c5934198c77a1f402 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Theme: Remove InvalidColorOrgad Shaneh2015-05-251-1/+1
| | | | | | | | | It's not defined anyway. Use ProjectExplorer_TaskWarn_TextMarkColor as default text mark color. Change-Id: I1c7f76f0a6dc83338798cdd7450e1468e8ce39a7 Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* TextEditor: Sort text marks in categories.David Schulz2015-05-211-1/+29
| | | | | | | | Also adding a color for each category. Change-Id: I3627d13913951a95804b5a816f087a822c01bd86 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'Eike Ziller2015-02-121-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/tooltip/tipcontents.cpp src/libs/utils/tooltip/tipcontents.h src/plugins/android/androiddeployqtstep.cpp src/plugins/baremetal/baremetalconstants.h src/plugins/baremetal/baremetaldevice.cpp src/plugins/baremetal/baremetaldevice.h src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp src/plugins/baremetal/baremetaldeviceconfigurationwidget.h src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h src/plugins/baremetal/baremetalplugin.cpp src/plugins/baremetal/baremetalplugin.h src/plugins/baremetal/baremetalruncontrolfactory.cpp src/plugins/baremetal/baremetalruncontrolfactory.h src/plugins/cppeditor/cppcodemodelinspectordialog.cpp src/plugins/cppeditor/cppdoxygen_test.cpp src/plugins/cppeditor/cppdoxygen_test.h src/plugins/debugger/breakpointmarker.cpp src/plugins/debugger/debuggeritemmodel.cpp src/plugins/debugger/debuggeritemmodel.h src/plugins/debugger/loadcoredialog.cpp src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp src/plugins/projectexplorer/addnewmodel.cpp src/plugins/projectexplorer/addnewmodel.h src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp src/plugins/qmlprofiler/abstracttimelinemodel.cpp src/plugins/qmlprofiler/abstracttimelinemodel.h src/plugins/qmlprofiler/notesmodel.cpp src/plugins/qmlprofiler/qml/CategoryLabel.qml src/plugins/qmlprofiler/qml/MainView.qml src/plugins/qmlprofiler/qml/Overview.js src/plugins/qmlprofiler/qml/Overview.qml src/plugins/qmlprofiler/qml/TimeDisplay.qml src/plugins/qmlprofiler/qml/TimeMarks.qml src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp src/plugins/qmlprofiler/sortedtimelinemodel.cpp src/plugins/qmlprofiler/sortedtimelinemodel.h src/plugins/qmlprofiler/timelinemodelaggregator.cpp src/plugins/qmlprofiler/timelinemodelaggregator.h src/plugins/qmlprofiler/timelinerenderer.cpp src/plugins/qmlprofiler/timelinerenderer.h src/plugins/qmlprojectmanager/QmlProjectManager.json.in src/plugins/texteditor/findinfiles.cpp src/plugins/vcsbase/vcsconfigurationpage.cpp src/shared/qbs src/shared/scriptwrapper/interface_wrap_helpers.h src/shared/scriptwrapper/wrap_helpers.h tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp tests/system/suite_debugger/tst_debug_empty_main/test.py tests/system/suite_debugger/tst_qml_js_console/test.py tests/system/suite_debugger/tst_qml_locals/test.py Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
| * Update LicenseEike Ziller2015-01-161-6/+6
| | | | | | | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | TextEditor: Remove unneeded qualificationsOrgad Shaneh2015-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly done using the following ruby script: Dir.glob('**/*.cpp').each { |file| next if file =~ %r{src/shared/qbs|/qmljs/} s = File.read(file) s.scan(/^using namespace (.*);$/) { ns = $1 t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m| before = $1 char = $2 if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/ m else before + char end } if t != s puts file File.open(file, 'w').write(t) end } } Change-Id: Ief087658e2adc337ee02c49f0fb406597114df07 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
* | Core: Use FileName for file path in IDocumentOrgad Shaneh2015-01-121-2/+2
|/ | | | | Change-Id: I85f7398aee59d0d36f0e5c3bf88ff3c96002e394 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* License update.Eike Ziller2014-10-151-7/+8
| | | | | Change-Id: I0acde2c3b995693de682679471f03af85bdd0a61 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* TextEditor: More BaseText* -> Text* renamingshjk2014-09-261-2/+2
| | | | | | | *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-5/+5
| | | | | | | | | 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: Remove itexteditor.{h,cpp}hjk2014-07-251-2/+1
| | | | | | | Move the remaining contents to more appropriate places. Change-Id: I55eed5c572bd33dafe2187523d9aa381c211fdd6 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Merge ITextMark and BaseTextMarkhjk2014-07-231-0/+262
Turns out we don't even need two-phase initialization, by transparently postponing registration until we get a non-empty file name, either at constuction, or at file name change times. Change-Id: I3e87e47c820066e6707e946fc474ab9c1993e61f Reviewed-by: Eike Ziller <eike.ziller@digia.com>