HGUpgrade生成文件名修改

This commit is contained in:
luoliangyi 2022-07-14 12:01:39 +08:00
parent 26421a48c8
commit e2f53a4bd0
4 changed files with 6 additions and 4 deletions

View File

@ -54,7 +54,7 @@ int main(int argc, char *argv[])
while (AppIsRun(appName)) while (AppIsRun(appName))
QThread::msleep(20); QThread::msleep(20);
MainWindow w(pkgPath); MainWindow w(appName, pkgPath);
QScreen *screen = QGuiApplication::primaryScreen(); QScreen *screen = QGuiApplication::primaryScreen();
w.move((screen->size().width() - w.width()) / 2, (screen->size().height() - w.height()) / 2); w.move((screen->size().width() - w.width()) / 2, (screen->size().height() - w.height()) / 2);
w.show(); w.show();

View File

@ -2,9 +2,10 @@
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include "HGUpgrade.h" #include "HGUpgrade.h"
MainWindow::MainWindow(const std::string& pkgPath, QWidget *parent) MainWindow::MainWindow(const std::string &appName, const std::string& pkgPath, QWidget *parent)
: QMainWindow(parent) : QMainWindow(parent)
, ui(new Ui::MainWindow) , ui(new Ui::MainWindow)
, m_appName(appName)
, m_pkgPath(pkgPath) , m_pkgPath(pkgPath)
, m_thread(nullptr) , m_thread(nullptr)
{ {

View File

@ -13,7 +13,7 @@ class MainWindow : public QMainWindow
Q_OBJECT Q_OBJECT
public: public:
MainWindow(const std::string &pkgPath, QWidget *parent = nullptr); MainWindow(const std::string &appName, const std::string &pkgPath, QWidget *parent = nullptr);
~MainWindow(); ~MainWindow();
signals: signals:
@ -25,6 +25,7 @@ private:
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
std::string m_appName;
std::string m_pkgPath; std::string m_pkgPath;
HGThread m_thread; HGThread m_thread;
}; };

View File

@ -20,7 +20,7 @@ RC_ICONS = ../../../app/scanner/image_rsc/logo/logo.ico
# You can also select to disable deprecated APIs only up to a certain version of Qt. # You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
TARGET = HuaGoScanUpgrade TARGET = HGUpgrade
win32 { win32 {
DEFINES += _CRT_SECURE_NO_WARNINGS DEFINES += _CRT_SECURE_NO_WARNINGS