mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-23 02:42:16 -07:00
use brackets in one-liner if statements
This commit is contained in:
parent
d44b62badc
commit
977e4ed57b
1 changed files with 8 additions and 4 deletions
|
|
@ -769,8 +769,9 @@ void TabDeckEditor::actNewDeck()
|
||||||
{
|
{
|
||||||
auto deckOpenLocation = confirmOpen(false);
|
auto deckOpenLocation = confirmOpen(false);
|
||||||
|
|
||||||
if (deckOpenLocation == CANCELLED)
|
if (deckOpenLocation == CANCELLED) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (deckOpenLocation == NEW_TAB) {
|
if (deckOpenLocation == NEW_TAB) {
|
||||||
emit openDeckEditor(nullptr);
|
emit openDeckEditor(nullptr);
|
||||||
|
|
@ -789,8 +790,9 @@ void TabDeckEditor::actLoadDeck()
|
||||||
{
|
{
|
||||||
auto deckOpenLocation = confirmOpen();
|
auto deckOpenLocation = confirmOpen();
|
||||||
|
|
||||||
if (deckOpenLocation == CANCELLED)
|
if (deckOpenLocation == CANCELLED) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QFileDialog dialog(this, tr("Load deck"));
|
QFileDialog dialog(this, tr("Load deck"));
|
||||||
dialog.setDirectory(SettingsCache::instance().getDeckPath());
|
dialog.setDirectory(SettingsCache::instance().getDeckPath());
|
||||||
|
|
@ -882,8 +884,9 @@ void TabDeckEditor::actLoadDeckFromClipboard()
|
||||||
{
|
{
|
||||||
auto deckOpenLocation = confirmOpen();
|
auto deckOpenLocation = confirmOpen();
|
||||||
|
|
||||||
if (deckOpenLocation == CANCELLED)
|
if (deckOpenLocation == CANCELLED) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DlgLoadDeckFromClipboard dlg(this);
|
DlgLoadDeckFromClipboard dlg(this);
|
||||||
if (!dlg.exec())
|
if (!dlg.exec())
|
||||||
|
|
@ -1028,8 +1031,9 @@ TabDeckEditor::DeckOpenLocation TabDeckEditor::confirmOpen(const bool openInSame
|
||||||
|
|
||||||
// `exec()` returns an opaque value if a non-standard button was clicked.
|
// `exec()` returns an opaque value if a non-standard button was clicked.
|
||||||
// Directly check if newTabButton was clicked before switching over the standard buttons.
|
// Directly check if newTabButton was clicked before switching over the standard buttons.
|
||||||
if (msgBox.clickedButton() == newTabButton)
|
if (msgBox.clickedButton() == newTabButton) {
|
||||||
return NEW_TAB;
|
return NEW_TAB;
|
||||||
|
}
|
||||||
|
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
case QMessageBox::Save:
|
case QMessageBox::Save:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue