Changeset View
Changeset View
Standalone View
Standalone View
src/quickaddons/configmodule.cpp
Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Line(s) | 175 | if (!package.isValid()) { | |||
---|---|---|---|---|---|
178 | return nullptr; | 178 | return nullptr; | ||
179 | } | 179 | } | ||
180 | 180 | | |||
181 | if (package.filePath("mainscript").isEmpty()) { | 181 | if (package.filePath("mainscript").isEmpty()) { | ||
182 | d->_errorString = i18n("No QML file provided"); | 182 | d->_errorString = i18n("No QML file provided"); | ||
183 | qWarning() << "Error loading the module" << aboutData()->componentName() << ": no QML file provided"; | 183 | qWarning() << "Error loading the module" << aboutData()->componentName() << ": no QML file provided"; | ||
184 | return nullptr; | 184 | return nullptr; | ||
185 | } | 185 | } | ||
186 | load(); | ||||
186 | 187 | | |||
187 | new QQmlFileSelector(d->_qmlObject->engine(), d->_qmlObject->engine()); | 188 | new QQmlFileSelector(d->_qmlObject->engine(), d->_qmlObject->engine()); | ||
188 | d->_qmlObject->setSource(package.fileUrl("mainscript")); | 189 | d->_qmlObject->setSource(package.fileUrl("mainscript")); | ||
189 | d->_qmlObject->rootContext()->setContextProperty(QStringLiteral("kcm"), this); | 190 | d->_qmlObject->rootContext()->setContextProperty(QStringLiteral("kcm"), this); | ||
190 | d->_qmlObject->completeInitialization(); | 191 | d->_qmlObject->completeInitialization(); | ||
191 | 192 | | |||
192 | if (d->_qmlObject->status() != QQmlComponent::Ready) { | 193 | if (d->_qmlObject->status() != QQmlComponent::Ready) { | ||
193 | d->_errorString = d->_qmlObject->mainComponent()->errorString(); | 194 | d->_errorString = d->_qmlObject->mainComponent()->errorString(); | ||
▲ Show 20 Lines • Show All 295 Lines • Show Last 20 Lines |