1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 22:26:32 +02:00

replaced Q_WS_WIN with Q_OS_WIN

This commit is contained in:
Patrick von Reth
2014-03-31 17:30:54 +02:00
parent 1055e416f8
commit 910c17ade9
9 changed files with 19 additions and 19 deletions

View File

@@ -161,7 +161,7 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
QRect rectText = option.rect.adjusted( option.fontMetrics.height() * 5.5, boldFontMetrics.height() + 6, -leftEdge - 10, -8 ); QRect rectText = option.rect.adjusted( option.fontMetrics.height() * 5.5, boldFontMetrics.height() + 6, -leftEdge - 10, -8 );
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
rectText.adjust( 0, 1, 0, 0 ); rectText.adjust( 0, 1, 0, 0 );
#elif defined Q_WS_WIN #elif defined Q_OS_WIN
rectText.adjust( 0, 2, 0, 0 ); rectText.adjust( 0, 2, 0, 0 );
#endif #endif

View File

@@ -138,7 +138,7 @@ ActionCollection::initActions()
m_actionCollection[ "legalInfo" ]->setMenuRole( QAction::ApplicationSpecificRole ); m_actionCollection[ "legalInfo" ]->setMenuRole( QAction::ApplicationSpecificRole );
m_actionCollection[ "openLogfile" ] = new QAction( tr( "&View Logfile" ), this ); m_actionCollection[ "openLogfile" ] = new QAction( tr( "&View Logfile" ), this );
m_actionCollection[ "openLogfile" ]->setMenuRole( QAction::ApplicationSpecificRole ); m_actionCollection[ "openLogfile" ]->setMenuRole( QAction::ApplicationSpecificRole );
#if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE ) || defined( Q_WS_WIN ) #if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE ) || defined( Q_OS_WIN )
m_actionCollection[ "checkForUpdates" ] = new QAction( tr( "Check For Updates..." ), this ); m_actionCollection[ "checkForUpdates" ] = new QAction( tr( "Check For Updates..." ), this );
m_actionCollection[ "checkForUpdates" ]->setMenuRole( QAction::ApplicationSpecificRole ); m_actionCollection[ "checkForUpdates" ]->setMenuRole( QAction::ApplicationSpecificRole );
#endif #endif
@@ -184,7 +184,7 @@ ActionCollection::createMenuBar( QWidget *parent )
#if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE ) #if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE )
helpMenu->addAction( m_actionCollection[ "checkForUpdates" ] ); helpMenu->addAction( m_actionCollection[ "checkForUpdates" ] );
#elif defined( Q_WS_WIN ) #elif defined( Q_OS_WIN )
helpMenu->addSeparator(); helpMenu->addSeparator();
helpMenu->addAction( m_actionCollection[ "checkForUpdates" ] ); helpMenu->addAction( m_actionCollection[ "checkForUpdates" ] );
#endif #endif
@@ -249,7 +249,7 @@ ActionCollection::createCompactMenu( QWidget *parent )
#if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE ) #if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE )
compactMenu->addAction( m_actionCollection[ "checkForUpdates" ] ); compactMenu->addAction( m_actionCollection[ "checkForUpdates" ] );
#elif defined( Q_WS_WIN ) #elif defined( Q_OS_WIN )
compactMenu->addSeparator(); compactMenu->addSeparator();
compactMenu->addAction( m_actionCollection[ "checkForUpdates" ] ); compactMenu->addAction( m_actionCollection[ "checkForUpdates" ] );
#endif #endif

View File

@@ -19,12 +19,12 @@
#include <cstring> #include <cstring>
#include <cassert> #include <cassert>
#ifndef Q_WS_WIN #ifndef Q_OS_WIN
#include <csignal> #include <csignal>
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
#include <windows.h> #include <windows.h>
#ifndef _SSIZE_T_DEFINED #ifndef _SSIZE_T_DEFINED
typedef signed int ssize_t; typedef signed int ssize_t;
@@ -633,7 +633,7 @@ void KDSingleApplicationGuard::Instance::raise()
} }
#ifndef Q_WS_WIN #ifndef Q_OS_WIN
// static // static
void KDSingleApplicationGuard::SIGINT_handler( int sig ) void KDSingleApplicationGuard::SIGINT_handler( int sig )
{ {
@@ -735,7 +735,7 @@ void KDSingleApplicationGuard::Private::create( const QStringList & arguments )
// if another instance crashed, the shared memory segment is still there on Unix // if another instance crashed, the shared memory segment is still there on Unix
// the following lines trigger deletion in that case // the following lines trigger deletion in that case
#ifndef Q_WS_WIN #ifndef Q_OS_WIN
mem.attach(); mem.attach();
mem.detach(); mem.detach();
#endif #endif
@@ -767,7 +767,7 @@ void KDSingleApplicationGuard::Private::create( const QStringList & arguments )
{ {
const KDLockedSharedMemoryPointer< InstanceRegister > instances( &mem ); const KDLockedSharedMemoryPointer< InstanceRegister > instances( &mem );
initialized = instances->isValid(); initialized = instances->isValid();
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
::Sleep(20); ::Sleep(20);
#else #else
usleep(20000); usleep(20000);
@@ -815,7 +815,7 @@ void KDSingleApplicationGuard::Private::create( const QStringList & arguments )
instances->info[ 0 ] = ProcessInfo( NoCommand, arguments, QCoreApplication::applicationPid() ); instances->info[ 0 ] = ProcessInfo( NoCommand, arguments, QCoreApplication::applicationPid() );
} }
#ifndef Q_WS_WIN #ifndef Q_OS_WIN
::signal( SIGINT, SIGINT_handler ); ::signal( SIGINT, SIGINT_handler );
#endif #endif

View File

@@ -67,7 +67,7 @@ protected:
/*! \reimp */ bool event( QEvent * event ); /*! \reimp */ bool event( QEvent * event );
private: private:
#ifndef Q_WS_WIN #ifndef Q_OS_WIN
static void SIGINT_handler( int ); static void SIGINT_handler( int );
#endif #endif

View File

@@ -133,7 +133,7 @@ appConfigDir()
return QDir( "/tmp" ); return QDir( "/tmp" );
} }
#elif defined(Q_WS_WIN) #elif defined(Q_OS_WIN)
throw "TODO"; throw "TODO";
return QDir( "c:\\" ); //TODO refer to Qt documentation to get code to do this return QDir( "c:\\" ); //TODO refer to Qt documentation to get code to do this

View File

@@ -46,7 +46,7 @@
#include <libqnetwm/netwm.h> #include <libqnetwm/netwm.h>
#endif #endif
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
#include <windows.h> #include <windows.h>
#include <windowsx.h> #include <windowsx.h>
#include <shellapi.h> #include <shellapi.h>
@@ -282,7 +282,7 @@ bringToFront()
XSendEvent( QX11Info::display(), RootWindow( QX11Info::display(), DefaultScreen( QX11Info::display() ) ), False, SubstructureRedirectMask | SubstructureNotifyMask, &e ); XSendEvent( QX11Info::display(), RootWindow( QX11Info::display(), DefaultScreen( QX11Info::display() ) ), False, SubstructureRedirectMask | SubstructureNotifyMask, &e );
} }
#elif defined(Q_WS_WIN) #elif defined(Q_OS_WIN)
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
@@ -940,7 +940,7 @@ drawCompositedPopup( QWidget* widget,
qreal opacity ) qreal opacity )
{ {
bool compositingWorks = true; bool compositingWorks = true;
#if defined(Q_WS_WIN) //HACK: Windows refuses to perform compositing so we must fake it #if defined(Q_OS_WIN) //HACK: Windows refuses to perform compositing so we must fake it
compositingWorks = false; compositingWorks = false;
#elif defined(Q_WS_X11) #elif defined(Q_WS_X11)
if ( !QX11Info::isCompositingManagerRunning() ) if ( !QX11Info::isCompositingManagerRunning() )

View File

@@ -200,7 +200,7 @@ TomahawkTrayIcon::refreshToolTip()
tip = tr( "Currently not playing." ); tip = tr( "Currently not playing." );
} }
#ifdef Q_WS_WIN #ifdef Q_OS_WIN
// Good old crappy Win32 // Good old crappy Win32
tip.replace( "&", "&&&" ); tip.replace( "&", "&&&" );
#endif #endif

View File

@@ -82,7 +82,7 @@
#include "config.h" #include "config.h"
#if defined( Q_WS_WIN ) #if defined( Q_OS_WIN )
#if defined ( WITH_QtSparkle ) #if defined ( WITH_QtSparkle )
#include <qtsparkle/Updater> #include <qtsparkle/Updater>
#endif #endif
@@ -484,7 +484,7 @@ TomahawkWindow::setupUpdateCheck()
#if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE ) #if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE )
connect( ActionCollection::instance()->getAction( "checkForUpdates" ), SIGNAL( triggered( bool ) ), connect( ActionCollection::instance()->getAction( "checkForUpdates" ), SIGNAL( triggered( bool ) ),
SLOT( checkForUpdates() ) ); SLOT( checkForUpdates() ) );
#elif defined( Q_WS_WIN ) && defined( WITH_QtSparkle ) #elif defined( Q_OS_WIN ) && defined( WITH_QtSparkle )
QUrl updaterUrl; QUrl updaterUrl;
if ( qApp->arguments().contains( "--debug" ) ) if ( qApp->arguments().contains( "--debug" ) )

View File

@@ -33,7 +33,7 @@ SplashWidget::SplashWidget()
{ {
//In 2014 there are still operating systems that cannot do transparency //In 2014 there are still operating systems that cannot do transparency
bool compositingWorks = true; bool compositingWorks = true;
#if defined(Q_WS_WIN) #if defined(Q_OS_WIN)
compositingWorks = false; compositingWorks = false;
#elif defined(Q_WS_X11) #elif defined(Q_WS_X11)
if ( !QX11Info::isCompositingManagerRunning() ) if ( !QX11Info::isCompositingManagerRunning() )