1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-19 04:11:46 +02:00

s/Q_WS_MAC/Q_OS_MAC/g

This commit is contained in:
Dominik Schmidt
2013-05-25 17:40:13 +02:00
parent 08db9884d4
commit 16417ef7ab
25 changed files with 44 additions and 44 deletions

View File

@@ -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 );

View File

@@ -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 )

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 );

View File

@@ -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" ) ||

View File

@@ -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 );

View File

@@ -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);

View File

@@ -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 ) );

View File

@@ -58,7 +58,7 @@
#include <shlobj.h>
#endif
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
#include <Carbon/Carbon.h>
#include <sys/sysctl.h>
#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" );

View File

@@ -251,7 +251,7 @@ tomahawkWindow()
}
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
void
bringToFront()
{

View File

@@ -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 )
{

View File

@@ -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 );

View File

@@ -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 );

View File

@@ -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 );

View File

@@ -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();

View File

@@ -84,7 +84,7 @@
#include <QMessageBox>
#endif
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
#include "mac/MacShortcutHandler.h"
#include <sys/resource.h>
@@ -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<Tomahawk::ShortcutHandler>( new MacShortcutHandler( this ) );
Tomahawk::setShortcutHandler( static_cast<MacShortcutHandler*>( m_shortcutHandler.data() ) );

View File

@@ -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

View File

@@ -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
}

View File

@@ -26,7 +26,7 @@
#include "config.h"
#include "utils/Logger.h"
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
#include "TomahawkApp_Mac.h"
#include </System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/Headers/AppleEvents.h>
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 )
{

View File

@@ -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

View File

@@ -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;

View File

@@ -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 );

View File

@@ -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;"