This commit is contained in:
Jason Wen
2024-05-31 02:35:10 -04:00
parent a57fd5585c
commit 0842d8ace0
+3 -3
View File
@@ -36,7 +36,7 @@ int main(int argc, char *argv[]) {
QPushButton *btn = new QPushButton();
QPushButton *update_btn = new QPushButton();
update_btn->setText(QObject::tr("Update"));
//#ifdef __aarch64__
#ifdef __aarch64__
btn->setText(QObject::tr("Reboot"));
QFutureWatcher<void> watcher;
QObject::connect(&watcher, &QFutureWatcher<void>::finished, [btn]() {
@@ -57,11 +57,11 @@ int main(int argc, char *argv[]) {
});
watcher.setFuture(future);
});
//#else
#else
update_btn->setEnabled(false);
btn->setText(QObject::tr("Exit"));
QObject::connect(btn, &QPushButton::clicked, &a, &QApplication::quit);
//#endif
#endif
main_layout->addWidget(btn, 0, 0, Qt::AlignRight | Qt::AlignBottom);
main_layout->addWidget(update_btn, 0, 0, Qt::AlignLeft | Qt::AlignBottom);