mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00

* Draft: feature/pdf_view (#2268) * build base code * simple run successful * add save session * add pdfjs resource * simple pdf viewer Co-authored-by: chendapao <feloxx@163.com>
26 lines
542 B
C++
26 lines
542 B
C++
#include "bufferprovider.h"
|
|
|
|
#include <QFileInfo>
|
|
|
|
using namespace vnotex;
|
|
|
|
bool BufferProvider::checkFileExistsOnDisk() const
|
|
{
|
|
return QFileInfo::exists(getContentPath());
|
|
}
|
|
|
|
QDateTime BufferProvider::getLastModifiedFromFile() const
|
|
{
|
|
return QFileInfo(getContentPath()).lastModified();
|
|
}
|
|
|
|
bool BufferProvider::checkFileChangedOutside() const
|
|
{
|
|
// TODO: support non-local URLs.
|
|
QFileInfo info(getContentPath());
|
|
if (!info.exists() || m_lastModified != info.lastModified()) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|