Skip to content

Commit

Permalink
Comment out Win task bar code for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Abestanis committed Oct 8, 2024
1 parent b46d5b1 commit 457a97b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions src/updatedownloaddialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
#include "ui_updatedownloaddialog.h"

#ifdef Q_OS_WIN
# include <QtWinExtras/QWinTaskbarProgress>
//# include <QtWinExtras/QWinTaskbarProgress>
#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);
Expand All @@ -21,7 +21,7 @@ UpdateDownloadDialog::UpdateDownloadDialog(QWidget* parent) :

UpdateDownloadDialog::~UpdateDownloadDialog() {
#ifdef Q_OS_WIN
delete taskBarButton;
// delete taskBarButton;
#endif
delete ui;
actionButton->deleteLater();
Expand All @@ -34,17 +34,17 @@ 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
}

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?"));
Expand All @@ -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;
}
Expand All @@ -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
}

Expand All @@ -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
}
4 changes: 2 additions & 2 deletions src/updatedownloaddialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <QPushButton>

#ifdef Q_OS_WIN
# include <QtWinExtras/QWinTaskbarButton>
//# include <QtWinExtras/QWinTaskbarButton>
#endif

namespace Ui {
Expand Down Expand Up @@ -76,7 +76,7 @@ private Q_SLOTS:
/**
* The windows task-bar button.
*/
QWinTaskbarButton* taskBarButton = nullptr;
// QWinTaskbarButton* taskBarButton = nullptr;
#endif
};

Expand Down

0 comments on commit 457a97b

Please sign in to comment.