diff --git a/kcmkwin/kwindecoration/kwindecoration.cpp b/kcmkwin/kwindecoration/kwindecoration.cpp index 1f7a20969b..b135fcf46c 100644 --- a/kcmkwin/kwindecoration/kwindecoration.cpp +++ b/kcmkwin/kwindecoration/kwindecoration.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -78,6 +79,15 @@ KWinDecorationModule::KWinDecorationModule(QWidget* parent, const QVariantList & , m_lastPreviewWidth(-1) , m_previewUpdateTimer(NULL) { + const QString mainQmlPath = KStandardDirs::locate("data", "kwin/kcm_kwindecoration/main.qml"); + if (mainQmlPath.isNull()) { + // TODO 4.10 i18n this + KMessageBox::error(this, "

Installation error

" + "The resource

kwin/kcm_kwindecoration/main.qml

could not be located in any application data path." + "

Please contact your distribution

" + "The application will now abort", "Installation Error"); + abort(); + } qmlRegisterType("org.kde.kwin.aurorae", 0, 1, "AuroraeTheme"); m_ui = new KWinDecorationForm(this); m_ui->configureDecorationButton->setIcon(KIcon("configure")); @@ -102,7 +112,7 @@ KWinDecorationModule::KWinDecorationModule(QWidget* parent, const QVariantList & m_ui->decorationList->rootContext()->setContextProperty("highlightColor", m_ui->decorationList->palette().color(QPalette::Highlight)); m_ui->decorationList->rootContext()->setContextProperty("sliderWidth", m_ui->decorationList->verticalScrollBar()->width()); m_ui->decorationList->rootContext()->setContextProperty("auroraeSource", KStandardDirs::locate("data", "kwin/aurorae/aurorae.qml")); - m_ui->decorationList->setSource(KStandardDirs::locate("data", "kwin/kcm_kwindecoration/main.qml")); + m_ui->decorationList->setSource(mainQmlPath); readConfig(style);