Use installEventFilter calls properly

Should fix some font-change related bugs
This commit is contained in:
Martin Klapetek 2014-03-31 18:49:23 +02:00
parent 82e9bd46d0
commit 461042a240
2 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ Units::Units (QObject *parent)
themeChanged();
connect(&m_theme, SIGNAL(themeChanged()),
this, SLOT(themeChanged()));
installEventFilter(qApp);
qApp->installEventFilter(this);
const QString configFile = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1Char('/') + plasmarc;
KDirWatch::self()->addFile(configFile);

View File

@ -604,11 +604,11 @@ void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings
if (colorsFile.isEmpty()) {
colors = 0;
if (qApp) {
installEventFilter(qApp);
qApp->installEventFilter(this);
}
} else {
if (qApp) {
removeEventFilter(qApp);
qApp->removeEventFilter(this);
}
colors = KSharedConfig::openConfig(colorsFile);
}