txt support
This commit is contained in:
11 files changed
+781
-14
No files matched your search
@@ -5,6 +5,7 @@
|
||||
#include "backend/formats/comic/ComicReader.h"
|
||||
#include "backend/formats/EpubReader.h"
|
||||
#include "backend/formats/Fb2Reader.h"
|
||||
#include "backend/formats/TxtReader.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QQmlEngine>
|
||||
@@ -44,6 +45,17 @@ FormatSpec FormatSpec::fb2(const QString &ext, SourceFactory makeSource)
|
||||
};
|
||||
}
|
||||
|
||||
FormatSpec FormatSpec::txt(const QString &ext)
|
||||
{
|
||||
return FormatSpec{
|
||||
ext,
|
||||
false,
|
||||
QString(),
|
||||
[] { return std::make_unique<TxtReader>(); },
|
||||
nullptr
|
||||
};
|
||||
}
|
||||
|
||||
FormatRegistry::FormatRegistry(QVector<FormatSpec> specs)
|
||||
: m_specs(std::move(specs))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user