Commit Graph

7 Commits

Author SHA1 Message Date
Christian Kandeler
8e75381fce CppEditor: Give C++ file name settings a per-project variant
Fixes: QTCREATORBUG-22033
Change-Id: If37517bb091438e70c5af5102bf833ed46d0c951
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-08 08:23:01 +00:00
Loren Burkholder
6c0f2b1c63 Use a more logical code style
This adds C++11-style initializers and breaks the initializer list into a new line, since most classes will have other members to be put in new lines as well.

Change-Id: I7b6d6bf6f32dbd58a744405aefabb02be9f45316
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-22 16:38:41 +00:00
Christian Kandeler
e735e95f06 "New Class" wizard: Check custom base class for QObject parent
That is, if the user specifies a custom base class, we check whether its
constructor takes a "QObject *parent" parameter, and if it does, we give
the derived class one as well.
This is technically a heuristic, but the pattern is pretty stable in the
Qt world.

Fixes: QTCREATORBUG-25156
Change-Id: Ie64440929df61cca7258d6d692c5de62970f9a65
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-25 08:58:24 +00:00
Christian Kandeler
a296b84dc4 Wizards: Fix include statements
The header file must be referenced relative to the location of the
source file.

Task-number: QTCREATORBUG-15599
Change-Id: Ib7d4aa5a62a94541cbe32cd340a8a1e7d6ef35e5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-04-30 10:47:44 +00:00
Marco Bubke
c53a8da3a1 Honor Rule of three (or five) in the class wizard
It is very often a mistake to define a destructor without a copy (and move)
constructor and assignment operator. In C++11 no move constructor and
assignment operator will be generated if a destructor is defined. So it is
better to omit a lonely destructor in out template.

https://en.wikipedia.org/wiki/Rule_of_three_%28C%2B%2B_programming%29

Change-Id: If911556f872d878939f0f2fcaa974494a4df8a8a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-11-27 13:50:35 +01:00
Tobias Hunger
d2eb042676 JsonWizard: Remove empty lines
Task-number: QTCREATORBUG-13289
Change-Id: I2c8d1fc4e2cfcb940e76a6988d35e80703548668
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-11-03 15:38:47 +01:00
Tobias Hunger
50df8aa984 JsonWizard: Replace CppClassWizard with a JsonWizard
Change-Id: I4e1aeea4ccd1087b5e804e9ba4c2aa8fde4f4fcb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-10-15 18:21:49 +02:00