Fix... something to do with the build?

This commit is contained in:
Lukas Brübach 2025-06-13 12:05:33 +02:00
parent 297654b053
commit a3e65a3388
2 changed files with 11 additions and 9 deletions

View file

@ -13,8 +13,10 @@
#include <QTimer> #include <QTimer>
#include <QVBoxLayout> #include <QVBoxLayout>
DeckPreviewTagDialog::DeckPreviewTagDialog(const QStringList &knownTags, const QStringList &activeTags, QWidget *parent) DeckPreviewTagDialog::DeckPreviewTagDialog(const QStringList &knownTags,
: QDialog(parent), activeTags_(activeTags), knownTags_(knownTags) const QStringList &_activeTags,
QWidget *parent)
: QDialog(parent), activeTags(_activeTags), knownTags_(knownTags)
{ {
resize(400, 500); resize(400, 500);
@ -110,19 +112,19 @@ void DeckPreviewTagDialog::retranslateUi()
void DeckPreviewTagDialog::refreshTagList() void DeckPreviewTagDialog::refreshTagList()
{ {
// First, clear the current tags in the list view // First, clear the current tags in the list view
tagListView_->clear(); tagListView->clear();
// Get the updated list of tags from SettingsCache // Get the updated list of tags from SettingsCache
QStringList defaultTags = SettingsCache::instance().getVisualDeckStorageDefaultTagsList(); QStringList defaultTags = SettingsCache::instance().getVisualDeckStorageDefaultTagsList();
QStringList combinedTags = defaultTags + knownTags_ + activeTags_; QStringList combinedTags = defaultTags + knownTags_ + activeTags;
combinedTags.removeDuplicates(); combinedTags.removeDuplicates();
// Re-populate the tag list view // Re-populate the tag list view
for (const auto &tag : combinedTags) { for (const auto &tag : combinedTags) {
auto *item = new QListWidgetItem(tagListView_); auto *item = new QListWidgetItem(tagListView);
auto *tagWidget = new DeckPreviewTagItemWidget(tag, activeTags_.contains(tag), this); auto *tagWidget = new DeckPreviewTagItemWidget(tag, activeTags.contains(tag), this);
tagListView_->addItem(item); tagListView->addItem(item);
tagListView_->setItemWidget(item, tagWidget); tagListView->setItemWidget(item, tagWidget);
connect(tagWidget->checkBox(), &QCheckBox::toggled, this, &DeckPreviewTagDialog::onCheckboxStateChanged); connect(tagWidget->checkBox(), &QCheckBox::toggled, this, &DeckPreviewTagDialog::onCheckboxStateChanged);
} }

View file

@ -39,7 +39,7 @@ private:
QPushButton *okButton; QPushButton *okButton;
QPushButton *editButton; QPushButton *editButton;
QPushButton *cancelButton; QPushButton *cancelButton;
QStringList activeTags_; QStringList activeTags;
QStringList knownTags_; QStringList knownTags_;
}; };