forked from qt-creator/qt-creator
QmlJsTools: Remove unneeded #ifdef.
Replace compile-time check for host OS with runtime check. Change-Id: I78cd914e82a604c2c78fa6b679baa6a0392d2ed3 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <coreplugin/manhattanstyle.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QPainter>
|
||||
@@ -103,8 +104,8 @@ QmlConsoleView::QmlConsoleView(QWidget *parent) :
|
||||
"image: none; }"));
|
||||
|
||||
QString baseName = QApplication::style()->objectName();
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
if (baseName == QLatin1String("windows")) {
|
||||
if (Utils::HostOsInfo::isAnyUnixHost() && !Utils::HostOsInfo::isMacHost()
|
||||
&& baseName == QLatin1String("windows")) {
|
||||
// Sometimes we get the standard windows 95 style as a fallback
|
||||
if (QStyleFactory::keys().contains(QLatin1String("Fusion")))
|
||||
baseName = QLatin1String("fusion"); // Qt5
|
||||
@@ -117,7 +118,6 @@ QmlConsoleView::QmlConsoleView(QWidget *parent) :
|
||||
baseName = QLatin1String("cleanlooks");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
QmlConsoleViewStyle *style = new QmlConsoleViewStyle(baseName);
|
||||
setStyle(style);
|
||||
style->setParent(this);
|
||||
|
||||
Reference in New Issue
Block a user