1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

Fixed compilation with Qt 5

This commit is contained in:
nowrep 2013-07-17 16:06:10 +02:00
parent 371250ff15
commit 3a5f8a263b
2 changed files with 6 additions and 4 deletions

View File

@ -42,8 +42,10 @@
#if QT_VERSION >= 0x050000
#include <QUrlQuery>
#include <qpa/qplatformnativeinterface.h>
#elif defined(QZ_WS_X11) && !defined(NO_X11)
#else
#include <QX11Info>
#endif
#if defined(QZ_WS_X11) && !defined(NO_X11)
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#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<char*>(nameData.constData());
classHint.res_class = const_cast<char*>("QupZilla");
XSetClassHint(X11Display(widget), widget->winId(), &classHint);
XSetClassHint((Display*)X11Display(widget), widget->winId(), &classHint);
#else
Q_UNUSED(name)
Q_UNUSED(widget)

View File

@ -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);