forked from qt-creator/qt-creator
Get rid of some Q_WS_X11.
This macro isn't defined in Qt5 anymore, so use Q_OS_* where appropriate. Regarding bug QTCREATORBUG-7936: Now the fonts look normal again on GNU/Linux, e.g. in the text editor and the application/compile output pane. Task-number: QTCREATORBUG-7936 Change-Id: I501cca608f273789d095e1138b32c2c8c38b0059 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
committed by
Eike Ziller
parent
945fb79e4b
commit
ed86a7ca58
@@ -218,7 +218,7 @@ int main(int argc, char **argv)
|
||||
setrlimit(RLIMIT_NOFILE, &rl);
|
||||
#endif
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
// QML is unusable with the xlib backend
|
||||
QApplication::setGraphicsSystem("raster");
|
||||
#endif
|
||||
|
||||
@@ -186,7 +186,7 @@ MainWindow::MainWindow() :
|
||||
QCoreApplication::setApplicationVersion(QLatin1String(Core::Constants::IDE_VERSION_LONG));
|
||||
QCoreApplication::setOrganizationName(QLatin1String(Constants::IDE_SETTINGSVARIANT_STR));
|
||||
QString baseName = QApplication::style()->objectName();
|
||||
#ifdef Q_WS_X11
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
if (baseName == QLatin1String("windows")) {
|
||||
// Sometimes we get the standard windows 95 style as a fallback
|
||||
// e.g. if we are running on a KDE4 desktop
|
||||
|
||||
@@ -691,9 +691,7 @@ void DebuggerToolTipWidget::copy()
|
||||
{
|
||||
const QString clipboardText = clipboardContents();
|
||||
QClipboard *clipboard = QApplication::clipboard();
|
||||
#ifdef Q_WS_X11
|
||||
clipboard->setText(clipboardText, QClipboard::Selection);
|
||||
#endif
|
||||
clipboard->setText(clipboardText, QClipboard::Clipboard);
|
||||
}
|
||||
|
||||
|
||||
@@ -225,9 +225,7 @@ void StackTreeView::copyContentsToClipboard()
|
||||
str += QLatin1Char('\n');
|
||||
}
|
||||
QClipboard *clipboard = QApplication::clipboard();
|
||||
# ifdef Q_WS_X11
|
||||
clipboard->setText(str, QClipboard::Selection);
|
||||
# endif
|
||||
clipboard->setText(str, QClipboard::Clipboard);
|
||||
}
|
||||
|
||||
|
||||
@@ -600,9 +600,7 @@ static QString removeWatchActionText(QString exp)
|
||||
static void copyToClipboard(const QString &clipboardText)
|
||||
{
|
||||
QClipboard *clipboard = QApplication::clipboard();
|
||||
#ifdef Q_WS_X11
|
||||
clipboard->setText(clipboardText, QClipboard::Selection);
|
||||
#endif
|
||||
clipboard->setText(clipboardText, QClipboard::Clipboard);
|
||||
}
|
||||
|
||||
|
||||
@@ -921,9 +921,7 @@ void QmlProfilerEventsMainView::copyTableToClipboard() const
|
||||
str += d->textForItem(d->m_model->item(i));
|
||||
}
|
||||
QClipboard *clipboard = QApplication::clipboard();
|
||||
# ifdef Q_WS_X11
|
||||
clipboard->setText(str, QClipboard::Selection);
|
||||
# endif
|
||||
clipboard->setText(str, QClipboard::Clipboard);
|
||||
}
|
||||
|
||||
@@ -933,9 +931,7 @@ void QmlProfilerEventsMainView::copyRowToClipboard() const
|
||||
str = d->textForItem(d->m_model->itemFromIndex(selectedItem()), false);
|
||||
|
||||
QClipboard *clipboard = QApplication::clipboard();
|
||||
# ifdef Q_WS_X11
|
||||
clipboard->setText(str, QClipboard::Selection);
|
||||
# endif
|
||||
clipboard->setText(str, QClipboard::Clipboard);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,15 +55,13 @@ static const bool DEFAULT_ANTIALIAS = true;
|
||||
#ifdef Q_OS_MAC
|
||||
enum { DEFAULT_FONT_SIZE = 12 };
|
||||
static const char *DEFAULT_FONT_FAMILY = "Monaco";
|
||||
#else
|
||||
#ifdef Q_WS_X11
|
||||
#elif defined(Q_OS_UNIX)
|
||||
enum { DEFAULT_FONT_SIZE = 9 };
|
||||
static const char *DEFAULT_FONT_FAMILY = "Monospace";
|
||||
#else
|
||||
enum { DEFAULT_FONT_SIZE = 10 };
|
||||
static const char *DEFAULT_FONT_FAMILY = "Courier";
|
||||
#endif
|
||||
#endif
|
||||
} // anonymous namespace
|
||||
|
||||
namespace TextEditor {
|
||||
|
||||
Reference in New Issue
Block a user