mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Ref T730, style
* set object name * use m_XYZ member name
This commit is contained in:
committed by
Mat Sutcliffe
parent
c604ced11c
commit
857e3581b0
@@ -29,17 +29,15 @@ int main(int argc, char *argv[])
|
||||
QGuiApplication qa(argc, argv);
|
||||
|
||||
BlackCore::registerMetadata();
|
||||
|
||||
BlackCore::CApplication a("sampleafvclient", CApplicationInfo::Sample);
|
||||
|
||||
CAfvMapReader *afvMapReader = new CAfvMapReader(&a);
|
||||
afvMapReader->updateFromMap();
|
||||
|
||||
CAfvClient *voiceClient = new CAfvClient("https://voice1.vatsim.uk", &qa);
|
||||
CAfvClient *voiceClient = new CAfvClient("https://voice1.vatsim.uk", &qa);
|
||||
voiceClient->start(QThread::TimeCriticalPriority); // background thread
|
||||
CAfvClientBridge *voiceClientBridge = new CAfvClientBridge(voiceClient, &qa);
|
||||
|
||||
voiceClient->start(QThread::TimeCriticalPriority);
|
||||
|
||||
QObject::connect(&qa, &QCoreApplication::aboutToQuit, [voiceClient]()
|
||||
{
|
||||
voiceClient->quitAndWait();
|
||||
@@ -56,8 +54,8 @@ int main(int argc, char *argv[])
|
||||
QQmlApplicationEngine engine;
|
||||
QQmlContext *ctxt = engine.rootContext();
|
||||
ctxt->setContextProperty("afvMapReader", afvMapReader);
|
||||
ctxt->setContextProperty("voiceClient", voiceClientBridge);
|
||||
ctxt->setContextProperty("userName", defaultUserName);
|
||||
ctxt->setContextProperty("voiceClient", voiceClientBridge);
|
||||
ctxt->setContextProperty("userName", defaultUserName);
|
||||
|
||||
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
return a.exec();
|
||||
|
||||
Reference in New Issue
Block a user