aboutsummaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 89f550d..4fc3970 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1,6 +1,6 @@
#include "mainwindow.h"
#include "./ui_mainwindow.h"
-#include "src/archive_parser.h"
+#include "src/archive/base_archive.h"
#include "src/finddialog.h"
#include "src/list_item.h"
#include "src/command_line.h"
@@ -218,7 +218,9 @@ void MainWindow::open_file(const QString &filename) {
open_file_filename = filename;
QApplication::setOverrideCursor(Qt::WaitCursor);
- data_archive = new Archive(filename, ArchiveType::MASTODON);
+
+ data_archive = Archive::create_archive(ArchiveType::MASTODON, filename);
+ if (not data_archive) return;
QFuture<std::variant<QString, Archive::InitError>> parse_error = QtConcurrent::run(data_archive, &Archive::init);
archive_thread_watcher.setFuture(parse_error);