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

@@ -436,9 +436,10 @@ void BookmarkWidget::setup(bool showButtons)
treeView = new TreeView(this);
vlayout->addWidget(treeView);
QString system = QLatin1String("win");
#ifdef Q_OS_MAC
system = QLatin1String("mac");
# define SYSTEM "mac"
#else
# define SYSTEM "win"
#endif
if (showButtons) {
@@ -449,8 +450,8 @@ void BookmarkWidget::setup(bool showButtons)
addButton = new QToolButton(this);
addButton->setText(tr("Add"));
addButton->setIcon(QIcon(QString::fromUtf8(
":/trolltech/assistant/images/%1/addtab.png").arg(system)));
addButton->setIcon(QIcon(QString::fromLatin1(
":/trolltech/assistant/images/" SYSTEM "/addtab.png")));
addButton->setAutoRaise(true);
addButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
hlayout->addWidget(addButton);
@@ -458,8 +459,8 @@ void BookmarkWidget::setup(bool showButtons)
removeButton = new QToolButton(this);
removeButton->setText(tr("Remove"));
removeButton->setIcon(QIcon(QString::fromUtf8(
":/trolltech/assistant/images/%1/closetab.png").arg(system)));
removeButton->setIcon(QIcon(QString::fromLatin1(
":/trolltech/assistant/images/" SYSTEM "/closetab.png")));
removeButton->setAutoRaise(true);
removeButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
hlayout->addWidget(removeButton);