Qt Designer: Fix some clang warnings

- Use using instead of typedef
- User member initialization
- Use nullptr
- Do not use else after return
- Delete pointers unconditionally
- Fix some integer conversion warnings
- Use auto for new/casts to avoid type name repetition
- Use = default for trivial destructors

Task-number: QTCREATORBUG-23248
Change-Id: I0a7465d3aa200b5c862bec82636d2d22ddf8297b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Friedemann Kleint
2019-11-25 14:23:33 +01:00
parent f9c1795d3b
commit b96bf86f18
14 changed files with 41 additions and 52 deletions

View File

@@ -105,7 +105,7 @@ bool FormEditorPlugin::initialize(const QStringList &arguments, QString *error)
// Ensure that loading designer translations is done before FormEditorW is instantiated
const QString locale = ICore::userInterfaceLanguage();
if (!locale.isEmpty()) {
QTranslator *qtr = new QTranslator(this);
auto qtr = new QTranslator(this);
const QString &creatorTrPath = ICore::resourcePath() + "/translations";
const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
const QString &trFile = "designer_" + locale;