Skip to content

Commit d5d4a5a

Browse files
committed
Q_WS_* macros removed from Qt5, to determine platform use Q_OS_* macroses which exists in Qt4 and Qt5
1 parent a4aaff5 commit d5d4a5a

40 files changed

+86
-86
lines changed

src/app/composer/qgscomposer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
195195

196196
mActionAtlasPreview->setCheckable( true );
197197

198-
#ifdef Q_WS_MAC
198+
#ifdef Q_OS_MAC
199199
mActionQuit->setText( tr( "Close" ) );
200200
mActionQuit->setShortcut( QKeySequence::Close );
201201
QMenu *appMenu = menuBar()->addMenu( tr( "QGIS" ) );
@@ -307,7 +307,7 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
307307
QShortcut* ctrlEquals = new QShortcut( QKeySequence( "Ctrl+=" ), this );
308308
connect( ctrlEquals, SIGNAL( activated() ), mActionZoomIn, SLOT( trigger() ) );
309309

310-
#ifndef Q_WS_MAC
310+
#ifndef Q_OS_MAC
311311
//disabled for OSX - see #10761
312312
//also see http://qt-project.org/forums/viewthread/3630 QGraphicsEffects are not well supported on OSX
313313
QMenu *previewMenu = viewMenu->addMenu( "&Preview" );
@@ -404,7 +404,7 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
404404
QMenu *settingsMenu = menuBar()->addMenu( tr( "&Settings" ) );
405405
settingsMenu->addAction( mActionOptions );
406406

407-
#ifdef Q_WS_MAC
407+
#ifdef Q_OS_MAC
408408
// this doesn't work on Mac anymore: menuBar()->addMenu( mQgis->windowMenu() );
409409
// QgsComposer::populateWithOtherMenu should work recursively with submenus and regardless of Qt version
410410
mWindowMenu = new QMenu( tr( "Window" ), this );
@@ -802,7 +802,7 @@ void QgsComposer::activate()
802802
}
803803
}
804804

805-
#ifdef Q_WS_MAC
805+
#ifdef Q_OS_MAC
806806
void QgsComposer::changeEvent( QEvent* event )
807807
{
808808
QMainWindow::changeEvent( event );
@@ -2950,7 +2950,7 @@ void QgsComposer::showEvent( QShowEvent* event )
29502950
restoreComposerMapStates();
29512951
}
29522952

2953-
#ifdef Q_WS_MAC
2953+
#ifdef Q_OS_MAC
29542954
// add to menu if (re)opening window (event not due to unminimize)
29552955
if ( !event->spontaneous() )
29562956
{

src/app/composer/qgscomposer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
114114

115115
virtual void showEvent( QShowEvent* event );
116116

117-
#ifdef Q_WS_MAC
117+
#ifdef Q_OS_MAC
118118
//! Change event (update window menu on ActivationChange)
119119
virtual void changeEvent( QEvent * );
120120
#endif

src/app/composer/qgscomposerattributetablewidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ void QgsComposerAttributeTableWidget::on_mHeaderFontPushButton_clicked()
288288
}
289289

290290
bool ok;
291-
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
291+
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
292292
// Native Mac dialog works only for Qt Carbon
293293
QFont newFont = QFontDialog::getFont( &ok, mComposerTable->headerFont(), 0, tr( "Select Font" ), QFontDialog::DontUseNativeDialog );
294294
#else
@@ -336,7 +336,7 @@ void QgsComposerAttributeTableWidget::on_mContentFontPushButton_clicked()
336336
}
337337

338338
bool ok;
339-
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
339+
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
340340
// Native Mac dialog works only for Qt Carbon
341341
QFont newFont = QFontDialog::getFont( &ok, mComposerTable->contentFont(), 0, tr( "Select Font" ), QFontDialog::DontUseNativeDialog );
342342
#else

src/app/composer/qgscomposerlabelwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void QgsComposerLabelWidget::on_mFontButton_clicked()
9191
if ( mComposerLabel )
9292
{
9393
bool ok;
94-
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
94+
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
9595
// Native Mac dialog works only for Qt Carbon
9696
QFont newFont = QFontDialog::getFont( &ok, mComposerLabel->font(), 0, QString(), QFontDialog::DontUseNativeDialog );
9797
#else

src/app/composer/qgscomposerlegendwidget.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ void QgsComposerLegendWidget::on_mTitleFontButton_clicked()
368368
if ( mLegend )
369369
{
370370
bool ok;
371-
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
371+
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
372372
// Native Mac dialog works only for Qt Carbon
373373
QFont newFont = QFontDialog::getFont( &ok, mLegend->style( QgsComposerLegendStyle::Title ).font(), 0, QString(), QFontDialog::DontUseNativeDialog );
374374
#else
@@ -390,7 +390,7 @@ void QgsComposerLegendWidget::on_mGroupFontButton_clicked()
390390
if ( mLegend )
391391
{
392392
bool ok;
393-
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
393+
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
394394
// Native Mac dialog works only for Qt Carbon
395395
QFont newFont = QFontDialog::getFont( &ok, mLegend->style( QgsComposerLegendStyle::Group ).font(), 0, QString(), QFontDialog::DontUseNativeDialog );
396396
#else
@@ -412,7 +412,7 @@ void QgsComposerLegendWidget::on_mLayerFontButton_clicked()
412412
if ( mLegend )
413413
{
414414
bool ok;
415-
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
415+
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
416416
// Native Mac dialog works only for Qt Carbon
417417
QFont newFont = QFontDialog::getFont( &ok, mLegend->style( QgsComposerLegendStyle::Subgroup ).font(), 0, QString(), QFontDialog::DontUseNativeDialog );
418418
#else
@@ -434,7 +434,7 @@ void QgsComposerLegendWidget::on_mItemFontButton_clicked()
434434
if ( mLegend )
435435
{
436436
bool ok;
437-
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
437+
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
438438
// Native Mac dialog works only for Qt Carbon
439439
QFont newFont = QFontDialog::getFont( &ok, mLegend->style( QgsComposerLegendStyle::SymbolLabel ).font(), 0, QString(), QFontDialog::DontUseNativeDialog );
440440
#else

src/app/composer/qgscomposermanager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ QgsComposerManager::QgsComposerManager( QWidget * parent, Qt::WindowFlags f ): Q
6363
mButtonBox->addButton( pb, QDialogButtonBox::ActionRole );
6464
connect( pb, SIGNAL( clicked() ), this, SLOT( rename_clicked() ) );
6565

66-
#ifdef Q_WS_MAC
66+
#ifdef Q_OS_MAC
6767
// Create action to select this window
6868
mWindowAction = new QAction( windowTitle(), this );
6969
connect( mWindowAction, SIGNAL( triggered() ), this, SLOT( activate() ) );
@@ -285,7 +285,7 @@ void QgsComposerManager::openLocalDirectory( const QString& localDirPath )
285285
QDesktopServices::openUrl( QUrl::fromLocalFile( localDirPath ) );
286286
}
287287

288-
#ifdef Q_WS_MAC
288+
#ifdef Q_OS_MAC
289289
void QgsComposerManager::showEvent( QShowEvent* event )
290290
{
291291
if ( !event->spontaneous() )

src/app/composer/qgscomposermanager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class QgsComposerManager: public QDialog, private Ui::QgsComposerManagerBase
7373
QString mDefaultTemplatesDir;
7474
QString mUserTemplatesDir;
7575

76-
#ifdef Q_WS_MAC
76+
#ifdef Q_OS_MAC
7777
void showEvent( QShowEvent *event );
7878
void changeEvent( QEvent * );
7979

src/app/composer/qgscomposermapwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2055,7 +2055,7 @@ void QgsComposerMapWidget::on_mAnnotationFontButton_clicked()
20552055
}
20562056

20572057
bool ok;
2058-
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
2058+
#if defined(Q_OS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
20592059
// Native Mac dialog works only for Qt Carbon
20602060
QFont newFont = QFontDialog::getFont( &ok, grid->annotationFont(), 0, QString(), QFontDialog::DontUseNativeDialog );
20612061
#else

src/app/composer/qgscomposerscalebarwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void QgsComposerScaleBarWidget::on_mFontButton_clicked()
311311

312312
bool dialogAccepted;
313313
QFont oldFont = mComposerScaleBar->font();
314-
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
314+
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
315315
// Native Mac dialog works only for Qt Carbon
316316
QFont newFont = QFontDialog::getFont( &dialogAccepted, oldFont, 0, QString(), QFontDialog::DontUseNativeDialog );
317317
#else

src/app/composer/qgscomposertablewidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ void QgsComposerTableWidget::on_mHeaderFontPushButton_clicked()
215215
}
216216

217217
bool ok;
218-
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
218+
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
219219
// Native Mac dialog works only for Qt Carbon
220220
QFont newFont = QFontDialog::getFont( &ok, mComposerTable->headerFont(), 0, tr( "Select Font" ), QFontDialog::DontUseNativeDialog );
221221
#else
@@ -250,7 +250,7 @@ void QgsComposerTableWidget::on_mContentFontPushButton_clicked()
250250
}
251251

252252
bool ok;
253-
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
253+
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
254254
// Native Mac dialog works only for Qt Carbon
255255
QFont newFont = QFontDialog::getFont( &ok, mComposerTable->contentFont(), 0, tr( "Select Font" ), QFontDialog::DontUseNativeDialog );
256256
#else

0 commit comments

Comments
 (0)