decorationbridge: Fix crash on plasma mobile
Summary: For some reason there m_settings is null there, don't crash in this case. The code definitely contemplates the possibility since it's null by default and on some DecorationBridge::reconfigure() paths. Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, anthonyfieroni, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D27809
This commit is contained in:
parent
f9394d83f7
commit
17e6bd8587
1 changed files with 14 additions and 10 deletions
|
@ -311,17 +311,21 @@ QString settingsProperty(const QVariant &variant)
|
|||
QString DecorationBridge::supportInformation() const
|
||||
{
|
||||
QString b;
|
||||
b.append(QStringLiteral("Plugin: %1\n").arg(m_plugin));
|
||||
b.append(QStringLiteral("Theme: %1\n").arg(m_theme));
|
||||
b.append(QStringLiteral("Plugin recommends border size: %1\n").arg(m_recommendedBorderSize.isNull() ? "No" : m_recommendedBorderSize));
|
||||
b.append(QStringLiteral("Blur: %1\n").arg(m_blur));
|
||||
const QMetaObject *metaOptions = m_settings->metaObject();
|
||||
for (int i=0; i<metaOptions->propertyCount(); ++i) {
|
||||
const QMetaProperty property = metaOptions->property(i);
|
||||
if (QLatin1String(property.name()) == QLatin1String("objectName")) {
|
||||
continue;
|
||||
if (m_noPlugin) {
|
||||
b.append(QStringLiteral("Decorations are disabled"));
|
||||
} else {
|
||||
b.append(QStringLiteral("Plugin: %1\n").arg(m_plugin));
|
||||
b.append(QStringLiteral("Theme: %1\n").arg(m_theme));
|
||||
b.append(QStringLiteral("Plugin recommends border size: %1\n").arg(m_recommendedBorderSize.isNull() ? "No" : m_recommendedBorderSize));
|
||||
b.append(QStringLiteral("Blur: %1\n").arg(m_blur));
|
||||
const QMetaObject *metaOptions = m_settings->metaObject();
|
||||
for (int i=0; i<metaOptions->propertyCount(); ++i) {
|
||||
const QMetaProperty property = metaOptions->property(i);
|
||||
if (QLatin1String(property.name()) == QLatin1String("objectName")) {
|
||||
continue;
|
||||
}
|
||||
b.append(QStringLiteral("%1: %2\n").arg(property.name()).arg(settingsProperty(m_settings->property(property.name()))));
|
||||
}
|
||||
b.append(QStringLiteral("%1: %2\n").arg(property.name()).arg(settingsProperty(m_settings->property(property.name()))));
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue