forked from qt-creator/qt-creator
Remove dependencies on Plastique and Cleanlooks
We want to move these styles out of the library so we should not depend on them in creator. This patch reverts63cacc4534, since it does not rely on ifdefs. See also5d0f7d2304in master. Change-Id: I8a3762f9bc31c679067ebb0a6b5540bc18e8b836 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
committed by
Eike Ziller
parent
63cacc4534
commit
e629a91fb3
@@ -188,12 +188,16 @@ MainWindow::MainWindow() :
|
||||
#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
|
||||
QByteArray desktopEnvironment = qgetenv("DESKTOP_SESSION");
|
||||
if (desktopEnvironment == "kde")
|
||||
baseName = QLatin1String("plastique");
|
||||
else
|
||||
baseName = QLatin1String("cleanlooks");
|
||||
if (QStyleFactory::keys().contains("Fusion"))
|
||||
baseName = QLatin1String("fusion"); // Qt5
|
||||
else { // Qt4
|
||||
// e.g. if we are running on a KDE4 desktop
|
||||
QByteArray desktopEnvironment = qgetenv("DESKTOP_SESSION");
|
||||
if (desktopEnvironment == "kde")
|
||||
baseName = QLatin1String("plastique");
|
||||
else
|
||||
baseName = QLatin1String("cleanlooks");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
qApp->setStyle(new ManhattanStyle(baseName));
|
||||
|
||||
Reference in New Issue
Block a user