1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-15 02:46:57 +01:00

Be careful about infinite recursion when loading a stylesheet that changes the palette.

This commit is contained in:
David Sansome 2010-04-26 13:13:24 +00:00
parent d6d01618c5
commit 6a74ac4736

View File

@ -90,6 +90,8 @@ void StyleSheetLoader::ReplaceColor(QString* css, const QString& name,
bool StyleSheetLoader::eventFilter(QObject* obj, QEvent* event) {
if (event->type() != QEvent::PaletteChange)
return false;
if (!event->spontaneous()) // Ignore events from our setStyleSheet
return false;
QWidget* widget = qobject_cast<QWidget*>(obj);
if (!widget || !filenames_.contains(widget))