From 08db9884d42dcb5a68894aac864c978af8773a15 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sat, 25 May 2013 17:39:12 +0200 Subject: [PATCH] s/Q_WS_WIN/Q_OS_WIN/g --- src/libtomahawk/ActionCollection.cpp | 6 +++--- .../kdsingleapplicationguard.cpp | 12 ++++++------ .../kdsingleapplicationguard.h | 2 +- src/libtomahawk/utils/TomahawkUtils.cpp | 4 ++-- src/libtomahawk/utils/TomahawkUtilsGui.cpp | 6 +++--- src/libtomahawk/widgets/WelcomeWidget.cpp | 2 +- src/tomahawk/TomahawkTrayIcon.cpp | 2 +- src/tomahawk/TomahawkWindow.cpp | 4 ++-- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/libtomahawk/ActionCollection.cpp b/src/libtomahawk/ActionCollection.cpp index e835d635d..f2005438e 100644 --- a/src/libtomahawk/ActionCollection.cpp +++ b/src/libtomahawk/ActionCollection.cpp @@ -130,7 +130,7 @@ ActionCollection::initActions() m_actionCollection[ "legalInfo" ]->setMenuRole( QAction::ApplicationSpecificRole ); m_actionCollection[ "openLogfile" ] = new QAction( tr( "&View Logfile" ), this ); 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" ]->setMenuRole( QAction::ApplicationSpecificRole ); #endif @@ -176,7 +176,7 @@ ActionCollection::createMenuBar( QWidget *parent ) #if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE ) helpMenu->addAction( m_actionCollection[ "checkForUpdates" ] ); -#elif defined( Q_WS_WIN ) +#elif defined( Q_OS_WIN ) helpMenu->addSeparator(); helpMenu->addAction( m_actionCollection[ "checkForUpdates" ] ); #endif @@ -241,7 +241,7 @@ ActionCollection::createCompactMenu( QWidget *parent ) #if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE ) compactMenu->addAction( m_actionCollection[ "checkForUpdates" ] ); -#elif defined( Q_WS_WIN ) +#elif defined( Q_OS_WIN ) compactMenu->addSeparator(); compactMenu->addAction( m_actionCollection[ "checkForUpdates" ] ); #endif diff --git a/src/libtomahawk/thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp b/src/libtomahawk/thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp index cd76f8811..d8e98b193 100644 --- a/src/libtomahawk/thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp +++ b/src/libtomahawk/thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp @@ -19,12 +19,12 @@ #include #include -#ifndef Q_WS_WIN +#ifndef Q_OS_WIN #include #include #endif -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN #include #ifndef _SSIZE_T_DEFINED typedef signed int ssize_t; @@ -633,7 +633,7 @@ void KDSingleApplicationGuard::Instance::raise() } -#ifndef Q_WS_WIN +#ifndef Q_OS_WIN // static 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 // the following lines trigger deletion in that case -#ifndef Q_WS_WIN +#ifndef Q_OS_WIN mem.attach(); mem.detach(); #endif @@ -767,7 +767,7 @@ void KDSingleApplicationGuard::Private::create( const QStringList & arguments ) { const KDLockedSharedMemoryPointer< InstanceRegister > instances( &mem ); initialized = instances->isValid(); -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN ::Sleep(20); #else usleep(20000); @@ -815,7 +815,7 @@ void KDSingleApplicationGuard::Private::create( const QStringList & arguments ) instances->info[ 0 ] = ProcessInfo( NoCommand, arguments, QCoreApplication::applicationPid() ); } -#ifndef Q_WS_WIN +#ifndef Q_OS_WIN ::signal( SIGINT, SIGINT_handler ); #endif diff --git a/src/libtomahawk/thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h b/src/libtomahawk/thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h index 7b744e110..169b0d3d7 100644 --- a/src/libtomahawk/thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h +++ b/src/libtomahawk/thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h @@ -67,7 +67,7 @@ protected: /*! \reimp */ bool event( QEvent * event ); private: -#ifndef Q_WS_WIN +#ifndef Q_OS_WIN static void SIGINT_handler( int ); #endif diff --git a/src/libtomahawk/utils/TomahawkUtils.cpp b/src/libtomahawk/utils/TomahawkUtils.cpp index e4d3ddebc..9d52392d0 100644 --- a/src/libtomahawk/utils/TomahawkUtils.cpp +++ b/src/libtomahawk/utils/TomahawkUtils.cpp @@ -128,7 +128,7 @@ appConfigDir() return QDir( "/tmp" ); } -#elif defined(Q_WS_WIN) +#elif defined(Q_OS_WIN) throw "TODO"; return QDir( "c:\\" ); //TODO refer to Qt documentation to get code to do this @@ -163,7 +163,7 @@ appDataDir() { QString path; - #ifdef Q_WS_WIN + #ifdef Q_OS_WIN if ( ( QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based ) == 0 ) { // Use this for non-DOS-based Windowses diff --git a/src/libtomahawk/utils/TomahawkUtilsGui.cpp b/src/libtomahawk/utils/TomahawkUtilsGui.cpp index 3e270df88..72cb5a72e 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.cpp +++ b/src/libtomahawk/utils/TomahawkUtilsGui.cpp @@ -47,7 +47,7 @@ #include #endif -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN #include #include #include @@ -284,7 +284,7 @@ bringToFront() 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; @@ -965,7 +965,7 @@ drawCompositedPopup( QWidget* widget, qreal opacity ) { 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; #elif defined(Q_WS_X11) if ( !QX11Info::isCompositingManagerRunning() ) diff --git a/src/libtomahawk/widgets/WelcomeWidget.cpp b/src/libtomahawk/widgets/WelcomeWidget.cpp index 9f937f19d..51735be3e 100644 --- a/src/libtomahawk/widgets/WelcomeWidget.cpp +++ b/src/libtomahawk/widgets/WelcomeWidget.cpp @@ -327,7 +327,7 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, QRect rectText = option.rect.adjusted( option.fontMetrics.height() * 4.5, boldFontMetrics.height() + 6, -leftEdge - 10, -8 ); #ifdef Q_WS_MAC rectText.adjust( 0, 1, 0, 0 ); -#elif defined Q_WS_WIN +#elif defined Q_OS_WIN rectText.adjust( 0, 2, 0, 0 ); #endif diff --git a/src/tomahawk/TomahawkTrayIcon.cpp b/src/tomahawk/TomahawkTrayIcon.cpp index 84bc664fc..d073653c9 100644 --- a/src/tomahawk/TomahawkTrayIcon.cpp +++ b/src/tomahawk/TomahawkTrayIcon.cpp @@ -198,7 +198,7 @@ TomahawkTrayIcon::refreshToolTip() tip = tr( "Currently not playing." ); } - #ifdef Q_WS_WIN + #ifdef Q_OS_WIN // Good old crappy Win32 tip.replace( "&", "&&&" ); #endif diff --git a/src/tomahawk/TomahawkWindow.cpp b/src/tomahawk/TomahawkWindow.cpp index 631715f6f..464a6448a 100644 --- a/src/tomahawk/TomahawkWindow.cpp +++ b/src/tomahawk/TomahawkWindow.cpp @@ -81,7 +81,7 @@ #include "config.h" -#if defined( Q_WS_WIN ) +#if defined( Q_OS_WIN ) #if defined ( WITH_QtSparkle ) #include #endif @@ -433,7 +433,7 @@ TomahawkWindow::setupUpdateCheck() #if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE ) connect( ActionCollection::instance()->getAction( "checkForUpdates" ), SIGNAL( triggered( bool ) ), SLOT( checkForUpdates() ) ); - #elif defined( Q_WS_WIN ) && defined( WITH_QtSparkle ) + #elif defined( Q_OS_WIN ) && defined( WITH_QtSparkle ) QUrl updaterUrl; if ( qApp->arguments().contains( "--debug" ) )