diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-04-08 17:14:33 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-04-09 06:48:12 +0000 |
commit | 8d060e69105f7c5705ba5c3a600c948467118f5e (patch) | |
tree | 9a1e985095a45bf3a844ee0da55b537e0001fd28 /src/libs/installer/performinstallationform.cpp | |
parent | 62a65d9f88435060926e7c79f851b6516bd3d81d (diff) |
Fix crash on exit for Windows XP, Vista
The destructor of QWinTaskBarButton until Qt 5.4.2 crashes on exit
if the OS is older than Windows 7.
Task-number: QTIFW-652
Change-Id: Icd0255f79f7339937f129cddce7291997d652f72
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/performinstallationform.cpp')
-rw-r--r-- | src/libs/installer/performinstallationform.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/libs/installer/performinstallationform.cpp b/src/libs/installer/performinstallationform.cpp index 24d06d59f..459e94591 100644 --- a/src/libs/installer/performinstallationform.cpp +++ b/src/libs/installer/performinstallationform.cpp @@ -89,8 +89,12 @@ PerformInstallationForm::PerformInstallationForm(QObject *parent) , m_updateTimer(0) { #ifdef Q_OS_WIN - m_taskButton = new QWinTaskbarButton(this); - m_taskButton->progress()->setVisible(true); + if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { + m_taskButton = new QWinTaskbarButton(this); + m_taskButton->progress()->setVisible(true); + } else { + m_taskButton = 0; + } #endif } @@ -177,9 +181,11 @@ void PerformInstallationForm::updateProgress() m_progressBar->setValue(progressPercentage); #ifdef Q_OS_WIN - if (!m_taskButton->window()) - m_taskButton->setWindow(QApplication::activeWindow()->windowHandle()); - m_taskButton->progress()->setValue(progressPercentage); + if (m_taskButton) { + if (!m_taskButton->window()) + m_taskButton->setWindow(QApplication::activeWindow()->windowHandle()); + m_taskButton->progress()->setValue(progressPercentage); + } #endif static QString lastLabelText; |