From 457a97bf8ef79355d61c52f4adecbc4ca01f0b81 Mon Sep 17 00:00:00 2001 From: Abestanis Date: Wed, 9 Oct 2024 01:50:30 +0200 Subject: [PATCH] Comment out Win task bar code for now --- src/updatedownloaddialog.cpp | 22 +++++++++++----------- src/updatedownloaddialog.h | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/updatedownloaddialog.cpp b/src/updatedownloaddialog.cpp index db8feba8..40475204 100644 --- a/src/updatedownloaddialog.cpp +++ b/src/updatedownloaddialog.cpp @@ -2,14 +2,14 @@ #include "ui_updatedownloaddialog.h" #ifdef Q_OS_WIN -# include +//# include #endif UpdateDownloadDialog::UpdateDownloadDialog(QWidget* parent) : QDialog(parent), ui(new Ui::UpdateDownloadDialog) { #ifdef Q_OS_WIN - taskBarButton = new QWinTaskbarButton(this); +// taskBarButton = new QWinTaskbarButton(this); #endif ui->setupUi(this); actionButton = new QPushButton(tr("Background"), this); @@ -21,7 +21,7 @@ UpdateDownloadDialog::UpdateDownloadDialog(QWidget* parent) : UpdateDownloadDialog::~UpdateDownloadDialog() { #ifdef Q_OS_WIN - delete taskBarButton; +// delete taskBarButton; #endif delete ui; actionButton->deleteLater(); @@ -34,8 +34,8 @@ void UpdateDownloadDialog::reset() { ui->progressBar->setValue(0); ui->progressBar->show(); #ifdef Q_OS_WIN - taskBarButton->progress()->reset(); - taskBarButton->progress()->show(); +// taskBarButton->progress()->reset(); +// taskBarButton->progress()->show(); #endif } @@ -43,8 +43,8 @@ void UpdateDownloadDialog::onDownloadComplete() { downloadCompleted = true; ui->progressBar->hide(); #ifdef Q_OS_WIN - taskBarButton->progress()->setRange(0, 100); - taskBarButton->progress()->setValue(100); +// taskBarButton->progress()->setRange(0, 100); +// taskBarButton->progress()->setValue(100); #endif actionButton->setText( QCoreApplication::translate("UpdateDialog", "Update and restart")); ui->label->setText(tr("Download finished. Restart and update Birdtray?")); @@ -58,7 +58,7 @@ void UpdateDownloadDialog::onDownloadProgress(qint64 bytesReceived, qint64 bytes ui->label->setText(tr("Downloading Birdtray installer...")); ui->progressBar->setRange(0, 0); #ifdef Q_OS_WIN - taskBarButton->progress()->setRange(0, 0); +// taskBarButton->progress()->setRange(0, 0); #endif return; } @@ -70,8 +70,8 @@ void UpdateDownloadDialog::onDownloadProgress(qint64 bytesReceived, qint64 bytes ui->progressBar->setRange(0, 100); ui->progressBar->setValue(percent); #ifdef Q_OS_WIN - taskBarButton->progress()->setRange(0, 100); - taskBarButton->progress()->setValue(percent); +// taskBarButton->progress()->setRange(0, 100); +// taskBarButton->progress()->setValue(percent); #endif } @@ -90,6 +90,6 @@ void UpdateDownloadDialog::onActionPressed() { void UpdateDownloadDialog::showEvent(QShowEvent* event) { QDialog::showEvent(event); #ifdef Q_OS_WIN - taskBarButton->setWindow(windowHandle()); +// taskBarButton->setWindow(windowHandle()); #endif } diff --git a/src/updatedownloaddialog.h b/src/updatedownloaddialog.h index ea841b02..298ef2e6 100644 --- a/src/updatedownloaddialog.h +++ b/src/updatedownloaddialog.h @@ -5,7 +5,7 @@ #include #ifdef Q_OS_WIN -# include +//# include #endif namespace Ui { @@ -76,7 +76,7 @@ private Q_SLOTS: /** * The windows task-bar button. */ - QWinTaskbarButton* taskBarButton = nullptr; +// QWinTaskbarButton* taskBarButton = nullptr; #endif };