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.

Change-Id: I5326285d880c5e85d8d5ccdeca36fba30cf53ae0
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Jens Bache-Wiig
2012-10-19 13:01:52 +02:00
parent 84c9402c5f
commit 5d0f7d2304
2 changed files with 28 additions and 28 deletions

View File

@@ -109,6 +109,7 @@
#include <QMessageBox>
#include <QMenuBar>
#include <QPushButton>
#include <QStyleFactory>
/*
#ifdef Q_OS_UNIX
@@ -188,12 +189,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));