Remove deprecated Qt constants

Qt has deprecated the following constants, this commit replaces them
with their new equivalent/replacement:

Qt::TextColorRole -> Qt::ForegroundRole
Qt::BackgroundColorRole -> Qt::BackgroundRole
QPainter::HighQualityAntialiasing -> QPainter::Antialiasing
QPalette::Foreground -> QPalette::WindowText
This commit is contained in:
Chris Hennes
2021-03-10 10:52:54 -06:00
committed by wmayer
parent 1f62d46661
commit b15f134038
6 changed files with 17 additions and 17 deletions

View File

@@ -209,7 +209,7 @@ QVariant SheetModel::data(const QModelIndex &index, int role) const
return QVariant::fromValue(QString::fromUtf8("#ERR"));
#endif
}
case Qt::TextColorRole:
case Qt::ForegroundRole:
return QVariant::fromValue(QColor(255.0, 0, 0));
case Qt::TextAlignmentRole:
return QVariant(Qt::AlignVCenter | Qt::AlignLeft);
@@ -283,7 +283,7 @@ QVariant SheetModel::data(const QModelIndex &index, int role) const
if (!prop) {
switch (role) {
case Qt::TextColorRole: {
case Qt::ForegroundRole: {
return QColor(0, 0, 255.0);
}
case Qt::TextAlignmentRole: {
@@ -303,7 +303,7 @@ QVariant SheetModel::data(const QModelIndex &index, int role) const
const App::PropertyString * stringProp = static_cast<const App::PropertyString*>(prop);
switch (role) {
case Qt::TextColorRole: {
case Qt::ForegroundRole: {
Color color;
if (cell->getForeground(color))
@@ -333,7 +333,7 @@ QVariant SheetModel::data(const QModelIndex &index, int role) const
const App::PropertyQuantity * floatProp = static_cast<const App::PropertyQuantity*>(prop);
switch (role) {
case Qt::TextColorRole: {
case Qt::ForegroundRole: {
Color color;
if (cell->getForeground(color))
@@ -402,7 +402,7 @@ QVariant SheetModel::data(const QModelIndex &index, int role) const
d = static_cast<const App::PropertyInteger*>(prop)->getValue();
switch (role) {
case Qt::TextColorRole: {
case Qt::ForegroundRole: {
Color color;
if (cell->getForeground(color))
@@ -449,7 +449,7 @@ QVariant SheetModel::data(const QModelIndex &index, int role) const
auto pyProp = static_cast<const App::PropertyPythonObject*>(prop);
switch (role) {
case Qt::TextColorRole: {
case Qt::ForegroundRole: {
Color color;
if (cell->getForeground(color))