From f890dd8c22cae9e90d55b763f1d896b25975aeab Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Mon, 27 Nov 2023 20:34:50 -0500 Subject: Remove variants from QtConcurrent in main window The std::variants weren't used and were making the code more complex to no advantage. All code that would have benefited from variants has already been moved to QThreads elsewhere --- src/archive/base_archive.h | 2 +- src/archive/mastodon.cpp | 2 +- src/archive/mastodon.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/archive') diff --git a/src/archive/base_archive.h b/src/archive/base_archive.h index 7d52cd5..bf43306 100644 --- a/src/archive/base_archive.h +++ b/src/archive/base_archive.h @@ -29,7 +29,7 @@ public: }; virtual ~Archive() {}; - virtual std::variant init() = 0; + virtual InitError init() = 0; static Archive* create_archive(ArchiveType archive_type, const QString& main_filename); diff --git a/src/archive/mastodon.cpp b/src/archive/mastodon.cpp index 50253c6..781f928 100644 --- a/src/archive/mastodon.cpp +++ b/src/archive/mastodon.cpp @@ -19,7 +19,7 @@ MastodonArchive::MastodonArchive(const QString& filename) : Archive(filename) {} -std::variant MastodonArchive::init() { +MastodonArchive::InitError MastodonArchive::init() { QFile outbox_file(main_filename); if (!outbox_file.open(QIODevice::ReadOnly | QIODevice::Text)) diff --git a/src/archive/mastodon.h b/src/archive/mastodon.h index 0d57d7a..75bc7ec 100644 --- a/src/archive/mastodon.h +++ b/src/archive/mastodon.h @@ -15,7 +15,7 @@ class MastodonArchive : public Archive { public: MastodonArchive(const QString& filename); ~MastodonArchive(); - std::variant init(); + InitError init(); void update_status_list(ViewStatusTypes allowed_types, QListWidget *parent); APActivity* get_activity(ArchiveItemRef index, Hinting_t hinting = {}); -- cgit v1.2.3-54-g00ecf