Fixes: Don't fall back to win95 on KDE4, at least use plastique.

Task:     -
RevBy:    -
AutoTest: -
Details:  -
This commit is contained in:
dt
2008-12-10 17:25:47 +01:00
parent d4139efa28
commit 13420d3e76

View File

@@ -186,6 +186,15 @@ MainWindow::MainWindow() :
QCoreApplication::setOrganizationName(QLatin1String("Nokia"));
QSettings::setDefaultFormat(QSettings::IniFormat);
QString baseName = qApp->style()->objectName();
if (baseName == "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 = "plastique";
else
baseName = "cleanlooks";
}
qApp->setStyle(new ManhattanStyle(baseName));
statusBar()->setProperty("p_styled", true);
}