Skip to content

Commit

Permalink
Warn when using the session restore feature
Browse files Browse the repository at this point in the history
Due to the potential impact of this featuring having bugs, for now it is best to warn the users about this feature.
  • Loading branch information
dail8859 committed Jan 13, 2023
1 parent 75cab4f commit 27536bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/NotepadNext/dialogs/PreferencesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include "Settings.h"

#include <QMessageBox>

PreferencesDialog::PreferencesDialog(Settings *settings, QWidget *parent) :
QDialog(parent, Qt::Tool),
ui(new Ui::PreferencesDialog),
Expand Down Expand Up @@ -55,6 +57,9 @@ PreferencesDialog::PreferencesDialog(Settings *settings, QWidget *parent) :
ui->checkBoxUnsavedFiles->setChecked(false);
ui->checkBoxRestoreTempFiles->setChecked(false);
}
else {
QMessageBox::warning(this, tr("Warning"), tr("This feature is experimental and it should not be considered safe for critically important work. It may lead to possible data loss. Use at your own risk."));
}
});

connect(settings, &Settings::restoreUnsavedFilesChanged, ui->checkBoxUnsavedFiles, &QCheckBox::setChecked);
Expand Down

0 comments on commit 27536bb

Please sign in to comment.