forked from qt-creator/qt-creator
Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
26 lines
678 B
C++
26 lines
678 B
C++
// Copyright (C) 2022 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
|
#include "textfinder.h"
|
|
|
|
#include <QApplication>
|
|
#include <QLocale>
|
|
#include <QTranslator>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication a(argc, argv);
|
|
|
|
QTranslator translator;
|
|
const QStringList uiLanguages = QLocale::system().uiLanguages();
|
|
for (const QString &locale : uiLanguages) {
|
|
const QString baseName = "TextFinder_" + QLocale(locale).name();
|
|
if (translator.load(":/i18n/" + baseName)) {
|
|
a.installTranslator(&translator);
|
|
break;
|
|
}
|
|
}
|
|
TextFinder w;
|
|
w.show();
|
|
return a.exec();
|
|
}
|