diff --git a/src/lib/tools/qztools.cpp b/src/lib/tools/qztools.cpp index 5b9951eca..793a4e493 100644 --- a/src/lib/tools/qztools.cpp +++ b/src/lib/tools/qztools.cpp @@ -42,8 +42,10 @@ #if QT_VERSION >= 0x050000 #include #include -#elif defined(QZ_WS_X11) && !defined(NO_X11) +#else #include +#endif +#if defined(QZ_WS_X11) && !defined(NO_X11) #include #include #endif @@ -647,7 +649,7 @@ QString QzTools::escape(const QString &string) } #if defined(QZ_WS_X11) && !defined(NO_X11) -Display* QzTools::X11Display(const QWidget* widget) +void *QzTools::X11Display(const QWidget* widget) { Q_UNUSED(widget) @@ -667,7 +669,7 @@ void QzTools::setWmClass(const QString &name, const QWidget* widget) XClassHint classHint; classHint.res_name = const_cast(nameData.constData()); classHint.res_class = const_cast("QupZilla"); - XSetClassHint(X11Display(widget), widget->winId(), &classHint); + XSetClassHint((Display*)X11Display(widget), widget->winId(), &classHint); #else Q_UNUSED(name) Q_UNUSED(widget) diff --git a/src/lib/tools/qztools.h b/src/lib/tools/qztools.h index 4f1b3f790..131fef9e1 100644 --- a/src/lib/tools/qztools.h +++ b/src/lib/tools/qztools.h @@ -74,7 +74,7 @@ bool QT_QUPZILLA_EXPORT isCertificateValid(const QSslCertificate &cert); QString QT_QUPZILLA_EXPORT escape(const QString &string); #if defined(QZ_WS_X11) && !defined(NO_X11) -Display* X11Display(const QWidget* widget); +void* X11Display(const QWidget* widget); #endif void QT_QUPZILLA_EXPORT setWmClass(const QString &name, const QWidget* widget);