Skip to content

Commit 399d5f6

Browse files
committed
check info dialog on mac
1 parent 9cf71d2 commit 399d5f6

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

AutoUpdaterCore/updater_p.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void UpdaterPrivate::appAboutToExit()
251251
}
252252

253253
if(!ok) {
254-
qWarning() << "Unable to start" << toolInfo.absolutePath()
254+
qWarning() << "Unable to start" << toolInfo.absoluteFilePath()
255255
<< "with arguments" << this->runArguments
256256
<< "as" << (this->adminAuth ? "admin" : "user");
257257
}

AutoUpdaterGui/updateinfodialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ UpdateInfoDialog::DialogResult UpdateInfoDialog::showUpdateInfo(QList<Updater::U
7373
mBox.setCheckBox(cBox);
7474

7575
mBox.setDefaultButton(mBox.addButton(tr("Install Now"), QMessageBox::AcceptRole));
76-
mBox.addButton(tr("Install On Exit"), QMessageBox::ActionRole);
76+
mBox.addButton(tr("Install On Exit"), QMessageBox::ApplyRole);
7777
mBox.setEscapeButton(mBox.addButton(tr("Install later"), QMessageBox::RejectRole));
7878

7979
DialogResult res;
@@ -82,7 +82,7 @@ UpdateInfoDialog::DialogResult UpdateInfoDialog::showUpdateInfo(QList<Updater::U
8282
case QMessageBox::AcceptRole:
8383
res = InstallNow;
8484
break;
85-
case QMessageBox::ActionRole:
85+
case QMessageBox::ApplyRole:
8686
res = InstallLater;
8787
break;
8888
case QMessageBox::RejectRole:

Tests/WidgetsTest/mainwindow.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ void MainWindow::on_activeBox_toggled(bool checked)
8383
this->controller->setDetailedUpdateInfo(this->ui->detailedInfoDialogCheckBox->isChecked());
8484
this->ui->menuHelp->addAction(this->controller->createUpdateAction(this));
8585
this->ui->mainToolBar->addAction(this->controller->createUpdateAction(this));
86+
#ifdef Q_OS_OSX
87+
QMenu *dockMenu = new QMenu(this);
88+
QAction *action = this->controller->createUpdateAction(this);
89+
action->setMenuRole(QAction::NoRole);
90+
dockMenu->addAction(action);
91+
qt_mac_set_dock_menu(dockMenu);
92+
#endif
8693
connect(this->controller, &QtAutoUpdater::UpdateController::runningChanged, this, [this](bool running){
8794
this->statusBar()->showMessage(running ? "running" : "not running");
8895
});

0 commit comments

Comments
 (0)