Make 'Icon' a namespace not class

This commit is contained in:
Craig Drummond
2018-05-24 19:05:54 +01:00
committed by Craig Drummond
parent b8c9ee4e7c
commit 0aadefef3c
38 changed files with 95 additions and 154 deletions

View File

@@ -102,12 +102,12 @@ MessageBox::ButtonCode MessageBox::questionYesNoCancel(QWidget *parent, const QS
if (!yesText.text.isEmpty()) {
QAbstractButton *btn=box.button(QMessageBox::Yes);
btn->setText(yesText.text);
btn->setIcon(!yesText.icon.isEmpty() && btnIcons ? Icon(yesText.icon) : Icon());
btn->setIcon(!yesText.icon.isEmpty() && btnIcons ? Icon::get(yesText.icon) : QIcon());
}
if (!noText.text.isEmpty()) {
QAbstractButton *btn=box.button(QMessageBox::No);
btn->setText(noText.text);
btn->setIcon(!noText.icon.isEmpty() && btnIcons ? Icon(noText.icon) : Icon());
btn->setIcon(!noText.icon.isEmpty() && btnIcons ? Icon::get(noText.icon) : QIcon());
}
AcceleratorManager::manage(&box);
return -1==box.exec() ? Cancel : map(box.standardButton(box.clickedButton()));