diff --git a/src/crashreporter/CrashReporter.cpp b/src/crashreporter/CrashReporter.cpp index bee66b0ea..34f99de42 100644 --- a/src/crashreporter/CrashReporter.cpp +++ b/src/crashreporter/CrashReporter.cpp @@ -41,7 +41,7 @@ CrashReporter::CrashReporter( const QStringList& args ) ui.progressBar->setValue( 0 ); ui.progressLabel->setPalette( Qt::gray ); - #ifdef Q_WS_MAC + #ifdef Q_OS_MAC QFont f = ui.bottomLabel->font(); f.setPointSize( 10 ); ui.bottomLabel->setFont( f ); @@ -55,7 +55,7 @@ CrashReporter::CrashReporter( const QStringList& args ) ui.progressLabel->setIndent( 1 ); ui.bottomLabel->setDisabled( true ); ui.bottomLabel->setIndent( 1 ); - #endif //Q_WS_MAC + #endif //Q_OS_MAC m_http = new QHttp( "oops.tomahawk-player.org", 80, this ); diff --git a/src/libtomahawk/accounts/AccountDelegate.cpp b/src/libtomahawk/accounts/AccountDelegate.cpp index f5c5a52bf..2144bdeb2 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 } @@ -257,7 +257,7 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option, else btnRect = QRect( opt.rect.right() - PADDING - btnWidth, center - ( installMetrics.height() + 4 ) / 2, btnWidth, installMetrics.height() + 2*PADDING ); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC btnRect.adjust( -4, 0, 4, 0 ); if ( hasConfigWrench ) diff --git a/src/libtomahawk/accounts/AccountManager.cpp b/src/libtomahawk/accounts/AccountManager.cpp index fdc26c216..cfc649eea 100644 --- a/src/libtomahawk/accounts/AccountManager.cpp +++ b/src/libtomahawk/accounts/AccountManager.cpp @@ -103,7 +103,7 @@ AccountManager::findPluginFactories() QList< QDir > pluginDirs; QDir appDir( qApp->applicationDirPath() ); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if ( appDir.dirName() == "MacOS" ) { // Development convenience-hack diff --git a/src/libtomahawk/accounts/DelegateConfigWrapper.cpp b/src/libtomahawk/accounts/DelegateConfigWrapper.cpp index 40e7be1f8..7553b9652 100644 --- a/src/libtomahawk/accounts/DelegateConfigWrapper.cpp +++ b/src/libtomahawk/accounts/DelegateConfigWrapper.cpp @@ -28,7 +28,7 @@ DelegateConfigWrapper::DelegateConfigWrapper( AccountConfigWidget* conf, QWidget , m_deleted( false ) { m_widget->setWindowFlags( Qt::Sheet ); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC m_widget->setVisible( true ); #endif setWindowTitle( title ); @@ -65,7 +65,7 @@ DelegateConfigWrapper::DelegateConfigWrapper( AccountConfigWidget* conf, QWidget setLayout( v ); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC setSizeGripEnabled( false ); setMinimumSize( sizeHint() ); setMaximumSize( sizeHint() ); // to remove the resize grip on osx this is the only way diff --git a/src/libtomahawk/infosystem/InfoSystemWorker.cpp b/src/libtomahawk/infosystem/InfoSystemWorker.cpp index eaaf64765..bfce2573b 100644 --- a/src/libtomahawk/infosystem/InfoSystemWorker.cpp +++ b/src/libtomahawk/infosystem/InfoSystemWorker.cpp @@ -169,7 +169,7 @@ InfoSystemWorker::findInfoPlugins() QList< QDir > pluginDirs; QDir appDir( qApp->applicationDirPath() ); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if ( appDir.dirName() == "MacOS" ) { // Development convenience-hack diff --git a/src/libtomahawk/playlist/GridView.cpp b/src/libtomahawk/playlist/GridView.cpp index b122c2143..f4d118dc8 100644 --- a/src/libtomahawk/playlist/GridView.cpp +++ b/src/libtomahawk/playlist/GridView.cpp @@ -215,7 +215,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 53460b629..ce4ae2991 100644 --- a/src/libtomahawk/playlist/PlaylistModel.cpp +++ b/src/libtomahawk/playlist/PlaylistModel.cpp @@ -372,7 +372,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 fccd93ca9..35133753a 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 b62af8d54..44a13b5cb 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 9d52392d0..e1e8fa50e 100644 --- a/src/libtomahawk/utils/TomahawkUtils.cpp +++ b/src/libtomahawk/utils/TomahawkUtils.cpp @@ -58,7 +58,7 @@ #include #endif -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include #include #endif @@ -75,14 +75,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 @@ -116,7 +116,7 @@ appConfigDir() { QDir ret; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if ( getenv( "HOME" ) ) { return QDir( QString( "%1" ).arg( getenv( "HOME" ) ) ); @@ -175,7 +175,7 @@ appDataDir() path = QString::fromLocal8Bit( acPath ); } } - #elif defined(Q_WS_MAC) + #elif defined(Q_OS_MAC) path = appSupportFolderPath(); #elif defined(Q_WS_X11) path = QDir::home().filePath( ".local/share" ); @@ -194,7 +194,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 72cb5a72e..ba8759ba8 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.cpp +++ b/src/libtomahawk/utils/TomahawkUtilsGui.cpp @@ -251,7 +251,7 @@ tomahawkWindow() } -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC void bringToFront() { diff --git a/src/libtomahawk/widgets/CheckDirTree.cpp b/src/libtomahawk/widgets/CheckDirTree.cpp index 34563d031..0c3361ad8 100644 --- a/src/libtomahawk/widgets/CheckDirTree.cpp +++ b/src/libtomahawk/widgets/CheckDirTree.cpp @@ -132,7 +132,7 @@ CheckDirModel::flags( const QModelIndex& index ) const QVariant CheckDirModel::data( const QModelIndex& index, int role ) const { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC // return the 'My Computer' icon for the /Volumes folder if ( index.column() == 0 && filePath( index ) == s_macVolumePath ) { diff --git a/src/libtomahawk/widgets/PlaylistTypeSelectorDialog.cpp b/src/libtomahawk/widgets/PlaylistTypeSelectorDialog.cpp index 96570b244..c3241d1ed 100644 --- a/src/libtomahawk/widgets/PlaylistTypeSelectorDialog.cpp +++ b/src/libtomahawk/widgets/PlaylistTypeSelectorDialog.cpp @@ -33,7 +33,7 @@ PlaylistTypeSelectorDlg::PlaylistTypeSelectorDlg( QWidget* parent, Qt::WindowFla { ui->setupUi( this ); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC // ui-> ui->verticalLayout->setContentsMargins( 4, 0, 4, 4 ); diff --git a/src/libtomahawk/widgets/WelcomeWidget.cpp b/src/libtomahawk/widgets/WelcomeWidget.cpp index 51735be3e..f5e16d7db 100644 --- a/src/libtomahawk/widgets/WelcomeWidget.cpp +++ b/src/libtomahawk/widgets/WelcomeWidget.cpp @@ -325,7 +325,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 +#ifdef Q_OS_MAC rectText.adjust( 0, 1, 0, 0 ); #elif defined Q_OS_WIN rectText.adjust( 0, 2, 0, 0 ); diff --git a/src/tomahawk/LoadXSPFDialog.cpp b/src/tomahawk/LoadXSPFDialog.cpp index dcac669db..2973e0eab 100644 --- a/src/tomahawk/LoadXSPFDialog.cpp +++ b/src/tomahawk/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/SettingsDialog.cpp b/src/tomahawk/SettingsDialog.cpp index e525a5235..617714b02 100644 --- a/src/tomahawk/SettingsDialog.cpp +++ b/src/tomahawk/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* >(); @@ -220,7 +220,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/TomahawkApp.cpp b/src/tomahawk/TomahawkApp.cpp index b8557bb7a..3bf4894fd 100644 --- a/src/tomahawk/TomahawkApp.cpp +++ b/src/tomahawk/TomahawkApp.cpp @@ -84,7 +84,7 @@ #include #endif -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include "mac/MacShortcutHandler.h" #include @@ -108,7 +108,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). @@ -225,7 +225,7 @@ TomahawkApp::init() GeneratorFactory::registerFactory( "database", new DatabaseFactory ); // Register shortcut handler for this platform -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC m_shortcutHandler = QPointer( new MacShortcutHandler( this ) ); Tomahawk::setShortcutHandler( static_cast( m_shortcutHandler.data() ) ); diff --git a/src/tomahawk/TomahawkTrayIcon.cpp b/src/tomahawk/TomahawkTrayIcon.cpp index d073653c9..c82a17922 100644 --- a/src/tomahawk/TomahawkTrayIcon.cpp +++ b/src/tomahawk/TomahawkTrayIcon.cpp @@ -39,7 +39,7 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent ) , m_stopContinueAfterTrackAction( 0 ) , m_loveTrackAction( 0 ) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QIcon icon( RESPATH "icons/tomahawk-icon-128x128-grayscale.png" ); #else QIcon icon( RESPATH "icons/tomahawk-icon-128x128.png" ); @@ -67,7 +67,7 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent ) m_contextMenu->addSeparator(); m_contextMenu->addAction( ActionCollection::instance()->getAction( "togglePrivacy" ) ); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC // On mac you can close the windows while leaving the app open. We then need a way to show the main window again m_contextMenu->addSeparator(); m_showWindowAction = m_contextMenu->addAction( tr( "Hide Tomahawk Window" ) ); @@ -182,7 +182,7 @@ TomahawkTrayIcon::onStopContinueAfterTrackChanged() void TomahawkTrayIcon::refreshToolTip() { - #ifdef Q_WS_MAC + #ifdef Q_OS_MAC // causes issues with OS X menubar, also none // of the other OS X menubar icons have a tooltip return; @@ -221,7 +221,7 @@ TomahawkTrayIcon::onAnimationTimer() void TomahawkTrayIcon::onActivated( QSystemTrayIcon::ActivationReason reason ) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC return; #endif diff --git a/src/tomahawk/TomahawkWindow.cpp b/src/tomahawk/TomahawkWindow.cpp index 464a6448a..30785c348 100644 --- a/src/tomahawk/TomahawkWindow.cpp +++ b/src/tomahawk/TomahawkWindow.cpp @@ -886,7 +886,7 @@ TomahawkWindow::fullScreenEntered() TomahawkSettings::instance()->setFullscreenEnabled( true ); statusBar()->setSizeGripEnabled( false ); -#if defined( Q_WS_MAC ) +#if defined( Q_OS_MAC ) ActionCollection::instance()->getAction( "fullscreen" )->setText( tr( "Exit Full Screen" ) ); #endif } @@ -898,7 +898,7 @@ TomahawkWindow::fullScreenExited() TomahawkSettings::instance()->setFullscreenEnabled( false ); statusBar()->setSizeGripEnabled( true ); -#if defined( Q_WS_MAC ) +#if defined( Q_OS_MAC ) ActionCollection::instance()->getAction( "fullscreen" )->setText( tr( "Enter Full Screen" ) ); #endif } @@ -1299,7 +1299,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/main.cpp b/src/tomahawk/main.cpp index 1bb345270..75e739f2c 100644 --- a/src/tomahawk/main.cpp +++ b/src/tomahawk/main.cpp @@ -26,7 +26,7 @@ #include "config.h" #include "utils/Logger.h" -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include "TomahawkApp_Mac.h" #include static pascal OSErr appleEventHandler( const AppleEvent*, AppleEvent*, long ); @@ -121,7 +121,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine int main( int argc, char *argv[] ) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC // Do Mac specific startup to get media keys working. // This must go before QApplication initialisation. Tomahawk::macMain(); @@ -133,7 +133,7 @@ main( int argc, char *argv[] ) // used for url handler AEEventHandlerUPP h = AEEventHandlerUPP( appleEventHandler ); AEInstallEventHandler( 'GURL', 'GURL', h, 0, false ); - #endif // Q_WS_MAC + #endif // Q_OS_MAC #endif //Q_OS_WIN TomahawkApp a( argc, argv ); @@ -179,7 +179,7 @@ main( int argc, char *argv[] ) } -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC static pascal OSErr appleEventHandler( const AppleEvent* e, AppleEvent*, long ) { diff --git a/src/tomahawk/sourcetree/SourceTreeView.cpp b/src/tomahawk/sourcetree/SourceTreeView.cpp index 69e3795f4..225a7d730 100644 --- a/src/tomahawk/sourcetree/SourceTreeView.cpp +++ b/src/tomahawk/sourcetree/SourceTreeView.cpp @@ -130,7 +130,7 @@ SourceTreeView::SourceTreeView( QWidget* parent ) showOfflineSources( TomahawkSettings::instance()->showOfflineSources() ); // Light-blue sourcetree on osx -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC setStyleSheet( "SourceTreeView:active { background: #DDE4EB; } " "SourceTreeView { background: #EDEDED; } " ); #endif diff --git a/src/tomahawk/sourcetree/SourcesModel.cpp b/src/tomahawk/sourcetree/SourcesModel.cpp index dd20740ce..8408b2a77 100644 --- a/src/tomahawk/sourcetree/SourcesModel.cpp +++ b/src/tomahawk/sourcetree/SourcesModel.cpp @@ -267,7 +267,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 ecb4fedee..29ea80e87 100644 --- a/src/tomahawk/widgets/AccountsToolButton.cpp +++ b/src/tomahawk/widgets/AccountsToolButton.cpp @@ -104,7 +104,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;"