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 f0f301be authored by Silas Lenz's avatar Silas Lenz Committed by Christoph Cullmann

Open document before using it's checksum to load metainfos

loadMetaInfos tried to use the documents checksum before loading. The empty checksum results in it always failing to load metainfo and returning false, thus not using any of the stored metainfo.

BUG: 384087

Test Plan:
1. Enable "Keep meta-information past sessions".
2. Open file (with or without previous bookmarks).
3. Add or remove a bookmark.
4. Close and reopen the file (and/or close and reopen Kate).
5. Previous bookmarks should be reloaded.

Reviewers: #kate, cullmann

Reviewed By: #kate, cullmann

Subscribers: cullmann, ngraham, kwrite-devel

Tags: #kate

Differential Revision:
parent c38a5c70
......@@ -188,9 +188,8 @@ KTextEditor::Document *KateDocManager::openUrl(const QUrl &url, const QString &e
if (!u.isEmpty()) {
if (!loadMetaInfos(doc, u)) {
loadMetaInfos(doc, u);
......@@ -478,7 +477,7 @@ void KateDocManager::slotModifiedOnDisc(KTextEditor::Document *doc, bool b, KTex
* Load file and file's meta-information if the MD5 didn't change since last time.
* Load file's meta-information if the checksum didn't change since last time.
bool KateDocManager::loadMetaInfos(KTextEditor::Document *doc, const QUrl &url)
......@@ -501,6 +500,7 @@ bool KateDocManager::loadMetaInfos(KTextEditor::Document *doc, const QUrl &url)
if (documentInfo(doc)->openedByUser) {
flags << QStringLiteral ("SkipEncoding");
flags << QStringLiteral ("SkipUrl");
doc->readSessionConfig(urlGroup, flags);
} else {
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