Changeset View
Changeset View
Standalone View
Standalone View
kate/katedocmanager.cpp
Show First 20 Lines • Show All 182 Lines • ▼ Show 20 Line(s) | 182 | } else { | |||
---|---|---|---|---|---|
183 | doc = createDoc(docInfo); | 183 | doc = createDoc(docInfo); | ||
184 | } | 184 | } | ||
185 | 185 | | |||
186 | if (!encoding.isEmpty()) { | 186 | if (!encoding.isEmpty()) { | ||
187 | doc->setEncoding(encoding); | 187 | doc->setEncoding(encoding); | ||
188 | } | 188 | } | ||
189 | 189 | | |||
190 | if (!u.isEmpty()) { | 190 | if (!u.isEmpty()) { | ||
191 | if (!loadMetaInfos(doc, u)) { | | |||
192 | doc->openUrl(u); | 191 | doc->openUrl(u); | ||
193 | } | 192 | loadMetaInfos(doc, u); | ||
194 | } | 193 | } | ||
195 | } | 194 | } | ||
196 | 195 | | |||
197 | // | 196 | // | ||
198 | // if needed, register as temporary file | 197 | // if needed, register as temporary file | ||
199 | // | 198 | // | ||
200 | if (isTempFile && u.isLocalFile()) { | 199 | if (isTempFile && u.isLocalFile()) { | ||
201 | QFileInfo fi(u.toLocalFile()); | 200 | QFileInfo fi(u.toLocalFile()); | ||
▲ Show 20 Lines • Show All 271 Lines • ▼ Show 20 Line(s) | 471 | { | |||
473 | if (m_docInfos.contains(doc)) { | 472 | if (m_docInfos.contains(doc)) { | ||
474 | m_docInfos[doc]->modifiedOnDisc = b; | 473 | m_docInfos[doc]->modifiedOnDisc = b; | ||
475 | m_docInfos[doc]->modifiedOnDiscReason = reason; | 474 | m_docInfos[doc]->modifiedOnDiscReason = reason; | ||
476 | slotModChanged1(doc); | 475 | slotModChanged1(doc); | ||
477 | } | 476 | } | ||
478 | } | 477 | } | ||
479 | 478 | | |||
480 | /** | 479 | /** | ||
481 | * Load file and file's meta-information if the MD5 didn't change since last time. | 480 | * Load file's meta-information if the checksum didn't change since last time. | ||
482 | */ | 481 | */ | ||
483 | bool KateDocManager::loadMetaInfos(KTextEditor::Document *doc, const QUrl &url) | 482 | bool KateDocManager::loadMetaInfos(KTextEditor::Document *doc, const QUrl &url) | ||
484 | { | 483 | { | ||
485 | if (!m_saveMetaInfos) { | 484 | if (!m_saveMetaInfos) { | ||
486 | return false; | 485 | return false; | ||
487 | } | 486 | } | ||
488 | 487 | | |||
489 | if (!m_metaInfos.hasGroup(url.toDisplayString())) { | 488 | if (!m_metaInfos.hasGroup(url.toDisplayString())) { | ||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |