summaryrefslogtreecommitdiff
path: root/src/plugins/glsleditor
Commit message (Collapse)AuthorAgeFilesLines
* Clang: Use clang-format for indentationIvan Donchevskii2018-09-122-2/+4
| | | | | | | | | | | | | | | | | | | This is the new experimental plugin based on LibFormat. It replaces the default indenter for CppEditorDocument and applies clang-format after the CR or the set of 'electric' characters. Uses the global .clang-format kept in QtC settings or the one for current project. Both can be configured. For indentation some style modifications and code manipulations are done to prevent line shrinking when it's not expected. Manual indentation uses unmodified style from .clang-format file. Change-Id: I6279b805e418e1804b553efa615f5c843f395a58 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Utils: move code model icons to utilsDavid Schulz2018-08-061-6/+6
| | | | | | | In preperation for the language server protocol support. Change-Id: Iee4ccd53a86d9afdb357972ea62b75ace2edcb1d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Prefer using 'override' instead of 'virtual'Alessandro Portale2018-07-111-1/+1
| | | | | | | | warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] Change-Id: I6dac7a62b627fa1353b4455e1af92f869c2571cc Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* Fix that bookmarks couldn't be added to .pro files with mouseEike Ziller2018-06-191-1/+0
| | | | | | | | | | | The area with the marks was not showing up. This patch reverses the logic for showing the marks area to opt-out. Almost all editors were opting in for it already. The AndroidManifest editor, VCS base editor, and widget designer text editor opt out now. Task-number: QTCREATORBUG-20339 Change-Id: Iccb6d0256618f7ef70e8921847ce2fd46fd660c0 Reviewed-by: David Schulz <david.schulz@qt.io>
* GlslEditor: Fix crash in function hint proposalChristian Stenger2018-06-081-6/+45
| | | | | | | | | | | | | | | | | | | The function hint proposal gets filled with pointers it does not own. It does not notice when these pointers will get deleted or modified, but as long the hint is displayed it tries to access them. If the document gets modified and the gls parser tries to update the document's AST these pointers might vanish. Only use the needed information on the proposal's side to avoid null pointer access. Trade off: updating the proposal hint of declarations and definitions when document changes does not work on the fly Task-number: QTCREATORBUG-20570 Change-Id: I20253e92e1ca9822b1fc1f327c5c5e16b4fd91be Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CodeAssist: use shared pointer to pass around proposal modelsDavid Schulz2018-02-271-1/+1
| | | | | | Task-number: QTCREATORBUG-17752 Change-Id: Ia41f169b86ead209830e6f15764062389ced2b67 Reviewed-by: hjk <hjk@qt.io>
* Glsl: Avoid use of global object poolhjk2018-02-093-122/+77
| | | | | | | Also, use the opportunity to re-organize and clean up a bit. Change-Id: I09d5635f48d98b450ffd1eb1a0e003a288cf6804 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix copyright year in plugin info, --version, and macOS infoEike Ziller2017-08-241-1/+1
| | | | | | | | By using the new QTCREATOR_COPYRIGHT_YEAR variable Task-number: QTCREATORBUG-18612 Change-Id: I3bcf0319660d210436d3130c00f43325c460a66c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Plugins: Fix that mimetype definition was not valid JSONEike Ziller2017-07-251-37/+37
| | | | | | | | | | | | | JSON officially does not support multiline strings, so we should use the same mechanism that we already use for the plugin description (i.e. additionally support arrays of strings which are interpreted as lines). This just happens to work because Qt's JSON parser eats it without choking. Change-Id: I25ef04600b209775c5a7af916c687fda4a8b1a4d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Remove unused IAssistProvider::supportsEditorEike Ziller2017-07-032-6/+0
| | | | | | Change-Id: Ieb2a36bfddbf4f2cade02cbf62b28d112dcb8f10 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* GLSLEditor: Remove GlslHoverHandlerNikolai Kosjar2017-06-285-96/+0
| | | | | | | The BaseHoverHandler does the same job. Change-Id: I2708a87ed5cbc3b320766f52927be4a9670b522b Reviewed-by: David Schulz <david.schulz@qt.io>
* Simplify text format handling in syntax highlightersEike Ziller2017-05-232-39/+11
| | | | | | | | | | | | | | | | Pass the mapping from custom enum to text style in form of a function, which then can use a switch which is checked by compilers, and avoids the need to lookup a different enum somewhere else to find out what the mapping actually is. That mapping is cached to keep performance as before. Also, most highlighters created an enum just for the purpose of mapping to text styles, basically creating duplicated subsets of text style like enums everywhere. Instead provide a default, identity mapping from text styles to text styles. Change-Id: I2ea1ca702b99e36b8742dfda510b1b2753f0a1c2 Reviewed-by: David Schulz <david.schulz@qt.io>
* Remove dead code from GLSL highlighterEike Ziller2017-05-081-83/+0
| | | | | Change-Id: I43734e16ee0972906666629dc822e19982980d0e Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Allow giving TextEditorFactory custom CommentDefinitionEike Ziller2017-04-261-1/+1
| | | | | | | | It was not possible to set custom comment styles. Also simplifies the code for the predefined styles. Change-Id: Id7f345d65b747bfac5a15e3eb15cd2beb106b281 Reviewed-by: David Schulz <david.schulz@qt.io>
* Reduce usage of qApp in favor of static function callsAlessandro Portale2017-04-241-1/+1
| | | | | | | | | | | | Q*Application classes have unusually many static functions. In many cases in our code, these functions are unnecessarily called as instance functions, using the qApp helper. This patch replaces many occurencies of qApp with the according Q*Application classname. Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124 Reviewed-by: hjk <hjk@qt.io>
* Move mimetype definitions to plugin specsEike Ziller2017-02-274-47/+46
| | | | | | | | | | | | - Avoids the hassle of QRC files and manually registering mime types - Avoids performance regressions because of mime types that are registered after mime database has been used - Makes it technically possible to detect that a disabled plugin could handle a mime type if it was enabled Change-Id: I373008b1b56e9c6b4853055f20b3eeb112a6eff9 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
* improve static initializersTim Jenssen2016-09-231-15/+14
| | | | | Change-Id: I304fdd6627f01fc216c84930da607127c52409d9 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Merge remote-tracking branch 'origin/4.1'Eike Ziller2016-08-312-0/+21
|\ | | | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/qmakeprojectmanager/makestep.cpp src/shared/qbs Change-Id: If1787ed23afa786ed2cef57f53c1db642559cbe0
| * Editor: Collect indentation for a list of text blocksDavid Schulz2016-08-312-0/+21
| | | | | | | | | | | | | | | | Allows the indenter to reuse code formatter structures. Task-number: QTCREATORBUG-16420 Change-Id: Ie906d7fdcb50798da02ef5b750fb03ae752aadc1 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | GLSLEditor: Add missing parenthesesOrgad Shaneh2016-08-231-3/+3
| | | | | | | | | | | | | | | | | | They're inside #if 0 so nobody noticed. Detected by lupdate Change-Id: I6a3dc8192f71dbdf675757d9ff71bad6a4adec4b Reviewed-by: hjk <hjk@qt.io>
* | BaseHoverHandler: Remove virtual and add override to derivationsAndre Hartmann2016-08-101-2/+2
| | | | | | | | | | | | Change-Id: I2bd3fd4774d7ffeb54c373309c98aa879a391227 Reviewed-by: Marc Reilly <marc.reilly@gmail.com> Reviewed-by: David Schulz <david.schulz@qt.io>
* | GLSL: Remove some dead codehjk2016-08-031-9/+0
|/ | | | | | | Commented out since the initial import in 2010 Change-Id: Icdb6ced53b39b2fda7037616cf9d2f098279e534 Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: Skip auto completed character only if it was recently inserted.David Schulz2016-06-212-6/+8
| | | | | | | | | | | | | | | | This means you can skip automatically inserted characters as long as you don't explicitly move the text cursor and the editor doesn't lose the focus. This will be visualized by highlighting the automatically inserted character as long as you can perform the skipping. This will reduce unexpected skipping in the case a cursor was explicitly placed before an closing brace and a closing brace is typed. Change-Id: I28e29e79ba10c9c48e8bc8817405fea630cca9bd Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* Editor: Separate auto insert brace and quote magic.David Schulz2016-05-252-16/+28
| | | | | | | To allow enabling/disabling both features separately. Change-Id: Ica154e3b400823de7cf22daf006958802d751c64 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Remove duplicated code from c++ and glsl completer.David Schulz2016-05-202-77/+5
| | | | | Change-Id: Ibda04771fceffef6344f6a6128d77dd8192379ca Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Merge remote-tracking branch 'origin/4.0'Eike Ziller2016-04-1212-41/+65
|\ | | | | | | | | | | | | Conflicts: src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp Change-Id: I6ae2d37290643d69390f679a54f7596782f3d97f
| * GlslEditor: Remove duplicated iconsAlessandro Portale2016-04-1112-41/+65
| | | | | | | | | | | | | | | | | | This change makes GlslCompletionAssist reuse the equivalent icons from CPlusPlus, and adds specific ones for "Attribute", "Uniform" and "Varying". Change-Id: Ic8860274a9f421d28cfec86ed0d1badb7e1cf92e Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
* | Wholesale conversion to #pragma oncehjk2016-03-308-32/+8
|/ | | | | | | Kudos to cgmb and https://github.com/cgmb/guardonce Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* GLSL: Fix warnings about inconsistent use of overrideTobias Hunger2016-02-291-3/+3
| | | | | Change-Id: Ice4cf80141c5cb3c250c1c01fb70e6db8d1abe29 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* Editor: Fix whitespace cleaning.David Schulz2016-02-242-0/+15
| | | | | | | Task-number: QTCREATORBUG-7994 Change-Id: I6c197ccc3a148555018e8f8184d116c88d7ea400 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* TextEditor: Introduce AssistProposalItemInterfaceMarco Bubke2016-02-011-1/+1
| | | | | | | | | | For unit test we need to break every dependency to the TextEditor Widget etc.. With an abstract interface we can implement it in clang without relying on unwanted dependencies. It makes it also easier to compute the values deferred. Change-Id: I1b313a1625f4e80bd324ab4bf1a7c4f6b690abe9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-1916-258/+184
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Use text settings instead of hard coded diagnostic text formatsMarco Bubke2015-12-091-6/+4
| | | | | Change-Id: Id51d03a46b4403d9224508ff3c7647b829ee69cd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Clang: Add diagnosticsMarco Bubke2015-08-311-2/+2
| | | | | | | | Diagnostics are now moved to the clang backend process. Fixits are supported too. Change-Id: I20faacf466bbf78dec479220c3d7b336a47bc453 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* PNG: Run pngcrush on images with iCCP or sRGB profilesTobias Hunger2015-07-034-0/+0
| | | | | | | | This quietens warnings from libPNG during startup and shrinks the image sizes. Change-Id: Ieb4cb5e8ba30b99653896e283c2fb2cc267257f2 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Add override keyword to IEditor & TextEditorWidget implementationsEike Ziller2015-06-091-1/+1
| | | | | Change-Id: I403101d788d9edfea5c5c9440ab4f39ad00e81f7 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* glsleditor: s/Q_DECL_OVERRIDE/override/gTobias Hunger2015-06-042-9/+9
| | | | | | Change-Id: I818ad4a11c70a455462e91478b8ac955ad634530 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
* Merge remote-tracking branch 'origin/3.4'Eike Ziller2015-05-071-6/+5
|\ | | | | | | | | | | | | Conflicts: src/libs/extensionsystem/pluginview.cpp Change-Id: I410156c1003d5dc81e915110c6d432bcd71da010
| * MimeDatabase: Avoid parsing the mime xml files multiple timesEike Ziller2015-04-271-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment we need to throw the parsed information away and reparse everything if we add another mime xml file (*), so make sure that we do not use mime information (which triggers a first parse) before we added all mime xml files. (*) we do that because the data for a mime type is distributed through a whole range of classes which do not easily allow to remove an already registered mime type, but we must be able to overwrite mime types from freedesktop.org.xml. Change-Id: I5e532875cc750af1da3e0139397279d7be203c27 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* | Merge remote-tracking branch 'origin/3.4'Eike Ziller2015-03-121-4/+3
|\ \ | |/ | | | | | | | | | | Conflicts: qtcreator.pri Change-Id: Iacd9f2afb843f06d457914a3b842dfc606e3adf3
| * GlslEditor: Fix crashChristian Stenger2015-03-121-4/+3
| | | | | | | | | | | | Task-number: QTCREATORBUG-14116 Change-Id: I48549806b7108d31519dc573039496b727e7a0af Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | Remove aggregation dependency from project filesNikita Baryshnikov2015-03-092-2/+0
|/ | | | | Change-Id: Idfd3941f47b71d6b84306d88604b744e3585e4af Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* CppEditor: Use correct language features in Follow SymbolOrgad Shaneh2015-02-281-2/+4
| | | | | Change-Id: If4adc4153341ac63bd5566a66ccf177ae4e536e1 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* C++: Accept language features in BackwardsScanner et alOrgad Shaneh2015-02-271-1/+2
| | | | | Change-Id: Id97ca27fa909979573efca12dc0cd14b28eacd17 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Clean exported headers of the TextEditor plugin.Friedemann Kleint2015-02-261-0/+1
| | | | | Change-Id: I1e7dd34ba5a51fb0b34d137dc03add4457b32ed1 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Core: Make Context parameter to registerAction optionalhjk2015-02-261-3/+2
| | | | | | | | | ... and default to C_GLOBAL. A rather common case. Similar for ActionContainer::addSeparator(). Change-Id: I7f9ba573af201c0a472132d5a494ad17cc4175b7 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Use new mime databaseEike Ziller2015-02-171-3/+2
| | | | | Change-Id: I4305872b6b11ef3e8a364280ffa5209a5a793600 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'Eike Ziller2015-02-1216-94/+94
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1616-94/+94
| | | | | | | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | Misc: Remove unneeded qualificationsOrgad Shaneh2015-02-063-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: I919da493d0629b719d328e5e71c96a29d230dfd1 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>