Fix strange bitflags handling

pull/380/head
scrawl 10 years ago
parent d36dfbe779
commit ff8bdd74ed

@ -62,7 +62,7 @@ void Wizard::ComponentSelectionPage::initializePage()
if (field(QLatin1String("installation.new")).toBool() == true) if (field(QLatin1String("installation.new")).toBool() == true)
{ {
morrowindItem->setFlags(morrowindItem->flags() & !Qt::ItemIsEnabled & Qt::ItemIsUserCheckable); morrowindItem->setFlags(morrowindItem->flags() & ~Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
morrowindItem->setData(Qt::CheckStateRole, Qt::Checked); morrowindItem->setData(Qt::CheckStateRole, Qt::Checked);
componentsList->addItem(morrowindItem); componentsList->addItem(morrowindItem);
@ -77,7 +77,7 @@ void Wizard::ComponentSelectionPage::initializePage()
if (mWizard->mInstallations[path].hasMorrowind) { if (mWizard->mInstallations[path].hasMorrowind) {
morrowindItem->setText(tr("Morrowind\t\t(installed)")); morrowindItem->setText(tr("Morrowind\t\t(installed)"));
morrowindItem->setFlags(morrowindItem->flags() & !Qt::ItemIsEnabled & Qt::ItemIsUserCheckable); morrowindItem->setFlags(morrowindItem->flags() & ~Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
morrowindItem->setData(Qt::CheckStateRole, Qt::Unchecked); morrowindItem->setData(Qt::CheckStateRole, Qt::Unchecked);
} else { } else {
morrowindItem->setText(tr("Morrowind")); morrowindItem->setText(tr("Morrowind"));
@ -88,7 +88,7 @@ void Wizard::ComponentSelectionPage::initializePage()
if (mWizard->mInstallations[path].hasTribunal) { if (mWizard->mInstallations[path].hasTribunal) {
tribunalItem->setText(tr("Tribunal\t\t(installed)")); tribunalItem->setText(tr("Tribunal\t\t(installed)"));
tribunalItem->setFlags(tribunalItem->flags() & !Qt::ItemIsEnabled & Qt::ItemIsUserCheckable); tribunalItem->setFlags(tribunalItem->flags() & ~Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
tribunalItem->setData(Qt::CheckStateRole, Qt::Unchecked); tribunalItem->setData(Qt::CheckStateRole, Qt::Unchecked);
} else { } else {
tribunalItem->setText(tr("Tribunal")); tribunalItem->setText(tr("Tribunal"));
@ -99,7 +99,7 @@ void Wizard::ComponentSelectionPage::initializePage()
if (mWizard->mInstallations[path].hasBloodmoon) { if (mWizard->mInstallations[path].hasBloodmoon) {
bloodmoonItem->setText(tr("Bloodmoon\t\t(installed)")); bloodmoonItem->setText(tr("Bloodmoon\t\t(installed)"));
bloodmoonItem->setFlags(bloodmoonItem->flags() & !Qt::ItemIsEnabled & Qt::ItemIsUserCheckable); bloodmoonItem->setFlags(bloodmoonItem->flags() & ~Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
bloodmoonItem->setData(Qt::CheckStateRole, Qt::Unchecked); bloodmoonItem->setData(Qt::CheckStateRole, Qt::Unchecked);
} else { } else {
bloodmoonItem->setText(tr("Bloodmoon")); bloodmoonItem->setText(tr("Bloodmoon"));

Loading…
Cancel
Save