diff --git a/src/Lib/Document/VivyDocument.cc b/src/Lib/Document/VivyDocument.cc index f9406f5ee2b3deec5345545448af7bcea8a22a36..59dec54cf7574d452fad2e34902462f63a41dd22 100644 --- a/src/Lib/Document/VivyDocument.cc +++ b/src/Lib/Document/VivyDocument.cc @@ -72,18 +72,18 @@ VivyDocument::loadSaveJsonDocumentFile_ALPHA(VivyDocument *const self, const QJs throw std::runtime_error("The document was edited outside of Vivy"); if (QJsonValue audio = json[KeySubDocuments][KeySubAudio]; - !audio.isNull() && !self->loadSubDocument(audio.toString(), Capabilities::AudioAble)) + !audio.isUndefined() && !self->loadSubDocument(audio.toString(), Capabilities::AudioAble)) throw std::runtime_error("Failed to load audio sub document"); if (QJsonValue video = json[KeySubDocuments][KeySubVideo]; - !video.isNull() && !self->loadSubDocument(video.toString(), Capabilities::VideoAble)) + !video.isUndefined() && !self->loadSubDocument(video.toString(), Capabilities::VideoAble)) throw std::runtime_error("Failed to load video sub document"); if (QJsonValue internalAssSource = json[KeySubDocuments][KeyInternalAssSource]; - !internalAssSource.isNull() && internalAssSource.toBool()) { + !internalAssSource.isUndefined() && internalAssSource.toBool()) { // ASS is inside Vivy document throw std::runtime_error("The internal ASS feature is not supported for now"); - } else if (QJsonValue ass = json[KeySubDocuments][KeySubAss]; !ass.isNull()) { + } else if (QJsonValue ass = json[KeySubDocuments][KeySubAss]; !ass.isUndefined()) { // ASS in its own ASS file if (!self->loadSubDocument(ass.toString(), Capabilities::AssAble)) throw std::runtime_error("Failed to load ASS sub document"); @@ -98,7 +98,7 @@ VivyDocument::loadSaveJsonDocumentFile(const QJsonDocument &json) "document to this function"); const QJsonValue savedVersionJson = json[KeyDocumentVersion]; - if (savedVersionJson.isNull()) + if (savedVersionJson.isUndefined()) throw std::runtime_error("No version present in the saved VivyDocument"); const QString savedVersion = savedVersionJson.toString();