mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
/* Copyright (C) 2013 VATSIM Community / authors
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
#include <QCoreApplication>
|
|
|
|
#include "samplesphysicalquantities.h"
|
|
#include "samplesaviation.h"
|
|
#include "blackmisc/blackmiscfreefunctions.h"
|
|
|
|
using namespace BlackMisc;
|
|
using namespace BlackMiscTest;
|
|
|
|
/*!
|
|
* Sample tests
|
|
*/
|
|
int main(int argc, char *argv[])
|
|
{
|
|
BlackMisc::initResources();
|
|
QFile file(":blackmisc/translations/blackmisc_i18n_de.qm");
|
|
qDebug() << (file.exists() ? "Found translations in resources" : "No translations in resources");
|
|
QTranslator translator;
|
|
bool t = translator.load("blackmisc_i18n_de", ":blackmisc/translations/");
|
|
qDebug() << (t ? "Translator loaded" : "Translator not loaded");
|
|
|
|
QCoreApplication a(argc, argv);
|
|
|
|
qDebug() << "Use I18N version, y? n?";
|
|
int yn = getchar();
|
|
t = (yn == 'y' || yn == 'Y');
|
|
t = t ? a.installTranslator(&translator) : false;
|
|
qDebug() << (t ? "Installed translator" : "No translator ");
|
|
|
|
CSamplesPhysicalQuantities::samples();
|
|
CSamplesAviation::samples();
|
|
|
|
return a.exec();
|
|
}
|