Commit Graph

12 Commits

Author SHA1 Message Date
Leander Schulten
5b5ae97104 CppEditor: Introduce QuickFix settings and unify getter/setter generation
Introduces a QuickFix settings page where the generation of getters and
setters can be customized. The settings can be saved into a file that can
go into a VCS. All QuickFixes that generate getter/setter/signals/
Q_PROPERTIES now use the same backend. QuickFixes that generate getters/
setters are now extended to also generate signals and Q_PROPERTIES.

Fixes: QTCREATORBUG-1532
Fixes: QTCREATORBUG-17941
Fixes: QTCREATORBUG-12678
Fixes: QTCREATORBUG-15779
Fixes: QTCREATORBUG-11620
Fixes: QTCREATORBUG-22707
Fixes: QTCREATORBUG-20157
Fixes: QTCREATORBUG-21804
Fixes: QTCREATORBUG-19814
Fixes: QTCREATORBUG-14622
Fixes: QTCREATORBUG-19803
Change-Id: I50ed2dad9b4a637fbd87b3e1f2856060ad0ad920
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-14 10:12:44 +00:00
Jarek Kobus
f6659f24df Fix layout of the code style settings editor
Fixes: QTCREATORBUG-23227
Change-Id: I1ae650ba1e66c9444ef0d7fe17d003e5d6662b77
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-06 10:54:13 +00:00
Robert Loehning
37aea43479 Don't translate default windowTitle again and again
Change-Id: I4b4ff16e02c517bcd5a7c5ae73f62dd2a5bcc7cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-03-06 14:57:40 +00:00
Nikolai Kosjar
1ea6404337 CppTools: Allow prefering getter names with "get" prefix
We default to "foo()" for e.g. a member variable "m_foo", but other
coding styles require "getFoo()".

Task-number: QTCREATORBUG-16452
Change-Id: I9ccfdf88e4c469bc1c06fde855ad754faf2bd238
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-06-22 12:22:57 +00:00
Nikolai Kosjar
b8dbac0b9c Rename "[Mm]ethod(s)" to "[Ff]unction(s)"
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.

This is a follow-up patch to commit 872bfb7.

Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-10 15:56:12 +02:00
Nikolai Kosjar
8fe25d0a4a C++: Add settings dialog for pointer declaration formatting
The dialog is at Tools > Options > C++ > Code Style > Edit... > Pointers
and References.

Currently the settings are referenced when applying the following
QuickFixes:
 - Adapting function signature in declaration/definition
   (FunctionDeclDefLink)
 - Inserting declaration from definition (InsertDeclOperation)
 - Inserting definition from declaration (InsertDefOperation)
 - Extracting a function (ExtractFunctionOperation)
 - Add Local Declaration (AddLocalDeclarationOp::Operation)

In these cases the code style of the current project is used. If there
is no current project open, the current global code style is used.

Task-number: QTCREATORBUG-6169

Change-Id: I3e4e502b3103f7f754ac9b39594ad461d89d9304
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-01-24 11:59:40 +01:00
Christian Kamm
09f56a5c0d C++ code style: Improve tooltip.
Change-Id: Ib71e3b87bd07292b0aecdbec7ebfb1fcd0efea7e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
2011-11-22 14:49:06 +01:00
Jarek Kobus
2244911826 Implement Code Style schemes
Task-number: QTCREATORBUG-5092

Change-Id: I218cef02f7c242e4dfae59b1b8021ea618e60d07
Reviewed-on: http://codereview.qt-project.org/5160
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-23 10:23:15 +02:00
Friedemann Kleint
0ef59d9970 tr()-Fixes for 2.3: Small spelling/notr-fixes.
Change-Id: I66b8b0e20b225429b4399dfca154a2806260ac61
Reviewed-on: http://codereview.qt.nokia.com/483
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-06-15 17:25:36 +02:00
Jarek Kobus
2fad22c030 Add restore fallback functionality, make better tr()
Task-number: QTCREATORBUG-5025
Change-Id: Ia3f6fa2380dd1a93f120873f584662a267ca4d50
Reviewed-on: http://codereview.qt.nokia.com/360
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-06-08 13:27:52 +02:00
Christian Kamm
312f6d0ff1 C++ style settings: Compile fix for namespaced Qt.
Change-Id: I89db5239576385823315443474669f5fd9ef69b4
Reviewed-on: http://codereview.qt.nokia.com/87
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk
2011-05-24 16:00:06 +02:00
Christian Kamm
779fafcbfe Make C++ code style configurable.
Change-Id: Iaf08edb2361146e6b5e1cbafdb716a23c938875b
Done-with: Jarek Kobus
Task-number: QTCREATORBUG-2670
Task-number: QTCREATORBUG-4310
Task-number: QTCREATORBUG-2763
Task-number: QTCREATORBUG-3623
Task-number: QTCREATORBUG-567
Reviewed-on: http://codereview.qt.nokia.com/74
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-05-24 12:45:07 +02:00