You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#include <QApplication>
|
|
|
|
#include "updaterdialog.h"
|
|
|
|
|
|
|
|
void loadQss()
|
|
|
|
{
|
|
|
|
QFile f(":qdarkstyle/dark/darkstyle.qss");
|
|
|
|
// QFile f(":qdarkstyle/light/lightstyle.qss");
|
|
|
|
if (!f.exists())
|
|
|
|
{
|
|
|
|
printf("Unable to set stylesheet, file not found\n");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
f.open(QFile::ReadOnly | QFile::Text);
|
|
|
|
QTextStream ts(&f);
|
|
|
|
qApp->setStyleSheet(ts.readAll());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QApplication a(argc, argv);
|
|
|
|
|
|
|
|
loadQss();
|
|
|
|
UpdaterDialog w;
|
|
|
|
|
|
|
|
if(argc > 1)
|
|
|
|
{
|
|
|
|
APPNAME = argv[1];
|
|
|
|
APPVERSION = argv[2];
|
|
|
|
APPDATE = argv[3];
|
|
|
|
MODIFYCNT = argv[4];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
APPNAME = "";
|
|
|
|
APPVERSION = "0";
|
|
|
|
}
|
|
|
|
// FlightDataAnalysis
|
|
|
|
CHECK_URL = ORIGIN_URL + APPNAME + "/updates.json";
|
|
|
|
|
|
|
|
w.show();
|
|
|
|
return a.exec();
|
|
|
|
}
|