mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
Check for HAVE_X11 instead of Q_OS_LINUX in bringToFront
This commit is contained in:
parent
9711421d8b
commit
a02c00d68d
@ -159,9 +159,14 @@ if( NOT BUILD_WITH_QT4 )
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
if(UNIX AND NOT APPLE)
|
||||
find_package(Qt5X11Extras REQUIRED NO_MODULE)
|
||||
find_package(Qt5X11Extras NO_MODULE)
|
||||
|
||||
if(Qt5X11Extras_FOUND)
|
||||
set(HAVE_X11 TRUE)
|
||||
else()
|
||||
set(HAVE_X11 FALSE)
|
||||
endif()
|
||||
|
||||
message(STATUS "Found Qt5! Be aware that Qt5-support is still experimental and not officially supported!")
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
|
@ -41,17 +41,15 @@
|
||||
#include <QDesktopServices>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#ifdef Q_OS_LINUX
|
||||
#include <QWindow>
|
||||
#include <QX11Info>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//FIXME: Qt5: this doesnt fail because Q_WS_X11 is deprecated
|
||||
//TODO: change to Q_OS_X11 and fix errors
|
||||
#ifdef Q_WS_X11
|
||||
#include <libqnetwm/netwm.h>
|
||||
#ifdef HAVE_X11
|
||||
#include <QWindow>
|
||||
#include <QX11Info>
|
||||
#endif
|
||||
#else
|
||||
#ifdef Q_WS_X11
|
||||
#include <QX11Info>
|
||||
#include <libqnetwm/netwm.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
@ -356,8 +354,7 @@ bringToFront()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#else // Qt5
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
|
@ -25,5 +25,6 @@
|
||||
#cmakedefine TOMAHAWK_FINEGRAINED_MESSAGES
|
||||
#cmakedefine COMPLEX_TAGLIB_FILENAME
|
||||
#cmakedefine HAVE_VLC_ALBUMARTIST
|
||||
#cmakedefine HAVE_X11
|
||||
|
||||
#endif // CONFIG_H_IN
|
||||
|
Loading…
x
Reference in New Issue
Block a user