Refactor using Fable
This commit is contained in:
90 files changed
+2080
-2267
No files matched your search
@@ -6,7 +6,7 @@
|
||||
#include <QPointer>
|
||||
#include <QFuture>
|
||||
|
||||
#include "formats/ReaderFactory.h"
|
||||
#include "formats/FormatRegistry.h"
|
||||
|
||||
class FormatReader;
|
||||
|
||||
@@ -21,8 +21,7 @@ class HistoryBookModel : public QObject {
|
||||
Q_PROPERTY(QString coverImageUrl READ coverImageUrl NOTIFY coverImageLoaded)
|
||||
|
||||
public:
|
||||
explicit HistoryBookModel(ReaderFactory &factory, QObject *parent = nullptr);
|
||||
explicit HistoryBookModel(const QString &filePath, double progress, const QString &lastOpened, ReaderFactory &factory, QObject *parent = nullptr);
|
||||
explicit HistoryBookModel(const QString &filePath, double progress, const QString &lastOpened, FormatRegistry ®istry, QObject *parent = nullptr);
|
||||
~HistoryBookModel() override;
|
||||
|
||||
QString filePath() const;
|
||||
@@ -39,9 +38,6 @@ public:
|
||||
|
||||
void loadMetadata();
|
||||
|
||||
public slots:
|
||||
void onMetadataLoaded();
|
||||
|
||||
signals:
|
||||
void progressChanged();
|
||||
void lastOpenedChanged();
|
||||
@@ -57,7 +53,7 @@ private:
|
||||
QString m_coverImageUrl;
|
||||
bool m_metadataLoaded = false;
|
||||
QFuture<void> m_metadataFuture;
|
||||
ReaderFactory &m_factory;
|
||||
FormatRegistry &m_registry;
|
||||
};
|
||||
|
||||
#endif // HISTORYBOOKMODEL_H
|
||||
Reference in new issue
Block a user