aboutsummaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorConfuSomu2023-06-10 19:03:06 -0400
committerConfuSomu2023-06-10 19:03:06 -0400
commitda6afaedc1bce08ee78b3f8f780ab72ce1f54b6f (patch)
tree8c1ae37cf1a2f7e63b0105aff5f7360c1d2a76b9 /src/mainwindow.cpp
parent7e4c7905c9e74d76de2e03413af0dc9e4cb84683 (diff)
downloadActorViewer-da6afaedc1bce08ee78b3f8f780ab72ce1f54b6f.tar
ActorViewer-da6afaedc1bce08ee78b3f8f780ab72ce1f54b6f.tar.gz
ActorViewer-da6afaedc1bce08ee78b3f8f780ab72ce1f54b6f.zip
Remove outbox_filename member from MainWindow
We don't need to store the outbox filename in MainWindow as all processing of the current archive is done by the data_archive member and requires us to only initially pass the archive filename.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index cb02bc9..363dcc0 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -48,7 +48,6 @@ void MainWindow::on_actionOpen_triggered(bool checked) {
fileDialog.setNameFilter(tr("Mastodon data export directory (outbox.json)"));
if (fileDialog.exec()) {
QStringList files = fileDialog.selectedFiles();
- ui->statusInfoText->setText(files[0]);
open_file(files[0]);
}
}
@@ -192,8 +191,6 @@ void MainWindow::on_menuView_aboutToHide() {
}
void MainWindow::open_file(const QString &filename) {
- outbox_filename = filename;
-
if (data_archive) {
delete data_archive;
data_archive = nullptr;
@@ -201,7 +198,7 @@ void MainWindow::open_file(const QString &filename) {
// TODO: Do this in another thread
QApplication::setOverrideCursor(Qt::WaitCursor);
- data_archive = new Archive(outbox_filename, ArchiveType::MASTODON);
+ data_archive = new Archive(filename, ArchiveType::MASTODON);
auto parse_error = data_archive->init();
switch (parse_error) {