mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-21 00:12:06 +02:00
Replace Q_WS_MAC with Q_OS_MAC.
This commit is contained in:
parent
1004f17f7b
commit
2135b99ccd
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 );
|
||||
|
@ -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" ) ||
|
||||
|
@ -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 );
|
||||
|
@ -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);
|
||||
|
@ -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 ) );
|
||||
|
@ -64,7 +64,7 @@
|
||||
#include <shlobj.h>
|
||||
#endif
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
#ifdef Q_OS_MAC
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <sys/sysctl.h>
|
||||
#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" );
|
||||
|
@ -291,7 +291,7 @@ tomahawkWindow()
|
||||
}
|
||||
|
||||
|
||||
#ifndef Q_WS_MAC
|
||||
#ifndef Q_OS_MAC
|
||||
void
|
||||
bringToFront()
|
||||
{
|
||||
|
@ -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).
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 );
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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 );
|
||||
|
@ -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;"
|
||||
|
Loading…
x
Reference in New Issue
Block a user