Improve format and error handling
This commit is contained in:
23 files changed
+138
-49
No files matched your search
@@ -6,6 +6,8 @@
|
||||
#include <QPointer>
|
||||
#include <QFuture>
|
||||
|
||||
#include "ReaderFactory.h"
|
||||
|
||||
class FormatReader;
|
||||
|
||||
class LibraryBookModel : public QObject {
|
||||
@@ -18,8 +20,8 @@ class LibraryBookModel : public QObject {
|
||||
Q_PROPERTY(QString coverImageUrl READ coverImageUrl NOTIFY coverImageLoaded)
|
||||
|
||||
public:
|
||||
explicit LibraryBookModel(QObject *parent = nullptr);
|
||||
explicit LibraryBookModel(const QString &filePath, double progress = 0.0, const QString &lastOpened = QString(), QObject *parent = nullptr);
|
||||
explicit LibraryBookModel(ReaderFactory &factory, QObject *parent = nullptr);
|
||||
explicit LibraryBookModel(const QString &filePath, double progress, const QString &lastOpened, ReaderFactory &factory, QObject *parent = nullptr);
|
||||
~LibraryBookModel() override;
|
||||
|
||||
QString filePath() const;
|
||||
@@ -54,6 +56,7 @@ private:
|
||||
QString m_coverImageUrl;
|
||||
bool m_metadataLoaded = false;
|
||||
QFuture<void> m_metadataFuture;
|
||||
ReaderFactory &m_factory;
|
||||
};
|
||||
|
||||
#endif // LIBRARYBOOKMODEL_H
|
||||
Reference in new issue
Block a user