mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
None of this works, but maybe it's a start since Qt directly isn't
working
This commit is contained in:
@@ -72,6 +72,10 @@ ELSE()
|
||||
LIST(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" )
|
||||
ENDIF()
|
||||
|
||||
IF( BUILD_GUI AND UNIX AND NOT APPLE )
|
||||
FIND_PACKAGE( X11 )
|
||||
ENDIF()
|
||||
|
||||
macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
|
||||
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether \n the qtwebkit-devel package is installed as well")
|
||||
|
||||
|
@@ -426,6 +426,10 @@ IF( UNIX AND NOT APPLE )
|
||||
infosystem/infoplugins/unix/mprispluginplayeradaptor.h
|
||||
infosystem/infoplugins/unix/mprisplugin.h
|
||||
infosystem/infoplugins/unix/fdonotifyplugin.h )
|
||||
|
||||
IF( BUILD_GUI AND X11_FOUND )
|
||||
SET( LINK_LIBRARIES ${LINK_LIBRARIES} ${X11_LIBRARIES} )
|
||||
ENDIF()
|
||||
ENDIF( UNIX AND NOT APPLE )
|
||||
|
||||
IF( WIN32 )
|
||||
|
@@ -42,12 +42,12 @@
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
#include <QtGui/QApplication>
|
||||
#if defined(Q_WS_X11)
|
||||
#include "tomahawkapp.h"
|
||||
#include "tomahawkwindow.h"
|
||||
#elif defined(Q_WS_WIN)
|
||||
#include "tomahawkapp.h"
|
||||
#include "tomahawkwindow.h"
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
extern "C" {
|
||||
#include <X11/Xlib.h>
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -519,12 +519,30 @@ setNam( QNetworkAccessManager* nam )
|
||||
s_nam = QWeakPointer< QNetworkAccessManager >( nam );
|
||||
}
|
||||
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
#if defined(Q_WS_X11)
|
||||
void
|
||||
bringToFront()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
QWidgetList widgetList = qApp->topLevelWidgets();
|
||||
int i = 0;
|
||||
while( !widgetList.at( i )->isWindow() )
|
||||
i++;
|
||||
QWidget *widget = widgetList.at( i );
|
||||
|
||||
WId winId = widget->winId();
|
||||
Display *display = XOpenDisplay( NULL );
|
||||
if ( !display )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "Could not find display to raise";
|
||||
return;
|
||||
}
|
||||
|
||||
XRaiseWindow( display, winId );
|
||||
XSetInputFocus( display, winId, RevertToNone, CurrentTime );
|
||||
//widget->activateWindow();
|
||||
//widget->raise();
|
||||
}
|
||||
#elif defined(Q_WS_WIN)
|
||||
void
|
||||
|
@@ -21,11 +21,11 @@
|
||||
|
||||
#include "dllmacro.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QThread>
|
||||
#include <QNetworkProxy>
|
||||
#include <QStringList>
|
||||
#include <QRect>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtNetwork/QNetworkProxy>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QRect>
|
||||
|
||||
#define RESPATH ":/data/"
|
||||
|
||||
|
Reference in New Issue
Block a user