mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 21:18:43 +02:00
I think last fixes
This commit is contained in:
parent
825c64e1d0
commit
f6bc7a2c4b
2 changed files with 8 additions and 11 deletions
|
@ -22,34 +22,32 @@
|
|||
UpdateDialog::UpdateDialog(QWidget *parent, QString releaseNotes, QString latestVersion, QUrl downloadURL) :
|
||||
QWidget(parent, Qt::Widget) {
|
||||
|
||||
Application* application = Application::getInstance();
|
||||
|
||||
_latestVersion = new QString(latestVersion);
|
||||
|
||||
QUiLoader updateDialogLoader;
|
||||
|
||||
QWidget* updateDialog;
|
||||
QFile updateDialogUi("resources/ui/updateDialog.ui");
|
||||
updateDialogUi.open(QFile::ReadOnly);
|
||||
_dialogWidget = updateDialogLoader.load(&updateDialogUi, this);
|
||||
updateDialog = updateDialogLoader.load(&updateDialogUi, this);
|
||||
|
||||
QString updateRequired = QString("You are currently running build %1, the latest build released is %2. \
|
||||
Please download and install the most recent release to access the latest features and bug fixes.")
|
||||
.arg(application->applicationVersion(), latestVersion);
|
||||
.arg(Application::getInstance()->applicationVersion(), latestVersion);
|
||||
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
QPushButton* downloadButton = _dialogWidget->findChild<QPushButton*>("downloadButton");
|
||||
QPushButton* skipButton = _dialogWidget->findChild<QPushButton*>("skipButton");
|
||||
QPushButton* closeButton = _dialogWidget->findChild<QPushButton*>("closeButton");
|
||||
QLabel* updateContent = _dialogWidget->findChild<QLabel*>("updateContent");
|
||||
QPushButton* downloadButton = updateDialog->findChild<QPushButton*>("downloadButton");
|
||||
QPushButton* skipButton = updateDialog->findChild<QPushButton*>("skipButton");
|
||||
QPushButton* closeButton = updateDialog->findChild<QPushButton*>("closeButton");
|
||||
QLabel* updateContent = updateDialog->findChild<QLabel*>("updateContent");
|
||||
|
||||
updateContent->setText(updateRequired);
|
||||
|
||||
connect(downloadButton, SIGNAL(released()), this, SLOT(handleDownload()));
|
||||
connect(skipButton, SIGNAL(released()), this, SLOT(handleSkip()));
|
||||
connect(closeButton, SIGNAL(released()), this, SLOT(handleClose()));
|
||||
_dialogWidget->show();
|
||||
updateDialog->show();
|
||||
}
|
||||
|
||||
void UpdateDialog::handleDownload() {
|
||||
|
|
|
@ -21,7 +21,6 @@ public:
|
|||
UpdateDialog(QWidget* parent, QString releaseNotes, QString latestVersion, QUrl downloadURL);
|
||||
|
||||
private:
|
||||
QWidget* _dialogWidget;
|
||||
QString* _latestVersion;
|
||||
|
||||
private slots:
|
||||
|
|
Loading…
Reference in a new issue