Changeset View
Changeset View
Standalone View
Standalone View
krita/sketch/Theme.cpp
Show First 20 Lines • Show All 362 Lines • ▼ Show 20 Line(s) | 350 | #ifdef Q_OS_WIN | |||
---|---|---|---|---|---|
363 | qml = QString("%1/share/apps/kritasketch/themes/%2/theme.qml").arg(appdir.canonicalPath(), id); | 363 | qml = QString("%1/share/apps/kritasketch/themes/%2/theme.qml").arg(appdir.canonicalPath(), id); | ||
364 | #else | 364 | #else | ||
365 | qml = KoResourcePaths::findResource("data", QString("kritasketch/themes/%1/theme.qml").arg(id)); | 365 | qml = KoResourcePaths::findResource("data", QString("kritasketch/themes/%1/theme.qml").arg(id)); | ||
366 | #endif | 366 | #endif | ||
367 | 367 | | |||
368 | QQmlComponent themeComponent(QmlGlobalEngine::instance()->engine(), parent); | 368 | QQmlComponent themeComponent(QmlGlobalEngine::instance()->engine(), parent); | ||
369 | themeComponent.loadUrl(QUrl::fromLocalFile(qml), QQmlComponent::PreferSynchronous); | 369 | themeComponent.loadUrl(QUrl::fromLocalFile(qml), QQmlComponent::PreferSynchronous); | ||
370 | 370 | | |||
371 | warnKrita << "+++++++++++" << themeComponent.url() << themeComponent.progress() << themeComponent.status(); | ||||
372 | | ||||
371 | if(themeComponent.isError()) { | 373 | if(themeComponent.isError()) { | ||
372 | warnKrita << themeComponent.errorString(); | 374 | warnKrita << themeComponent.errorString(); | ||
373 | return 0; | 375 | return 0; | ||
374 | } | 376 | } | ||
375 | 377 | | |||
376 | Theme* theme = qobject_cast<Theme*>(themeComponent.create()); | 378 | Theme* theme = qobject_cast<Theme*>(themeComponent.create()); | ||
377 | if(!theme) { | 379 | if(!theme) { | ||
378 | warnKrita << "Failed to create theme instance!"; | 380 | warnKrita << "Failed to create theme instance!"; | ||
Show All 39 Lines |