更新模块
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.
 
 

43 lines
829 B

#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();
if(argc > 1)
{
APPNAME = argv[1];
APPVERSION = argv[2];
APPDATE = argv[3];
MODIFYCNT = argv[4];
}
else
{
APPNAME = "LaunchControl";
APPVERSION = "0";
}
CHECK_URL = CHECK_URL + APPNAME + "/updates.json";
UpdaterDialog w;
w.show();
return a.exec();
}