summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-10-15 15:24:04 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-10-15 15:24:04 (GMT)
commit759234c0e3666536496660746e97995024dc61c2 (patch)
tree68972c264a35be03ece206d9b0bedd6c95566c45
parent4ec60eff3d58f17c100b20c2f39ae90cc4287a76 (diff)
Port away from KSharedPtr
-rw-r--r--lib/document/document.h2
-rw-r--r--lib/document/documentfactory.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/document/document.h b/lib/document/document.h
index 193587d..9b1ee4d 100644
--- a/lib/document/document.h
+++ b/lib/document/document.h
@@ -90,7 +90,7 @@ public:
LoadingFailed ///< Image loading has failed
};
- typedef KSharedPtr<Document> Ptr;
+ typedef QExplicitlySharedDataPointer<Document> Ptr;
~Document();
/**
diff --git a/lib/document/documentfactory.cpp b/lib/document/documentfactory.cpp
index 20e3523..b6624ac 100644
--- a/lib/document/documentfactory.cpp
+++ b/lib/document/documentfactory.cpp
@@ -96,7 +96,7 @@ struct DocumentFactoryPrivate
DocumentMap::Iterator it = map.begin(), end = map.end();
for (; it != end; ++it) {
DocumentInfo* info = it.value();
- if (info->mDocument.count() == 1 && !info->mDocument->isModified()) {
+ if (info->mDocument->ref == 1 && !info->mDocument->isModified()) {
unreferencedImages.insert(info->mLastAccess, it.key());
}
}