Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
snipfoo committed Aug 3, 2021
1 parent 7bfbd31 commit 06e7d88
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions src/gui/PasswordGeneratorWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include "core/PasswordHealth.h"
#include "core/Resources.h"
#include "gui/Clipboard.h"
#include "gui/Icons.h"
#include "gui/FileDialog.h"
#include "gui/Icons.h"
#include "gui/MessageBox.h"
#include "gui/styles/StateColorPalette.h"

Expand Down Expand Up @@ -346,20 +346,18 @@ void PasswordGeneratorWidget::deleteWordList()
QString path = itemData.toString();
QString name = QFileInfo(path).fileName();

auto result =
MessageBox::question(this,
tr("Delete the selected wordlist?"),
tr("Do you really want to delete the wordlist \"%1\"?").arg(name),
MessageBox::Delete | MessageBox::Cancel,
MessageBox::Cancel);
auto result = MessageBox::question(this,
tr("Delete the selected wordlist?"),
tr("Do you really want to delete the wordlist \"%1\"?").arg(name),
MessageBox::Delete | MessageBox::Cancel,
MessageBox::Cancel);
if (result != MessageBox::Delete) {
return;
}

if (!path.startsWith("/")) {
MessageBox::critical(this,
tr("Failed to delete wordlist"),
tr("Cannot delete the system wordlist \"%1\"").arg(path));
MessageBox::critical(
this, tr("Failed to delete wordlist"), tr("Cannot delete the system wordlist \"%1\"").arg(path));
return;
}

Expand Down Expand Up @@ -392,13 +390,13 @@ void PasswordGeneratorWidget::addWordList()
QString destPath = destDir.absolutePath() + "/" + fileName;
QFile dest(destPath);
if (dest.exists()) {
auto response =
MessageBox::warning(this,
tr("Wordlist already exists"),
tr("Wordlist \"%1\" already exists.\n"
"Do you want to overwrite it?").arg(fileName),
MessageBox::Overwrite | MessageBox::Cancel,
MessageBox::Cancel);
auto response = MessageBox::warning(this,
tr("Wordlist already exists"),
tr("Wordlist \"%1\" already exists.\n"
"Do you want to overwrite it?")
.arg(fileName),
MessageBox::Overwrite | MessageBox::Cancel,
MessageBox::Cancel);
if (response != MessageBox::Overwrite) {
return;
}
Expand Down

0 comments on commit 06e7d88

Please sign in to comment.