Use installEventFilter calls properly
Should fix some font-change related bugs
This commit is contained in:
parent
82e9bd46d0
commit
461042a240
@ -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);
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user