Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 81e16741 authored by Marco Martin's avatar Marco Martin

quit gracefully on sidebar QML errors

It shouldn't crash, but display exactly what the error was with its qml
BUG:394902
parent 00732b70
......@@ -481,6 +481,12 @@ void SidebarMode::initWidget()
d->quickWidget->setSource(QUrl::fromLocalFile(d->package.filePath("mainscript")));
if (!d->quickWidget->rootObject()) {
for (const auto &err : d->quickWidget->errors()) {
qWarning() << err.toString();
}
qFatal("Fatal error while loading the sidebar view qml component");
}
const int rootImplicitWidth = d->quickWidget->rootObject()->property("implicitWidth").toInt();
if (rootImplicitWidth != 0) {
d->quickWidget->setFixedWidth(rootImplicitWidth);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment