mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 16:32:16 -07:00
Lint.
This commit is contained in:
parent
b6a96089ec
commit
b26005a0c4
3 changed files with 9 additions and 13 deletions
|
|
@ -1045,11 +1045,11 @@ void TabDeckEditor::openDeckFromFile(const QString &fileName, DeckOpenLocation d
|
|||
}
|
||||
} else {
|
||||
delete l;
|
||||
updateBannerCardComboBox();
|
||||
if (!l->getBannerCard().isEmpty()) {
|
||||
qDebug() << "Found banner card:" << l->getBannerCard();
|
||||
bannerCardComboBox->setCurrentIndex(bannerCardComboBox->findText(l->getBannerCard()));
|
||||
}
|
||||
updateBannerCardComboBox();
|
||||
if (!l->getBannerCard().isEmpty()) {
|
||||
qDebug() << "Found banner card:" << l->getBannerCard();
|
||||
bannerCardComboBox->setCurrentIndex(bannerCardComboBox->findText(l->getBannerCard()));
|
||||
}
|
||||
QMessageBox::critical(this, tr("Error"), tr("Could not open deck at %1").arg(fileName));
|
||||
}
|
||||
setSaveStatus(true);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include "../printing_selector/printing_selector.h"
|
||||
#include "../visual_deck_storage/visual_deck_storage_widget.h"
|
||||
|
||||
|
||||
/**
|
||||
* @class CardSizeWidget
|
||||
* @brief A widget for adjusting card sizes using a slider.
|
||||
|
|
@ -44,18 +43,15 @@ CardSizeWidget::CardSizeWidget(QWidget *parent, FlowWidget *flowWidget, int defa
|
|||
void CardSizeWidget::updateCardSizeSetting(int newValue)
|
||||
{
|
||||
// Check the type of the parent widget
|
||||
if ((parent = qobject_cast<PrintingSelector*>(parentWidget()))) {
|
||||
if ((parent = qobject_cast<PrintingSelector *>(parentWidget()))) {
|
||||
SettingsCache::instance().setPrintingSelectorCardSize(newValue);
|
||||
}
|
||||
else if ((parent = qobject_cast<VisualDeckStorageWidget*>(parentWidget()))) {
|
||||
} else if ((parent = qobject_cast<VisualDeckStorageWidget *>(parentWidget()))) {
|
||||
SettingsCache::instance().setVisualDeckStorageCardSize(newValue);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
qWarning() << "CardSizeWidget has an unexpected parent widget type. Did not set persistent setting.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Gets the slider widget used for adjusting the card size.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include "visual_deck_storage_widget.h"
|
||||
|
||||
#include "visual_deck_storage_search_widget.h"
|
||||
#include "../../../../deck/deck_loader.h"
|
||||
#include "../../../../game/cards/card_database_manager.h"
|
||||
#include "../../../../settings/cache_settings.h"
|
||||
#include "visual_deck_storage_search_widget.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QDirIterator>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue