Permalink
Browse files

ErrorReport: Fix Qt4 build

  • Loading branch information...
dscharrer committed May 28, 2017
1 parent 94e8f2d commit 9da6fdc2a562ada3848d6c0995260f560839a786
Showing with 6 additions and 0 deletions.
  1. +6 −0 tools/crashreporter/ErrorReport.cpp
@@ -35,7 +35,11 @@
#include <QFileInfoList>
#include <QThread>
#include <QByteArray>

#include <QtGlobal>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#include <QWindow>
#endif

// Boost
#include <boost/date_time/posix_time/posix_time_types.hpp>
@@ -80,6 +84,7 @@ bool ErrorReport::Initialize() {
// Our SharedCrashInfo will be stored in this shared memory.
m_pCrashInfo = (CrashInfo*)m_MemoryMappedRegion.get_address();

#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
if(m_pCrashInfo->window) {
QWindow * window = QWindow::fromWinId(m_pCrashInfo->window);
if(window) {
@@ -89,6 +94,7 @@ bool ErrorReport::Initialize() {
window->setMouseGrabEnabled(false);
}
}
#endif

} catch(...) {
m_pCrashInfo = NULL;

0 comments on commit 9da6fdc

Please sign in to comment.