bugfix instantiating Qt::blue not available in qt5.11

This commit is contained in:
Thomas Ferreira de Lima 2018-06-26 02:53:02 -04:00
parent b93e90f826
commit 73772cc6f8
1 changed files with 4 additions and 4 deletions

View File

@ -68,7 +68,7 @@ ConfirmationDialog::add_info (const std::string &name, bool update, const std::s
item->setText (3, tl::to_qstring (url)); item->setText (3, tl::to_qstring (url));
for (int column = 0; column < list->colorCount (); ++column) { for (int column = 0; column < list->colorCount (); ++column) {
item->setData (column, Qt::ForegroundRole, QVariant (QBrush (update ? Qt::blue : Qt::black))); item->setData (column, Qt::ForegroundRole, QVariant (QBrush (update ? QColor (Qt::blue) : QColor (Qt::black))));
} }
} }
@ -86,7 +86,7 @@ ConfirmationDialog::mark_fetching (const std::string &name)
list->scrollToItem (i->second); list->scrollToItem (i->second);
for (int c = 0; c < list->columnCount (); ++c) { for (int c = 0; c < list->columnCount (); ++c) {
i->second->setData (c, Qt::BackgroundColorRole, QColor (224, 244, 244)); i->second->setData (c, Qt::BackgroundColorRole, QColor (224, 244, 244));
i->second->setData (c, Qt::TextColorRole, Qt::blue); i->second->setData (c, Qt::TextColorRole, QColor (Qt::blue));
} }
i->second->setData (1, Qt::DisplayRole, tr ("FETCHING")); i->second->setData (1, Qt::DisplayRole, tr ("FETCHING"));
} }
@ -102,7 +102,7 @@ ConfirmationDialog::mark_error (const std::string &name)
list->scrollToItem (i->second); list->scrollToItem (i->second);
for (int c = 0; c < list->columnCount (); ++c) { for (int c = 0; c < list->columnCount (); ++c) {
i->second->setData (c, Qt::BackgroundColorRole, QColor (255, 224, 244)); i->second->setData (c, Qt::BackgroundColorRole, QColor (255, 224, 244));
i->second->setData (c, Qt::TextColorRole, Qt::black); i->second->setData (c, Qt::TextColorRole, QColor (Qt::black));
} }
i->second->setData (1, Qt::DisplayRole, tr ("ERROR")); i->second->setData (1, Qt::DisplayRole, tr ("ERROR"));
} }
@ -118,7 +118,7 @@ ConfirmationDialog::mark_success (const std::string &name)
list->scrollToItem (i->second); list->scrollToItem (i->second);
for (int c = 0; c < list->columnCount (); ++c) { for (int c = 0; c < list->columnCount (); ++c) {
i->second->setData (c, Qt::BackgroundColorRole, QColor (160, 255, 160)); i->second->setData (c, Qt::BackgroundColorRole, QColor (160, 255, 160));
i->second->setData (c, Qt::TextColorRole, Qt::black); i->second->setData (c, Qt::TextColorRole, QColor (Qt::black));
} }
i->second->setData (1, Qt::DisplayRole, tr ("INSTALLED")); i->second->setData (1, Qt::DisplayRole, tr ("INSTALLED"));
} }