Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 6cc9c99d authored by Boudewijn Rempt's avatar Boudewijn Rempt

Don't accept broken KoDocumentRdf's

If your installation is missing some parts, but not others, rdf won't
work but it will be compiled in. The symptom is that we cannot create
a Soprano::Model. So if we're handed a KoDocumentRdf without a model,
don't accept it.
parent 1f7380d5
......@@ -823,10 +823,11 @@ KoDocumentRdf *KoDocument::documentRdf() const
void KoDocument::setDocumentRdf(KoDocumentRdf *rdfDocument)
delete d->docRdf;
d->docRdf = rdfDocument;
d->docRdf = 0;
if (rdfDocument->model()) {
d->docRdf = rdfDocument;
......@@ -76,9 +76,10 @@ class KoDocumentRdfPrivate
: model(Soprano::createModel())
: model(0)
, prefixMapping(0)
model = Soprano::createModel();
......@@ -84,7 +84,7 @@ class KoRdfFoaF;
* locations() methods of this class. Each of these methods optionally
* takes a Soprano::Model and returns a list of SemanticItems of a
* particular subclass. If you do not pass an Soprano::Model to the
* methods the defualt model() of the KoDocumentRdf is used. By
* methods the default model() of the KoDocumentRdf is used. By
* allowing you to pass a model explicitly, you can find contacts that
* exist in a subset of the full Rdf graph for a document. This is
* useful if you want to find the contacts in the users current
......@@ -177,7 +177,7 @@ public:
* Find all the KoTextInlineRdf objects that exist in the
* document and update the statements in the Soprano::model to
* document and update the statements in the Soprano::(model) to
* reflect the current state of the inline Rdf.
void updateInlineRdfStatements(const QTextDocument *qdoc);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment