diff --git a/CMakeModules/AddAppIconMacro.cmake b/CMakeModules/AddAppIconMacro.cmake index 384a3372b..291312bd1 100644 --- a/CMakeModules/AddAppIconMacro.cmake +++ b/CMakeModules/AddAppIconMacro.cmake @@ -69,7 +69,7 @@ macro (TOMAHAWK_ADD_APP_ICON appsources outfilename pattern) message(STATUS "Unable to find the png2ico or windres utilities - application will not have an application icon!") endif(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE) endif(WIN32) - if (Q_WS_MAC) + if (Q_OS_MAC) # first convert image to a tiff using the Mac OS X "sips" utility, # then use tiff2icns to convert to an icon find_program(SIPS_EXECUTABLE NAMES sips) @@ -110,5 +110,5 @@ macro (TOMAHAWK_ADD_APP_ICON appsources outfilename pattern) else(SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE) message(STATUS "Unable to find the sips and tiff2icns utilities - application will not have an application icon!") endif(SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE) - endif(Q_WS_MAC) + endif(Q_OS_MAC) endmacro (TOMAHAWK_ADD_APP_ICON) diff --git a/src/libtomahawk/accounts/AccountDelegate.cpp b/src/libtomahawk/accounts/AccountDelegate.cpp index db271c42a..0971d8f3b 100644 --- a/src/libtomahawk/accounts/AccountDelegate.cpp +++ b/src/libtomahawk/accounts/AccountDelegate.cpp @@ -217,7 +217,7 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option, painter->restore(); btnRect = QRect( opt.rect.right() - PADDING - btnWidth, opt.rect.bottom() - installMetrics.height() - 3*PADDING, btnWidth, installMetrics.height() + 2*PADDING ); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC btnRect.adjust( -4, 0, 4, 0 ); #endif } diff --git a/src/libtomahawk/playlist/GridView.cpp b/src/libtomahawk/playlist/GridView.cpp index 94d88de70..aa6af18db 100644 --- a/src/libtomahawk/playlist/GridView.cpp +++ b/src/libtomahawk/playlist/GridView.cpp @@ -246,7 +246,7 @@ GridView::resizeEvent( QResizeEvent* event ) void GridView::wheelEvent( QWheelEvent* e ) { -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC //HACK: Workaround for QTBUG-7232: Smooth scrolling (scroll per pixel) in ItemViews // does not work as expected. verticalScrollBar()->setSingleStep( delegate()->itemSize().height() / 8 ); diff --git a/src/libtomahawk/playlist/PlaylistModel.cpp b/src/libtomahawk/playlist/PlaylistModel.cpp index 46b955443..983e9890e 100644 --- a/src/libtomahawk/playlist/PlaylistModel.cpp +++ b/src/libtomahawk/playlist/PlaylistModel.cpp @@ -416,7 +416,7 @@ PlaylistModel::dropMimeData( const QMimeData* data, Qt::DropAction action, int r /* if ( action & Qt::MoveAction ) dj->setDropAction( DropJob::Move ); */ -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC // On mac, drags from outside the app are still Qt::MoveActions instead of Qt::CopyAction by default // so check if the drag originated in this playlist to determine whether or not to copy if ( !data->hasFormat( "application/tomahawk.playlist.id" ) || diff --git a/src/libtomahawk/playlist/dynamic/widgets/DynamicControlList.cpp b/src/libtomahawk/playlist/dynamic/widgets/DynamicControlList.cpp index 5d6b9edbd..39e04e66d 100644 --- a/src/libtomahawk/playlist/dynamic/widgets/DynamicControlList.cpp +++ b/src/libtomahawk/playlist/dynamic/widgets/DynamicControlList.cpp @@ -70,7 +70,7 @@ DynamicControlList::init() m_layout->setColumnStretch( 2, 1 ); m_layout->setMargin( 0 ); m_layout->setVerticalSpacing( 0 ); -#ifdef Q_WS_MAC // on OS X we don't want the right edge of the toolbuttons against the window +#ifdef Q_OS_MAC // on OS X we don't want the right edge of the toolbuttons against the window m_layout->setContentsMargins( 0, 0, 3, 0 ); #else m_layout->setContentsMargins( 0, 0, 0, 0 ); diff --git a/src/libtomahawk/thirdparty/Qocoa/qsearchfield.cpp b/src/libtomahawk/thirdparty/Qocoa/qsearchfield.cpp index bf77d088a..316fc24a0 100644 --- a/src/libtomahawk/thirdparty/Qocoa/qsearchfield.cpp +++ b/src/libtomahawk/thirdparty/Qocoa/qsearchfield.cpp @@ -58,7 +58,7 @@ QSearchField::QSearchField(QWidget *parent) : QWidget(parent) lineEdit->setMinimumHeight(27); setFixedHeight(27); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC lineEdit->setContentsMargins(0, 0, 0, 0); #else lineEdit->setContentsMargins(2, 2, 2, 2); diff --git a/src/libtomahawk/utils/GuiHelpers.cpp b/src/libtomahawk/utils/GuiHelpers.cpp index 4058b3caf..4f2519f98 100644 --- a/src/libtomahawk/utils/GuiHelpers.cpp +++ b/src/libtomahawk/utils/GuiHelpers.cpp @@ -98,7 +98,7 @@ createAccountFromFactory( Tomahawk::Accounts::AccountFactory* factory, QWidget* bool added = false; if( account->configurationWidget() ) { -/*#ifdef Q_WS_MAC +/*#ifdef Q_OS_MAC // on osx a sheet needs to be non-modal DelegateConfigWrapper* dialog = new DelegateConfigWrapper( account->configurationWidget(), account->aboutWidget(), QObject::tr( "%1 Config" ).arg( account->accountFriendlyName() ), parent, Qt::Sheet ); dialog->setProperty( "accountplugin", QVariant::fromValue< QObject* >( account ) ); diff --git a/src/libtomahawk/utils/TomahawkUtils.cpp b/src/libtomahawk/utils/TomahawkUtils.cpp index 4f2e34473..b5585c0e2 100644 --- a/src/libtomahawk/utils/TomahawkUtils.cpp +++ b/src/libtomahawk/utils/TomahawkUtils.cpp @@ -64,7 +64,7 @@ #include #endif -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include #include #endif @@ -81,14 +81,14 @@ static quint64 s_infosystemRequestId = 0; static QMutex s_infosystemRequestIdMutex; static bool s_headless = false; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QString appSupportFolderPath() { // honestly, it is *always* this --mxcl return QDir::home().filePath( "Library/Application Support" ); } -#endif // Q_WS_MAC +#endif // Q_OS_MAC bool @@ -122,7 +122,7 @@ appConfigDir() { QDir ret; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if ( getenv( "HOME" ) ) { return QDir( QString( "%1" ).arg( getenv( "HOME" ) ) ); @@ -200,7 +200,7 @@ appDataDir() QDir appLogDir() { -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC return appDataDir(); #else return QDir( QDir::homePath() + "/Library/Logs" ); diff --git a/src/libtomahawk/utils/TomahawkUtilsGui.cpp b/src/libtomahawk/utils/TomahawkUtilsGui.cpp index 7b4a398e3..ebedf3e4f 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.cpp +++ b/src/libtomahawk/utils/TomahawkUtilsGui.cpp @@ -291,7 +291,7 @@ tomahawkWindow() } -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC void bringToFront() { diff --git a/src/tomahawk/TomahawkApp.cpp b/src/tomahawk/TomahawkApp.cpp index 2c663d6c8..014701908 100644 --- a/src/tomahawk/TomahawkApp.cpp +++ b/src/tomahawk/TomahawkApp.cpp @@ -114,7 +114,7 @@ const char* enApiSecret = "BNvTzfthHr/d1eNhHLvL1Jo="; void increaseMaxFileDescriptors() { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC /// Following code taken from Clementine project, main.cpp. Thanks! // Bump the soft limit for the number of file descriptors from the default of 256 to // the maximum (usually 1024). diff --git a/src/tomahawk/TomahawkWindow.cpp b/src/tomahawk/TomahawkWindow.cpp index 93f041204..25e8a4e78 100644 --- a/src/tomahawk/TomahawkWindow.cpp +++ b/src/tomahawk/TomahawkWindow.cpp @@ -1134,7 +1134,7 @@ TomahawkWindow::fullScreenEntered() // margins.setRight( 24 ); // statusBar()->setContentsMargins( margins ); -#if defined( Q_WS_MAC ) +#if defined( Q_OS_MAC ) ActionCollection::instance()->getAction( "fullscreen" )->setText( tr( "Exit Full Screen" ) ); #endif } @@ -1152,7 +1152,7 @@ TomahawkWindow::fullScreenExited() // margins.setRight( 0 ); // statusBar()->setContentsMargins( margins ); -#if defined( Q_WS_MAC ) +#if defined( Q_OS_MAC ) ActionCollection::instance()->getAction( "fullscreen" )->setText( tr( "Enter Full Screen" ) ); #endif } @@ -1481,7 +1481,7 @@ TomahawkWindow::toggleFullscreen() { tDebug() << Q_FUNC_INFO; -#if defined( Q_WS_MAC ) +#if defined( Q_OS_MAC ) Tomahawk::toggleFullscreen(); #endif } diff --git a/src/tomahawk/dialogs/LoadXSPFDialog.cpp b/src/tomahawk/dialogs/LoadXSPFDialog.cpp index dcac669db..2973e0eab 100644 --- a/src/tomahawk/dialogs/LoadXSPFDialog.cpp +++ b/src/tomahawk/dialogs/LoadXSPFDialog.cpp @@ -30,7 +30,7 @@ LoadXSPFDialog::LoadXSPFDialog( QWidget* parent, Qt::WindowFlags f ) { m_ui->setupUi( this ); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC m_ui->horizontalLayout->setContentsMargins( 0, 0, 0, 0 ); m_ui->horizontalLayout->setSpacing( 5 ); m_ui->verticalLayout->setContentsMargins( 0, 10, 0, 0 ); diff --git a/src/tomahawk/dialogs/SettingsDialog.cpp b/src/tomahawk/dialogs/SettingsDialog.cpp index f278b8fa5..9c1a36ca5 100644 --- a/src/tomahawk/dialogs/SettingsDialog.cpp +++ b/src/tomahawk/dialogs/SettingsDialog.cpp @@ -120,7 +120,7 @@ SettingsDialog::SettingsDialog(QObject *parent ) m_advancedWidgetUi->aclEntryClearButton->setEnabled( TomahawkSettings::instance()->aclEntries().size() > 0 ); connect( m_advancedWidgetUi->aclEntryClearButton, SIGNAL( clicked( bool ) ), this, SLOT( aclEntryClearButtonClicked() ) ); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC // Avoid resize handles on sheets on osx m_proxySettings.setSizeGripEnabled( true ); QSizeGrip* p = m_proxySettings.findChild< QSizeGrip* >(); @@ -229,7 +229,7 @@ SettingsDialog::SettingsDialog(QObject *parent ) #endif // NOW PLAYING -// #ifdef Q_WS_MAC +// #ifdef Q_OS_MAC // ui->checkBoxEnableAdium->setChecked( s->nowPlayingEnabled() ); // #else // ui->checkBoxEnableAdium->hide(); diff --git a/src/tomahawk/sourcetree/SourcesModel.cpp b/src/tomahawk/sourcetree/SourcesModel.cpp index 377746d50..80b82642a 100644 --- a/src/tomahawk/sourcetree/SourcesModel.cpp +++ b/src/tomahawk/sourcetree/SourcesModel.cpp @@ -272,7 +272,7 @@ SourcesModel::dropMimeData( const QMimeData* data, Qt::DropAction action, int ro Qt::DropActions SourcesModel::supportedDropActions() const { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC return Qt::CopyAction | Qt::MoveAction; #else return Qt::CopyAction; diff --git a/src/tomahawk/widgets/AccountListView.cpp b/src/tomahawk/widgets/AccountListView.cpp index 34a185771..63e5d442c 100644 --- a/src/tomahawk/widgets/AccountListView.cpp +++ b/src/tomahawk/widgets/AccountListView.cpp @@ -28,7 +28,7 @@ AccountListView::AccountListView( QWidget* parent ) void AccountListView::wheelEvent( QWheelEvent* e ) { -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC //HACK: Workaround for QTBUG-7232: Smooth scrolling (scroll per pixel) in ItemViews // does not work as expected. verticalScrollBar()->setSingleStep( ACCOUNT_DELEGATE_ROW_HEIGHT_MULTIPLIER * fontMetrics().height() / 8 ); diff --git a/src/tomahawk/widgets/AccountsToolButton.cpp b/src/tomahawk/widgets/AccountsToolButton.cpp index 0a8846d12..46251ab9c 100644 --- a/src/tomahawk/widgets/AccountsToolButton.cpp +++ b/src/tomahawk/widgets/AccountsToolButton.cpp @@ -105,7 +105,7 @@ AccountsToolButton::AccountsToolButton( QWidget* parent ) connect( m_proxy, SIGNAL( modelReset() ), this, SLOT( updateIcons() ) ); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC setIconSize( QSize( iconSize().width()-4, iconSize().height()-4 ) ); setStyleSheet( "AccountsToolButton {" " border: 1px solid #7d7d7d;"