From da6afaedc1bce08ee78b3f8f780ab72ce1f54b6f Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Sat, 10 Jun 2023 19:03:06 -0400 Subject: 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. --- src/mainwindow.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/mainwindow.cpp') 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) { -- cgit v1.2.3-54-g00ecf