Commit Graph

380 Commits

Author SHA1 Message Date
hjk
78a5b42942 FakeVim: Fix goto next/previous split
Fixes: QTCREATORBUG-22397
Change-Id: Ibdae1d53d9d77dd982b871aa22585bdf0354d84f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-16 11:32:58 +00:00
Sona Kurazyan
82bcf4e9f5 Remove usages of deprecated APIs
Replaced:
  QPalette::ColorRole::Background -> QPalette::ColorRole::Window
  QPalette::ColorRole::Foreground -> QPalette::ColorRole::WindowText
  Qt::ItemDataRole::TextColorRole -> Qt::ItemDataRole::ForegroundRole
  QFontMetrics::width() -> QFontMetrics::horizontalAdvance()

Task-number: QTBUG-76491
Change-Id: I1302e6b569e725daa6f7be1428ffe055657fc644
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-03 09:15:30 +00:00
hjk
251287f0d3 Avoid warning on empty expressions
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>
2019-07-23 11:55:59 +00:00
Alessandro Portale
0933c20de8 connect() to ambiguous signals/slots: Replace static_cast with QOverload
Change-Id: I473d7a2a16509cee944a2a21b022a3f6f02cfd8d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 14:07:03 +00:00
Ivan Donchevskii
d7058e1afe ClangFormat: Refactor indenter to allow ClangFormat unit-tests
We do not build texteditor files in unit-tests so some tricks
were required to make ClangFormatIndenter available.

First simple unit-test proofs it builds and runs.

Change-Id: I81d5ea099bd27fd1c1ed8b5b7877299dcc62a67f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-22 09:52:15 +00:00
Alessandro Portale
616e19ff9e Fix warning: "Missing emit keyword on signal call"
[-Wclazy-incorrect-emit]

Change-Id: I93bdc6e23cdaccf35c9899ae16870ccc65a54f80
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-01-17 15:54:56 +00:00
hjk
d9531340ae FakeVim: Disable cursor blinking by default
Add an option to enable

Task-number: QTCREATORBUG-21613
Change-Id: Ia0553f0b89b22c1d5b47487cd6e5b3c3a523cd6d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-12-04 08:08:10 +00:00
Alessandro Portale
df1f975252 FakeVim: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-equals-default

Change-Id: I320a08a99a1d18ab87aec207ec1e03190009b592
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-11-08 21:32:29 +00:00
hjk
96be20d816 FakeVim: Alias C-w C-h/j/k/l to C-w h/j/k/l
In Vim land do as Vim does.

Change-Id: I4172039804fbee2c596f02587028943ac9845164
Task-number: QTCREATORBUG-20923
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-15 06:26:10 +00:00
hjk
b3f4282edc FakeVim: Add support for :wqa
Task-number: QTCREATORBUG-20699
Change-Id: I01e5e69abe9a7192f19d604847443f550a20ef0f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Lukas Holecek <hluk@email.cz>
2018-07-02 14:01:42 +00:00
Alessandro Portale
4317e350f5 Update Options dialog icons
A new set of scalable and themable icons with unified look as provided
by Diana.

Task-number: QTCREATORBUG-20325
Change-Id: I68498b034e9e43fbb61511a38d9c7fc0003ab076
Reviewed-by: hjk <hjk@qt.io>
2018-04-24 14:43:35 +00:00
Eike Ziller
d1ec4c1204 Clean up options page category display name and icon set up
In cases where plugins extend an existing settings category of a plugin
that they depend on anyhow, they do not need to specify the translated
display name and icon for that category.
Some options pages were already not setting the icon, but still the
translated name, which makes even less sense.
Clean up this mess, only setting display name and icon if that is
necessary.

Change-Id: I8bc9d0c51b11d48f1d847337838704d663e70b45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-04-23 11:12:26 +00:00
Tobias Hunger
0a690479d3 FakeVim: Quieten warnings
Quieten warnings about inconsistent use of override and unused
lambda captures.

Change-Id: I576937dfb86343c3e99d18348966093d5a2c3471
Reviewed-by: hjk <hjk@qt.io>
2018-03-06 14:18:09 +00:00
hjk
3ea4b0156c FakeVim: Experiment with hand-written signals
Change-Id: If76c68d3abb42240a279c15cf4b3d4b9e04460bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-03-02 09:07:33 +00:00
David Schulz
a4b5fc00a8 CodeAssist: use shared pointer to pass around proposal models
Task-number: QTCREATORBUG-17752
Change-Id: Ia41f169b86ead209830e6f15764062389ced2b67
Reviewed-by: hjk <hjk@qt.io>
2018-02-27 12:32:36 +00:00
Eike Ziller
7c3cfa166d Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/coreplugin/helpmanager.cpp

Change-Id: I2feb60ec0afb2f22f75dc137a01c3fa217b299d8
2018-02-23 10:56:52 +01:00
Eike Ziller
3060ddbcf3 Document model: Use optional for "indexOf" kind of methods
Change-Id: Iaffbb0b695f96b5b44c9fd0df63891c2797181b7
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-16 08:32:05 +00:00
hjk
25b5433ae9 FakeVim: Squash MSVC warning about supposedly non-captured 'this'
Change-Id: Ibb81d15209d0c71a67f4707aa981b21fae1e3950
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-02-15 07:21:37 +00:00
David Schulz
0eb7bab20c Core: make useMacShortcut constexpr
Change-Id: I293b96428784b6efecac6dae4f2f9690af0027da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-02 13:15:55 +00:00
hjk
5250959bd9 FakeVim: Reorganize internal class dependencies
Initially, this was just meant to remove the nowadays unneeded
object pool registrations, but some of the internal encapsalization
is not much more than line noise. So do what most other plugins do:
Keep a global pointer to most of the 'singleton' data, instead of
passing around one value that will never be different.

Change-Id: I24bf02d1ffa53c8f0d4890db3579a434b1233d42
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@qt.io>
2018-01-26 17:27:15 +00:00
hjk
3c91777e48 Core: Detach status bar handling from global object pool
Instead of relying on addObject notification, provide a
StatusBarManager::addStatusBarWidget() method to create,
register and keep track of an IContext object.

That's essentially what was StatusBarWidget before, but does
not need to be known on the user side. For removal, this
provides a StatusBarManager::destroyStatusBarWidget(),
any not explicitly removed items are handled in response
to ICore::coreAboutToClose()

The StatusBarManager class is fully static now, could
be a namespace.

Change-Id: Ia2bd13b391c3f68c8dfd584b53524a9649cc0787
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-26 10:20:38 +00:00
Eike Ziller
437590a999 Merge remote-tracking branch 'origin/4.6'
Change-Id: I49e8b8442e2b5edffbea19cb2bba97443ebc3d2a
2018-01-23 17:06:59 +01:00
Christian Stenger
8dae0c4613 FakeVim: Correct handling of settings
Fix handling of restoring default values. If the user
restores default values ensure that these changes are
taken into account as well, otherwise the user would
restore the old settings (instead of default settings)
when restarting QC.

When changing command mappings for FakeVim write the
changes immediately to the settings if the user leaves
the options without canceling.

Change-Id: I81ee47af6a208823d4afecb71cbaddcf2d571750
Reviewed-by: hjk <hjk@qt.io>
2018-01-23 06:12:58 +00:00
hjk
8320ae06f7 FakeVim: Use a more standard pattern to add option pages
Change-Id: I4167f98b29226ed9ae8eb630ea9d544db149da2c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-01-18 13:21:03 +00:00
Tobias Hunger
c330cf0679 Replace manual signal blocking/unblocking with QSignalBlocker
Change-Id: Ibb59fab4e37d045e506c5a8172b6f5cbb955b028
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-04 09:35:06 +00:00
hjk
e829ca8e31 FakeVim: Fix gt/gT/:tabnext/:tabprevious
The mapping was there, but not connected to the core actions.

Change-Id: I9faa1c47afe409caaa0462740a6865d99d959b44
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@qt.io>
2017-07-07 15:31:18 +00:00
Eike Ziller
d12f5ca4aa Remove unused IAssistProvider::supportsEditor
Change-Id: Ieb2a36bfddbf4f2cade02cbf62b28d112dcb8f10
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-03 13:23:08 +00:00
Robert Loehning
6c8b1e268a FakeVim: Don't try to read from file which could not be opened
Change-Id: I3468d1a4c9e3ba7bcfd6526f5541b3ec4e84a3e4
Reviewed-by: hjk <hjk@qt.io>
2017-02-17 17:49:19 +00:00
Robert Loehning
5ac44bcf64 FakeVim: Remove dead code
Change-Id: I2e331e1e7ae23f7457cd4e19107fceff85e118e6
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@qt.io>
2017-02-17 16:59:47 +00:00
hjk
7d63c3b899 FakeVim: Compile fix after ef80d060e7
Change-Id: Ifc21a3b24cd8dc546848254d12c86cc8dfcf6f1f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-01-24 11:23:14 +00:00
hjk
ef80d060e7 FakeVim: Remove a few uses of QObject::sender()
Considered bad style...

Change-Id: Idc1d39bd55fa30dfa854bbc99094f5f6ec9afc4d
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@qt.io>
2017-01-24 11:10:12 +00:00
Lukas Holecek
4ecbebace5 FakeVim: Allow plugin interaction before saving file
This allows plugins like Beautifier to interact with the document before
it's saved.

Change-Id: I74f9735214c0fa115635b1809dc467036170ae75
Reviewed-by: hjk <hjk@qt.io>
2017-01-24 10:44:59 +00:00
Eike Ziller
589fedf455 Merge remote-tracking branch 'origin/4.2'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/projectexplorer/kitinformation.cpp

Change-Id: I94299b069418586db97d1d596a252794e4037556
2016-12-20 17:14:19 +01:00
hjk
4721888fa7 FakeVim: Force leaving input mode when switching editors
Change-Id: I9c871cf7b0cba027b8a0ec201dd57f1039c9f4a5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-12-13 08:54:12 +00:00
Tobias Hunger
15cad7dec5 FakeVim: Initialize pointer
Change-Id: Icfb7f733f41593aef09c71d5f8f13f8c453c7cd6
Reviewed-by: hjk <hjk@qt.io>
2016-12-05 13:19:22 +00:00
Alessandro Portale
e809594fae Core: Make IOptionsPage::categoryIcon a Utils::Icon
This is necessary for themable + HighDPI icons in the options dialog.

Change-Id: I8e3ff87a24591af40bb76b39cd970443d7678fae
Reviewed-by: hjk <hjk@qt.io>
2016-09-20 12:52:49 +00:00
hjk
40a9463c56 FakeVim: Expand ~ in some file names
For :read and :source.

Task-number: QTCREATORBUG-11160
Change-Id: I636593a16f9e39c25585c221c5d978e842f4c1d4
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-03 11:16:36 +00:00
Orgad Shaneh
28367148ec FakeVim: Use Qt5-style connects
Change-Id: I85bc7b6e951515768da8473cadcec02cd58d30d3
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-25 07:49:30 +00:00
Tim Jenssen
bd0b76b167 fix build
Change-Id: I11ac4138b8501060da0a125d38481e3b1d6853a9
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-13 12:03:15 +00:00
hjk
d4f5cab923 FakeVim: Modernize
Take advantage of QT_RESTRICTED_CAST_TO_ASCII, auto, etc.

Change-Id: I4602fd6ef5f24b12cb9fe09ce39ad907e76fe259
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-21 11:49:49 +00:00
hjk
bcf7a11c24 Core: Apply 'static' pattern to Core::FindPlugin
Also, rename it to Core::Find. It hasn't been a plugin for a while.

Change-Id: I845885ccf18bdc1440258d523b033758d5583881
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-15 12:43:59 +00:00
hjk
f25bd123eb FakeVim: Simplify FakeVimSettings object
Change-Id: Ic4f4d23af021ed779a500183ca4b145dd3bc3443
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-03 10:14:17 +00:00
Marco Bubke
f41c6b0c4b Clang: Remove TextEditorWidget from AssistProposalItemInterface
Change-Id: I0ac924f88c1347d1b0027c47118b7ed21daf4869
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-02 11:26:58 +00:00
Marco Bubke
c903f4974f TextEditor: Introduce AssistProposalItemInterface
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>
2016-02-01 14:01:35 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Eike Ziller
8261b98d7e Preferences: Options pages need unique IDs
Since we are referring to them by ID without specifying the category in
addition.
This requirement was implicitly added by
592ffe7377

Task-number: QTCREATORBUG-14742
Change-Id: I7be539127b76de90c19b0282565d845fa42010ab
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-08-10 11:55:01 +00:00
Jarek Kobus
716f43f357 FakeVimPlugin: Introduce member initialization.
Change-Id: I0e09933ededd48133662a65da701c228e6c08419
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-18 12:19:21 +00:00
Jarek Kobus
684267179e Properly delete plugins dependent on failed plugin
Init all class member pointers to NULL.
This fixes possible crash on exit when dependent
plugin was not loaded (e.g. TextEditor was missing).
In this case plugin's constructor gets called,
initialize() method is _not_ called
and destructor gets called -> crash.

Properly delete dependent plugins on
a plugin which failed to initialize properly.

Fix labels of deleted plugins inside an error dialog
after pressing "Error Details" from "Installed Plugins"
dialog.

Change-Id: Iddc029a0f07dcba2501d734d142fb0e69e9383d3
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-17 17:00:56 +00:00
Tobias Hunger
6f5accfd98 fakevim: s/Q_DECL_OVERRIDE/override/g
Change-Id: I84c9d5df0b267c5039ce37e3ea4ddc1b83efc2a3
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-04 07:22:32 +00:00
Eike Ziller
25057a7acc Improve keyboard shortcut settings
- change the line edit to accept actual text input in a form similar to
  QKeySequence::fromString (with special "native" form on OS X)
- add a button that allows entering a key sequence by pressing keys,
  including support for e.g. escape key, which was broken before because
  it closed the dialog
- add a warning label, that allows filtering the list for all
  potentially conflicting shortcuts

Task-number: QTCREATORBUG-6
Change-Id: I94fc63525f653127e87f6ef2bffe72d8dcaa867d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-05-15 14:40:45 +00:00