Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Qt6: explicitly check shared pointer instead of converting to bool
Halla Remptdc19edee8356
diff --git a/plugins/impex/libkra/kis_kra_loader.cpp b/plugins/impex/libkra/kis_kra_loader.cppindex a2d17bbe9a..3a695fc6b3 100644--- a/plugins/impex/libkra/kis_kra_loader.cpp+++ b/plugins/impex/libkra/kis_kra_loader.cpp@@ -599,7 +599,7 @@ void KisKraLoader::loadResources(KoStore *store, KisDocument *doc)/// don't try to load the resource if its file is empty/// (which is a sign of a failed save operation)if (!store->device()->atEnd() && !doc->linkedResourcesStorageId().isEmpty()) {- bool result = model.importResource(resourceItem.filename, store->device(), false, doc->linkedResourcesStorageId());+ bool result = !model.importResource(resourceItem.filename, store->device(), false, doc->linkedResourcesStorageId()).isNull();if (!result) {m_d->warningMessages.append(i18nc("Warning message on loading a .kra file", "Embedded resource cannot be imported. The filename of the resource: %1", resourceItem.filename));}