aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor
Commit message (Collapse)AuthorAgeFilesLines
* Core,PE,TE: Add "build" to find in files exclusion listCristian Adam6 days1-1/+1
| | | | | | | | | Now that we have the "build" directory in the source directory we need to exclude it from the find in files search list. Change-Id: I74b20f828ffed51b5d7be98efa662bcc4b420523 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/13.0'Eike Ziller9 days1-3/+5
|\ | | | | | | | | | | | | | | Conflicts: doc/qtcreator/src/overview/creator-only/creator-reference.qdoc doc/qtcreator/src/qtcreator-toc.qdoc Change-Id: Ibea5488fda972321c448c64fad7f657e84d62cdb
| * Fix the directory opened when exporting coding stylesEike Ziller9 days1-3/+5
| | | | | | | | | | | | | | | | | | On macOS. Make sure to use an absolute path for the file dialog. Fixes: QTCREATORBUG-28832 Change-Id: I75f4166ee2bc3238a01089231bde4cf990269024 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | Merge remote-tracking branch 'origin/13.0'Eike Ziller13 days1-1/+2
|\| | | | | | | | | | | | | Conflicts: src/plugins/languageclient/languageclientutils.cpp Change-Id: I8d1945f79d93cecee9b22f409bc5f2eefaf6a4cd
| * TextEditor: fix backspace on block startDavid Schulz2024-04-241-1/+2
| | | | | | | | | | | | | | Amends ec88d279a8d52189685008c8fe46371d13d2505f Change-Id: I7d83b5ffa617f8d45acc6998ce674b1afcf3a31b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge remote-tracking branch 'origin/qds/dev'Tim Jenssen2024-04-231-3/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/qtcreator/src/overview/creator-only/creator-keyboard-shortcuts.qdoc doc/qtcreator/src/qtquick/qtquick-live-preview-devices.qdoc doc/qtcreator/src/qtquick/qtquick-profiler.qdoc src/plugins/qmlprojectmanager/qmlprojectmanager.qbs src/plugins/remotelinux/linuxdevicetester.cpp Change-Id: I3683c1799df05209d05413383456b285a2daf96e
| * | Merge remote-tracking branch 'origin/13.0' into HEADTim Jenssen2024-04-232-3/+17
| |\| | | | | | | | | | Change-Id: I1f87297930db420606aab8d7016c290483f262c0
| | * TextEditor: Fix calculating block highlight background colorDavid Schulz2024-04-231-1/+1
| | | | | | | | | | | | | | | | | | Fixes: QTCREATORBUG-30649 Change-Id: I9a213ecdf4d58ed6531014c99bbdedac8ac9ef00 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| | * TextEditor: Optimize unindent backspace behaviorDavid Schulz2024-04-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only remove more than one character when the cursor is inside the indentation in the beginning of the line. In all other cases always only remove one character. Fixes: QTCREATORBUG-30725 Change-Id: I973101a95768cdd8b1a318972f53423eb72eb157 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
| * | Merge remote-tracking branch 'origin/13.0' into qds/devTim Jenssen2024-04-102-5/+5
| |\ \ | | | | | | | | | | | | Change-Id: I1f6114244514a2b786a8b0d364a303b925ad7757
* | | | CompilerExplorer: Fix Undo/Redo actionsMarcus Tillmanns2024-04-182-8/+29
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib3f55467764600d0b1e4ef25b53874a4d37a7ba7 Reviewed-by: David Schulz <david.schulz@qt.io>
* | | | Translations: Fix various \n, full stops, spacesEike Ziller2024-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing full stops, remove space at beginning and end, remove end lines at end Change-Id: I4ce28f578e13e100dcfbd8ef70630462faf407fc Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-04-171-0/+15
|\ \ \ \ | | |_|/ | |/| | | | | | Change-Id: I0892d8e54930bb5a65dc51117b8ca7d70ce300a3
| * | | TextEditor: Add Flex/Bison mime typesCristian Adam2024-04-171-0/+15
| | |/ | |/| | | | | | | | | | | | | | | | | | | Fixes: QTCREATORBUG-30686 Change-Id: I8f220be4445960573300e76939069788e70ac333 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | | Editor: use unique id without common partDavid Schulz2024-04-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise we also got override action warnings after opening a second editor. Change-Id: Id600eaa120e32399a941768ae5d5e35ab969be49 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | | Editor: fix assist actionsDavid Schulz2024-04-122-47/+41
| | | | | | | | | | | | | | | | | | | | | | | | Amends 411100b0378202dc617acaa236f4730eb4cc43b2 Fixes: QTCREATORBUG-30673 Change-Id: Icc82b6f5526d229a13a7061cbc44904837c25f06 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | | Editor: fix action text for switching utf8 bomDavid Schulz2024-04-111-1/+1
| | | | | | | | | | | | | | | Change-Id: I0be1f9527aa4b0681a2c1423031800eb170a3d9e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | | Editor: move setScriptable to context actionsDavid Schulz2024-04-112-399/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The scriptable info is saved to the action registered for a specific context so we need to add this info to the action builder in the text editor that has the correct context. Also remove all action builder constructs for the global context that have been registered before in order to silence the add override action warning. Change-Id: I631d71ba5eb8e975190713b33827926e868da295 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | | TextEditor: remove text editor action handlerDavid Schulz2024-04-0910-777/+876
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Give each editor a context and register editor actions individually for that context. This removes the need to tell the action handler the current editor. Additionally all actions are now available in editor widgets outside of the EditorManager. Change-Id: I0109866b180889762f8bd8aa07874d8d7c55bfa6 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* | | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-04-081-2/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs src/libs/utils/fsengine/fileiteratordevicesappender.h Change-Id: Ia61fa12d14a4f862549509bd980cf9f66905c17f
| * | TextEditor: Remove non-exported include from public headerEike Ziller2024-04-051-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The header from KSyntaxHighlighting is not exported to the dev packages, so separate plugins using the syntax highlighter fail to compile. The include is not even used in that file anymore though, so just remove it. Change-Id: Iff9be4e35c1edb5492707b00a5afae96d85db16a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
* | | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-04-021-3/+5
|\| | | | | | | | | | | Change-Id: I12578a55fb61a3a9620c749c0b3bbbae6dcb4493
| * | TextEditor: Fix initial loading of behavior settingsOrgad Shaneh2024-04-021-3/+5
| | | | | | | | | | | | | | | | | | Fixes: QTCREATORBUG-30606 Change-Id: I1b4d8fd47e528d0868969cf883401037c0cfe9ee Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | | TextEditor: handle syntax highlight in batchesDavid Schulz2024-03-2513-729/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use an elapsed timer in the syntax highlighter to periodically return from the highlight and push a continue highlight to the end of the event loop. This allows the user to interact with the editor in between those batches. If the user modifies the document in between highlighting batches, the area that still needs a rehighlight is increased if needed. This also reverts 62ea85ee6ad15c8e4d9cb5e35b1f10bee3c49ac7 and the related changes. Task-number: QTCREATORBUG-28727 Change-Id: I7c394dbdff658330bb72f3b68b9928980947db75 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | | Merge remote-tracking branch 'origin/qds/dev' into HEADTim Jenssen2024-03-141-0/+1
|\ \ \ | | |/ | |/| | | | Change-Id: I9d13aa050b1c7fb0954e2b63d13da2922d8f7218
| * | Merge remote-tracking branch 'origin/13.0' into qds/devTim Jenssen2024-03-119-47/+200
| |\| | | | | | | | | | Change-Id: I8cd3cdf5854299d3017d6c6bfa656fc483a0e20b
| * | Utils: Fix build with MSVC with C++20Eike Ziller2024-03-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename process.h back to qtcprocess.h MSVC's "threads" standard header includes <process.h>, and that ends up including our process.h from Utils. There already was a hacky workaround in place for a similar issue with MINGW, but that doesn't work with MSVC because that doesn't have Simply use a name that doesn't conflict. Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io> (cherry picked from commit 5af531cd39067366cea627e3db1a0b83d7172873) Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | | TextEditor: Split FormatText into input and output structsJarek Kobus2024-03-131-67/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove output data from FormatText and rename it into FormatInput. Use Utils::expected_str<QString> for output data and alias it with FormatOutput. Change-Id: I2cf21d73d2e973eeeb4431ae30b56bb5987986f6 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* | | TextEditor: Add type hierarchy infrastructureChristian Kandeler2024-03-129-3/+207
| | | | | | | | | | | | | | | | | | | | | | | | We want to support more than one back-end in the future. Task-number: QTCREATORBUG-28116 Change-Id: I72020c94b36072a297e13f44130e5e2482922cd4 Reviewed-by: David Schulz <david.schulz@qt.io>
* | | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-03-128-43/+189
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | Conflicts: src/plugins/debugger/gdb/gdbsettings.cpp src/plugins/perfprofiler/perfprofilerruncontrol.cpp Change-Id: I0d5b914f9d9b5499920a5db484ef77af6ae748d5
| * | ClangFormat: Fix General tab is missingArtem Sokolovskii2024-03-072-0/+14
| | | | | | | | | | | | | | | | | | Fixes: QTCREATORBUG-30501 Change-Id: Ic1f09e513114acf6fb6ee52c8b5f066a2071e202 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * | Revert "Revert "TextEditor: Use synchronous highlighter by default""David Schulz2024-03-072-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The crash in the syntax highlighter was resolved so we can switch the default back to synchronous highlighter. This reverts commit 0539e2a0f63c25d24c78c4e12f8554714a7b1855. Change-Id: I2e9cdb818420a14d01565d58def14f88cf5e895d Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
| * | TextEditor: Fix crash in SyntaxHighlighterDavid Schulz2024-03-071-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SyntaxHighlighterRunner is deleted by deleteLater in the TextDocument destructor. This makes it possible that the SyntaxHighlighter inside the runner lives longer than the document itself. Avoid this by making the document the parent of the SyntaxHighlighter like before the async highlighter patch series. Fixes: QTCREATORBUG-30494 Change-Id: I6ce9c35ab400b17f2a1a6f3c3bd98df23f41c71e Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
| * | Revert "TextEditor: Use synchronous highlighter by default"David Schulz2024-03-062-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1c47a0a301c291b0ec450b7a141c5067d402dac4. Changing the default revealed a crash that seem to be caused by the async syntax highlighter infra structure changes. Revert the default for now to figure out the cause of the crash. Task-number: QTCREATORBUG-30494 Change-Id: I1d0388c29d206cb25f2d58e4b305aa8303db2a60 Reviewed-by: Robert Löhning <robert.loehning@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
| * | SyntaxHighlighter: Add rerun if highlighting was interruptedArtem Sokolovskii2024-03-064-29/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added mechanism of highlighting restart when the previous highlighting was interrupted. Change-Id: Ic44c06442fd9f0002fed760472d5d39903e7ef50 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
| * | TextEditor: Use synchronous highlighter by defaultDavid Schulz2024-03-062-7/+11
| | | | | | | | | | | | | | | Change-Id: I796800972668d4cad9dd12aa4fcc9395febcce0f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-03-062-5/+26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs src/plugins/cppeditor/cppcodemodelsettings.cpp src/plugins/cppeditor/cppcodemodelsettings.h Change-Id: I54937c39b06897a72a105e4e0a8b5f8a76c38e26
| * | TextEditor: fix finding whole wordsDavid Schulz2024-03-051-4/+11
| |/ | | | | | | | | | | | | | | | | | | '_' was handled as a word separator, in contrast the global search did not. So the user received different results when using find toolbar or the advanced search while searching with the same option and pattern. Fixes: QTCREATORBUG-10276 Change-Id: Ie07303fbaa35475bb98bdb813358169474c3ba1d Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
| * TextEditor: add mime type for device tree source filesDavid Schulz2024-02-291-1/+11
| | | | | | | | | | | | Fixes: QTCREATORBUG-19029 Change-Id: I1959681cb7e0f9466cea3344836d7029a98b4548 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
| * TextEditor: Fix jump to a search result to a folded blockArtem Sokolovskii2024-02-291-0/+4
| | | | | | | | | | | | Change-Id: Id9963bdf2a02930911753af046443e9b657bc9b9 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-02-298-45/+105
|\| | | | | | | | | | | | | Conflicts: src/plugins/android/androidsettingswidget.cpp Change-Id: Ifcb16aa16c7bc2792de25d0ee7a22cf0e39a05f8
| * TextEditor: Fix jump to search resultArtem Sokolovskii2024-02-291-20/+25
| | | | | | | | | | Change-Id: Ie570936b0b96290d95999b8b501c12610ebfc9a8 Reviewed-by: David Schulz <david.schulz@qt.io>
| * TextEditor: Set the special weight of Source Code Pro font familyCristian Adam2024-02-282-3/+4
| | | | | | | | | | | | | | | | | | | | The text editor font is used also for output panes, make sure that on macOS we use QFont::Medium so that the font is not too skinny. Amends 13dc66a08d3120fe4eb9c1e124618a3d17408d8e Change-Id: Idad26738d42452c8d683df7a40a4a2fe44e9793e Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
| * TextEditor: Fix folding for async syntax highlighterArtem Sokolovskii2024-02-286-27/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Made restoreState, ensureBlockIsUnfolded, fold, unfold and unfoldAll functions to be called only after highlighting is done - Improved management of foldValidator in async case - Removed optimizations in cpphighlighter and glshighlighter. The highlighters are async now and optimization is not necessary. In these optimizations in the function highlightBlock the highlighting changes not only for currentBlock but and for several next. Which is contradict with the function name. Change-Id: Ib413e6b982eb39d52f36c3066ff0fa8c28fbe231 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Utils: Fix build with MSVC with C++20Eike Ziller2024-02-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename process.h back to qtcprocess.h MSVC's "threads" standard header includes <process.h>, and that ends up including our process.h from Utils. There already was a hacky workaround in place for a similar issue with MINGW, but that doesn't work with MSVC because that doesn't have Simply use a name that doesn't conflict. Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-02-275-11/+40
|\| | | | | | | Change-Id: If752e3383b35873b696e8beca27d8838a4096c8a
| * TextEditor: bound increase and decreaseFontZoom to a 10% gridDavid Schulz2024-02-235-11/+40
| | | | | | | | | | | | | | | | This allows to get back to a 100% font zoom with the keyboard shortcuts by zooming to an odd zoom factor by other means. Change-Id: Ie90853367b17c207e9c47fc108b8d6f451e0f838 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
| * TextEditor: fix multi text cursor unindent via backspaceDavid Schulz2024-02-221-1/+1
| | | | | | | | | | | | Change-Id: Iec2e9251b977ccbd7433009ac3e706a9327c704c (cherry picked from commit 971bcb1a5abd396819510644e55ef437978adcd5) Reviewed-by: David Schulz <david.schulz@qt.io>
* | TextEditor: Hide FormatTask in cpp fileJarek Kobus2024-02-262-12/+12
| | | | | | | | | | | | | | Unexport it. Change-Id: Ib2e73486e31d115a3e960c7bb4420014172313a7 Reviewed-by: David Schulz <david.schulz@qt.io>
* | TextEditor: Move editor field outside of FormatTask structJarek Kobus2024-02-262-26/+12
| | | | | | | | | | | | | | | | | | | | | | | | It doesn't take part in format() processing function, so move this field outside. The format() may be called in separate thread, so, just for safety, don't keep this field there so that nobody accesses it from non-main thread. Remove the c'tor of FormatTask and use list-initialization instead. Change-Id: I54daf1461243a46bbd7f58c91ba051909b6cf280 Reviewed-by: David Schulz <david.schulz@qt.io>