ifdef Q_?S_* cleanup

- clear up some Q_OS_LINUX vs. Q_OS_UNIX
- clear up Q_WS_* vs. Q_OS_* (relatively theoretical exercise)
- use proper #if-#else cascades instead of free-standing #ifs
This commit is contained in:
Oswald Buddenhagen
2009-06-03 20:45:49 +02:00
parent 3df7a2c301
commit d2a8449bea
37 changed files with 110 additions and 118 deletions

View File

@@ -85,10 +85,10 @@ CentralWidget::CentralWidget(QHelpEngine *engine, QWidget *parent)
globalActionList.clear();
collectionFile = helpEngine->collectionFile();
QString system = QLatin1String("win");
#ifdef Q_OS_MAC
system = QLatin1String("mac");
# define SYSTEM "mac"
#else
# define SYSTEM "win"
#endif
tabWidget = new QTabWidget;
@@ -100,7 +100,7 @@ CentralWidget::CentralWidget(QHelpEngine *engine, QWidget *parent)
QToolButton *newTabButton = new QToolButton(this);
newTabButton->setAutoRaise(true);
newTabButton->setToolTip(tr("Add new page"));
newTabButton->setIcon(QIcon(QString::fromUtf8(":/trolltech/assistant/images/%1/addtab.png").arg(system)));
newTabButton->setIcon(QIcon(QString::fromLatin1(":/trolltech/assistant/images/" SYSTEM "/addtab.png")));
tabWidget->setCornerWidget(newTabButton, Qt::TopLeftCorner);
connect(newTabButton, SIGNAL(clicked()), this, SLOT(newTab()));