vnote/src/core/buffer/bufferprovider.cpp
Le Tan 7f2cfe4f52
Pdf view (#2312)
* 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>
2022-12-17 18:52:37 +08:00

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;
}