aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/fakevim
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-04-171-1/+1
|\ | | | | | | Change-Id: I0892d8e54930bb5a65dc51117b8ca7d70ce300a3
| * FakeVim: Remove unused function warning when building without WITH_TESTSAlessandro Portale2024-04-161-1/+1
| | | | | | | | | | Change-Id: I33ad1a20046a51c4253056a23d49ac7ddc7a0c54 Reviewed-by: hjk <hjk@qt.io>
* | TextEditor: handle syntax highlight in batchesDavid Schulz2024-03-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Utils: Fix build with MSVC with C++20Eike Ziller2024-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | FakeVim: Remove some dead codehjk2024-02-192-18/+1
|/ | | | | | | Found by the Axivion plugin. Change-Id: I9ebc2ad47c4eb7d19534db932d4a0d087429a35d Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* FakeVim: Replace QSharedPointer with std::shared_ptrJarek Kobus2024-02-011-2/+1
| | | | | | | | According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews QSharedPointer impl is poor and it's going to be removed from Qt 7. Change-Id: I9caa1cd8aca07a58071d566a6b300c1577f72c28 Reviewed-by: hjk <hjk@qt.io>
* TextEditor: Move access to smaller settings chunkshjk2024-02-011-1/+1
| | | | | Change-Id: Id827edbd19dde54b66cb4349d9c832bc23110adc Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge remote-tracking branch 'origin/12.0'Eike Ziller2024-01-301-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/cppeditor/cppfilesettingspage.cpp src/plugins/haskell/haskellplugin.h Change-Id: I880693c2e4986853b7aa600a5b7d6c09ad14634e
| * Fix some compler warningshjk2024-01-221-1/+1
| | | | | | | | | | | | | | | | 1x warning: lambda capture 'this' is not used [-Wunused-lambda-capture] 2x warning: class with destructor marked 'final' cannot be inherited from [-Wfinal-dtor-non-final-class] Change-Id: I762fbe935156de9600064512bc405c6f4b2b1477 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | FakeVim: Fix testsArtem Sokolovskii2023-12-191-1/+10
| | | | | | | | | | | | | | Amends: e396f84d10aef973e752e7519f85de80d7dcdb86 Change-Id: I3c871006326dc691d24cc715c5a05f5c5acdadc7 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Merge remote-tracking branch 'origin/12.0'Eike Ziller2023-12-191-0/+1
|\| | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs Change-Id: I937d301156dac0d20b43e7a14b41a319eff57698
| * FakeVim: Persist fakevim settings when enabling globallyChristian Stenger2023-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | Explicitly persist settings if enable FakeVim mode gets triggered using the global shortcuts, otherwise we would enable the FakeVim mode only temporarily and a restart of Qt Creator would use the former mode again. Fixes: QTCREATORBUG-29949 Change-Id: I457b32f8e5fe035e334ed51f358f374c85ab010b Reviewed-by: hjk <hjk@qt.io>
* | FakeVim: Test build without testsEike Ziller2023-11-221-0/+4
| | | | | | | | | | | | | | Undefined symbols: FakeVim::Internal::createFakeVimTester Change-Id: I2acaeaeb6a3be84ecc95415cd6f20296c4913786 Reviewed-by: hjk <hjk@qt.io>
* | FakeVim: Fix warning about unused lambda capturehjk2023-11-201-2/+2
| | | | | | | | | | Change-Id: I136f52002e02611d41a309809408bcde57aceefe Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | FakeVim: Merge Plugin and PluginPrivate classeshjk2023-11-171-142/+109
| | | | | | | | | | | | | | | | There were different from the PluginPrivate-created-in-initialize pattern anyway. Change-Id: I690c9c0511203f3c4d6ec9eeca85c0a277330e2f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | FakeVim: Move plugin class definition to .cpphjk2023-11-174-67/+35
| | | | | | | | | | | | Change-Id: Iac485bbd6cd00ddfae189a6f82c9f5f2c7e9aaf9 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | FakeVim: Move test declaration from plugin to separate objecthjk2023-11-173-267/+289
| | | | | | | | | | | | | | | | Also ugly, but differently. Change-Id: I832ac19c7d8a3457a40baaae60653a02a32dbd75 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | FakeVim: Simplify completion support setuphjk2023-11-161-20/+5
|/ | | | | | | That's the "word based" completion triggered by Ctrl-N. Change-Id: Ib35d7e6d2fa0fc144cd92d09d22c279d50aa2fdc Reviewed-by: David Schulz <david.schulz@qt.io>
* Fix setEnabler / readSettings orderMarcus Tillmanns2023-11-071-2/+2
| | | | | | | | | BaseAspect::setEnabler requires the settings to be read already. This is because readSettings() does not emit "valueChanged", and so the connections from the enabler to the target are not triggered. Change-Id: I0c95e2b516cd03c1dbad653288b44510ec7ea800 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Tr: Fix shortcut display for exiting FakeVimEike Ziller2023-10-161-1/+2
| | | | | | | Qt "Meta" is macOS "Control" Change-Id: I9c2ca5fe25d70da97871e54060c892eb6fa78e0a Reviewed-by: hjk <hjk@qt.io>
* All: Even less #include <QSettings>hjk2023-09-271-1/+0
| | | | | Change-Id: Ifbb2af34169036236e6f2f7b09ef115de5c6a6c7 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils, all: Standardize on QtcSettingshjk2023-09-271-3/+3
| | | | | Change-Id: Id222016f15b1c3bfe6710fe5d0297666d4565ef1 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils: Use a proper class as Keyhjk2023-09-273-14/+12
| | | | | | | | | | | | | | | | The Key encapsulates now a QByteArray. Plan is to use QByteArray::fromRawData on literals, but that's not active yet due to an unclear ASAN report, see the gerrit discussion. For now we also paddle back when interfacing QSettings, instead of mimicing writing a QVariantMap (and fail in some corners), always convert the Store. This is meant to go away in the future when code paths are better controled. Change-Id: Id1206a434d511f8003903d5322c7c9bd5f5fb859 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils: Remove the non-QTC_USE_STORE casehjk2023-08-311-4/+0
| | | | | Change-Id: I857a38c80470d1b474ca0f291a93ed58fbcc0bf4 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils etc: Even more Key and Storehjk2023-08-254-18/+20
| | | | | Change-Id: Id2405d8a89c47ea766439eec91db36ed7313eb92 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils etc: More use of Key and Storehjk2023-08-242-11/+16
| | | | | Change-Id: Idd2d70617f775d783aee93a2fe82544ad335a739 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Various Plugins: Add context object into connectionsJarek Kobus2023-08-021-1/+1
| | | | | | Change-Id: I360677bebfef16a3233b3b8177cff6da57ec7c31 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Build: Change plugin json.in files to CMake styleEike Ziller2023-07-251-15/+15
| | | | | | | | | | | | | They were still using variables in qmake style. Directly use CMake variables in the json.in files and remove the no longer needed escaping of quotes. Adds a fatal message if it detects the old style in a .json.in file for easier porting. Change-Id: I8de88d8db2da55781f0e9d72eda03f943723188e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Fix some warnings about unused thingsEike Ziller2023-07-251-1/+1
| | | | | | Change-Id: I42bb514dfe1d6745b1469b508a4cfa576e17c31b Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Core: Add some sanity check that settings containers don't auto-applyhjk2023-07-131-0/+2
| | | | | | | | | | We use manual 'Apply' in the dialog. Also, mark a few pages as non-autoapply that were recently changed away from PagedSettings again which did that autmatically. Change-Id: Id78cac2770658b18c420813802a0e77443329f39 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* FakeVim: Delay settings creation until actual usehjk2023-07-103-34/+38
| | | | | | Task-number: QTCREATORBUG-29167 Change-Id: I3a6f1330922f3840cb7e99d8adb60a728d36eb4b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* FakeVim: Assume UTF-8 for source also on Windows by defaulthjk2023-07-043-2/+6
| | | | | | | | ... but make it configurable. Fixes: QTCREATORBUG-29320 Change-Id: Ib377c78e51afb7d06167c66306250a281aa9279c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* FakeVim: Use a FilePathAspect for .vimrchjk2023-06-303-4/+11
| | | | | | | Even if it's not used as such, it would be the right thing to use. Change-Id: I7f8931b581af6a97231c49c20e7adc56ad2efff6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Rework aspect implementationhjk2023-06-294-60/+46
| | | | | | | | | | This avoids some repetition and could be a step towards having type storage in (or rather accessible from) the base, so we can have aspects for more complex data (treemodels...) that are not easily converted to QVariant. Change-Id: I9797b3d5646195705212db1830d2b415291ac651 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix occurrences of the contains/insert anti-patternChristian Kandeler2023-06-231-3/+3
| | | | | | | | | Introduce and make use of Utils::insert() for QSet with a return value that indicates whether insertion actually happened. Change-Id: I655e4bc3553b74fea5ae8956205e4d8070118d63 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* FakeVim: Streamline settings handling a bithjk2023-06-014-86/+66
| | | | | Change-Id: I6ab2c1643a5236525515ded296cd854933584603 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* FakeVim: Use PagedSettings for main settingshjk2023-06-013-138/+144
| | | | | Change-Id: I5029ae42ca5c3ec426d37a818150677186dd55ea Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Utils: Remove LabelPlacement::AtCheckBoxWithoutDummyLabelhjk2023-05-241-1/+1
| | | | | | | | | | This is identical in remaining functionality to AtCheckBox after the recent layout builder changes (or rather, can be adjusted on the layouting side by having appropriate empty cells) Task-number: QTCREATORBUG-29167 Change-Id: Ic357de6fb756acb5926afe1fd361ee4b18b17afd Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* FakeVim: Maintain highlighting on splithjk2023-05-171-1/+18
| | | | | | | Fixes: QTCREATORBUG-28914 Change-Id: I4e0b82e49bd97f19eb513f21e1dc405ea9f0700c Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* FakeVim: only block suggestion when fakevim is in useDavid Schulz2023-05-153-0/+9
| | | | | | | | This fixes the issue that no copilot suggestion were shown after switching documents. Change-Id: Ic81bfbe266877964eeaf688d9915a7937607118b Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* All: Use the shorter access to aspect values in a few placeshjk2023-05-123-15/+18
| | | | | Change-Id: Ie0ff0e4e1cf4c2750897ea733dfccb743f44fa93 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* FakeVim: Fix build with Qt 6.6Eike Ziller2023-05-081-8/+10
| | | | | | | | The connect doesn't work with incomplete type FakeVimHandler::Private anymore, so move the code. Change-Id: I686cd19a985f965cebf7d0a927cff4dc80ae746d Reviewed-by: hjk <hjk@qt.io>
* FakeVim: More compact settings page implementationhjk2023-05-051-101/+69
| | | | | Change-Id: Iaca48e8a22f26817442dbf5147f318868dbd1f34 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}Jarek Kobus2023-05-041-1/+1
| | | | | | | | Follows QtcProcess -> Process rename. Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Utils: Rename QtcProcess -> ProcessJarek Kobus2023-05-041-1/+1
| | | | | | | | Task-number: QTCREATORBUG-29102 Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c 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>
* Layouts: Add/remove contentMargins where neededAlessandro Portale2023-05-041-0/+1
| | | | | | | Some cases were preexisting, some were introduced recently Change-Id: I0e7e7b74422c420fbf4563d7cbf384e53931c3a0 Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Remove QtcProcess use from fakevimhandler.cpphjk2023-05-023-27/+16
| | | | | | | | | fakevimhandler.{h,cpp} are meant to be re-usable outside of Qt Creator. Amends 91605c3. Change-Id: I569a393d13049ef92ed3ef0c4f69de5232b2fa32 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* FakeVim: Accept suggestion with Tab KeyMarcus Tillmanns2023-05-023-81/+96
| | | | | | | | | | * Changed signals to callbacks as only one receiver was ever added * Added "tabPressedInInsertMode" callback to allow accepting a suggestion with the Tab Key Fixes: QTCREATORBUG-28830 Change-Id: Ie70ba595b8802b6100fff495164d8e0471b1354c Reviewed-by: hjk <hjk@qt.io>
* FakeVim: Block SuggestionsMarcus Tillmanns2023-05-023-25/+60
| | | | | | | | Block suggestions when FakeVim is enabled and the mode is not "Insert" or "Replace". Change-Id: I778eb25d9570b76e42652f9d938a8c580033c462 Reviewed-by: David Schulz <david.schulz@qt.io>
* FakeVim: Clear suggestions on mode changeMarcus Tillmanns2023-04-273-0/+14
| | | | | | Change-Id: I5d3a37ab61f83a70e055063de397654f5621401d Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io>