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(); themeChanged();
connect(&m_theme, SIGNAL(themeChanged()), connect(&m_theme, SIGNAL(themeChanged()),
this, SLOT(themeChanged())); this, SLOT(themeChanged()));
installEventFilter(qApp); qApp->installEventFilter(this);
const QString configFile = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1Char('/') + plasmarc; const QString configFile = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1Char('/') + plasmarc;
KDirWatch::self()->addFile(configFile); KDirWatch::self()->addFile(configFile);

View File

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