Commit 9daf01ef authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: move from Q_WS to Q_OS in MainInterface, QVLCApp and (part of qt4.cpp)

parent 01fcba7f
...@@ -112,7 +112,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -112,7 +112,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
setWindowRole( "vlc-main" ); setWindowRole( "vlc-main" );
setWindowIcon( QApplication::windowIcon() ); setWindowIcon( QApplication::windowIcon() );
setWindowOpacity( var_InheritFloat( p_intf, "qt-opacity" ) ); setWindowOpacity( var_InheritFloat( p_intf, "qt-opacity" ) );
#ifdef Q_WS_MAC #ifdef Q_OS_MAC
setAttribute( Qt::WA_MacBrushedMetal ); setAttribute( Qt::WA_MacBrushedMetal );
#endif #endif
...@@ -1148,7 +1148,7 @@ void MainInterface::handleSystrayClick( ...@@ -1148,7 +1148,7 @@ void MainInterface::handleSystrayClick(
{ {
case QSystemTrayIcon::Trigger: case QSystemTrayIcon::Trigger:
case QSystemTrayIcon::DoubleClick: case QSystemTrayIcon::DoubleClick:
#ifdef Q_WS_MAC #ifdef Q_OS_MAC
VLCMenuBar::updateSystrayMenu( this, p_intf ); VLCMenuBar::updateSystrayMenu( this, p_intf );
#else #else
toggleUpdateSystrayMenu(); toggleUpdateSystrayMenu();
......
...@@ -318,7 +318,7 @@ static bool active = false; ...@@ -318,7 +318,7 @@ static bool active = false;
* Module callbacks * Module callbacks
*****************************************************************************/ *****************************************************************************/
#ifdef Q_WS_MAC #ifdef Q_OS_MAC
/* Used to abort the app.exec() on OSX after libvlc_Quit is called */ /* Used to abort the app.exec() on OSX after libvlc_Quit is called */
#include "../../../lib/libvlc_internal.h" /* libvlc_SetExitHandler */ #include "../../../lib/libvlc_internal.h" /* libvlc_SetExitHandler */
static void Abort( void *obj ) static void Abort( void *obj )
...@@ -369,7 +369,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) ...@@ -369,7 +369,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
/* */ /* */
vlc_sem_init (&ready, 0); vlc_sem_init (&ready, 0);
#ifdef Q_WS_MAC #ifdef Q_OS_MAC
/* Run mainloop on the main thread as Cocoa requires */ /* Run mainloop on the main thread as Cocoa requires */
libvlc_SetExitHandler( p_intf->p_libvlc, Abort, p_intf ); libvlc_SetExitHandler( p_intf->p_libvlc, Abort, p_intf );
Thread( (void *)p_intf ); Thread( (void *)p_intf );
...@@ -388,7 +388,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider ) ...@@ -388,7 +388,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
vlc_sem_destroy (&ready); vlc_sem_destroy (&ready);
busy = active = true; busy = active = true;
#ifndef Q_WS_MAC #ifndef Q_OS_MAC
if( !isDialogProvider ) if( !isDialogProvider )
{ {
RegisterIntf( p_this ); RegisterIntf( p_this );
...@@ -429,7 +429,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -429,7 +429,7 @@ static void Close( vlc_object_t *p_this )
QVLCApp::triggerQuit(); QVLCApp::triggerQuit();
msg_Dbg( p_this, "waiting for UI thread..." ); msg_Dbg( p_this, "waiting for UI thread..." );
#ifndef Q_WS_MAC #ifndef Q_OS_MAC
vlc_join (p_sys->thread, NULL); vlc_join (p_sys->thread, NULL);
#endif #endif
delete p_sys; delete p_sys;
...@@ -465,7 +465,7 @@ static void *Thread( void *obj ) ...@@ -465,7 +465,7 @@ static void *Thread( void *obj )
QSettings::UserScope, "vlc", "vlc-qt-interface" ); QSettings::UserScope, "vlc", "vlc-qt-interface" );
/* Icon setting, Mac uses icon from .icns */ /* Icon setting, Mac uses icon from .icns */
#ifndef Q_WS_MAC #ifndef Q_OS_MAC
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) ) if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )
app.setWindowIcon( QIcon::fromTheme( "vlc-xmas", QIcon( ":/logo/vlc128-xmas.png" ) ) ); app.setWindowIcon( QIcon::fromTheme( "vlc-xmas", QIcon( ":/logo/vlc128-xmas.png" ) ) );
else else
...@@ -526,7 +526,7 @@ static void *Thread( void *obj ) ...@@ -526,7 +526,7 @@ static void *Thread( void *obj )
/* Tell the main LibVLC thread we are ready */ /* Tell the main LibVLC thread we are ready */
vlc_sem_post (&ready); vlc_sem_post (&ready);
#ifdef Q_WS_MAC #ifdef Q_OS_MAC
/* We took over main thread, register and start here */ /* We took over main thread, register and start here */
if( !p_intf->p_sys->b_isDialogProvider ) if( !p_intf->p_sys->b_isDialogProvider )
{ {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <QApplication> #include <QApplication>
#include <QEvent> #include <QEvent>
#if defined(Q_WS_WIN) #if defined(Q_OS_WIN)
# include "qt4.hpp" # include "qt4.hpp"
# include <windows.h> # include <windows.h>
# include "input_manager.hpp" # include "input_manager.hpp"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment