mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
fix history loading issue of notebook
This commit is contained in:
parent
4defcc7aea
commit
0784fd43f3
@ -9,6 +9,7 @@
|
|||||||
#include "notebookmgr.h"
|
#include "notebookmgr.h"
|
||||||
#include <notebook/notebook.h>
|
#include <notebook/notebook.h>
|
||||||
#include <notebookbackend/inotebookbackend.h>
|
#include <notebookbackend/inotebookbackend.h>
|
||||||
|
#include "exception.h"
|
||||||
|
|
||||||
using namespace vnotex;
|
using namespace vnotex;
|
||||||
|
|
||||||
@ -64,7 +65,15 @@ void HistoryMgr::loadHistory()
|
|||||||
for (const auto &item : history) {
|
for (const auto &item : history) {
|
||||||
auto fullItem = QSharedPointer<HistoryItemFull>::create();
|
auto fullItem = QSharedPointer<HistoryItemFull>::create();
|
||||||
fullItem->m_item = item;
|
fullItem->m_item = item;
|
||||||
|
|
||||||
|
// We saved the absolute path by mistake in previous version.
|
||||||
|
try {
|
||||||
fullItem->m_item.m_path = backend->getFullPath(item.m_path);
|
fullItem->m_item.m_path = backend->getFullPath(item.m_path);
|
||||||
|
} catch (Exception &p_e) {
|
||||||
|
qWarning() << "skipped loading history item" << item.m_path << "from notebook" << nb->getName() << p_e.what();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
fullItem->m_notebookName = nb->getName();
|
fullItem->m_notebookName = nb->getName();
|
||||||
m_history.push_back(fullItem);
|
m_history.push_back(fullItem);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user