diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index 1b340b6713..e9d7b6b766 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -3133,11 +3133,11 @@ void DocumentItem::slotResetEdit(const Gui::ViewProviderDocumentObject& v) FOREACH_ITEM_ALL(item) if(tree->editingItem) { if(item == tree->editingItem) { - item->setData(0, Qt::BackgroundColorRole,QVariant()); + item->setData(0, Qt::BackgroundRole,QVariant()); break; } }else if(item->object() == &v) - item->setData(0, Qt::BackgroundColorRole,QVariant()); + item->setData(0, Qt::BackgroundRole,QVariant()); END_FOREACH_ITEM tree->editingItem = 0; } @@ -4592,7 +4592,7 @@ void DocumentObjectItem::testStatus(bool resetStatus, QIcon &icon1, QIcon &icon2 #if QT_VERSION >= 0x040200 this->setData(0, Qt::ForegroundRole,QVariant()); #else - this->setData(0, Qt::TextColorRole,QVariant()); + this->setData(0, Qt::ForegroundRole,QVariant()); #endif } else { // invisible diff --git a/src/Gui/View3DInventor.cpp b/src/Gui/View3DInventor.cpp index 43a923a66b..e107ff69dd 100644 --- a/src/Gui/View3DInventor.cpp +++ b/src/Gui/View3DInventor.cpp @@ -530,7 +530,7 @@ void View3DInventor::printPreview() void View3DInventor::print(QPrinter* printer) { QPainter p(printer); - p.setRenderHints(QPainter::Antialiasing | QPainter::HighQualityAntialiasing); + p.setRenderHints(QPainter::Antialiasing); if (!p.isActive() && !printer->outputFileName().isEmpty()) { qApp->setOverrideCursor(Qt::ArrowCursor); QMessageBox::critical(this, tr("Opening file failed"), diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index 6eeac387ce..5f83ff47ae 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -537,7 +537,7 @@ QVariant PropertyItem::data(int column, int role) const { // property name if (column == 0) { - if (role == Qt::BackgroundRole || role == Qt::TextColorRole) { + if (role == Qt::BackgroundRole || role == Qt::ForegroundRole) { if(PropertyView::showAll() && propertyItems.size() == 1 && propertyItems.front()->testStatus(App::Property::PropDynamic) @@ -587,7 +587,7 @@ QVariant PropertyItem::data(int column, int role) const QVariant val = parent->property(qPrintable(objectName())); return toString(val); } - else if (role == Qt::TextColorRole) { + else if (role == Qt::ForegroundRole) { if (hasExpression()) return QVariant::fromValue(QApplication::palette().color(QPalette::Link)); return QVariant(); @@ -607,7 +607,7 @@ QVariant PropertyItem::data(int column, int role) const else if (role == Qt::ToolTipRole) { return toolTip(propertyItems[0]); } - else if( role == Qt::TextColorRole) { + else if( role == Qt::ForegroundRole) { if (hasExpression()) return QVariant::fromValue(QApplication::palette().color(QPalette::Link)); return QVariant(); @@ -3908,11 +3908,11 @@ QVariant PropertyLinkItem::toString(const QVariant& prop) const QVariant PropertyLinkItem::data(int column, int role) const { if(propertyItems.size() && column == 1 - && (role == Qt::TextColorRole || role == Qt::ToolTipRole)) + && (role == Qt::ForegroundRole || role == Qt::ToolTipRole)) { auto propLink = Base::freecad_dynamic_cast(propertyItems[0]); if(propLink) { - if(role==Qt::TextColorRole && propLink->checkRestore()>1) + if(role==Qt::ForegroundRole && propLink->checkRestore()>1) return QVariant::fromValue(QColor(0xff,0,0)); else if(role == Qt::ToolTipRole) { auto xlink = Base::freecad_dynamic_cast(propertyItems[0]); diff --git a/src/Mod/Drawing/Gui/DrawingView.cpp b/src/Mod/Drawing/Gui/DrawingView.cpp index 799b24cce7..4af747d28b 100644 --- a/src/Mod/Drawing/Gui/DrawingView.cpp +++ b/src/Mod/Drawing/Gui/DrawingView.cpp @@ -154,7 +154,7 @@ void SvgView::setRenderer(RendererType type) void SvgView::setHighQualityAntialiasing(bool highQualityAntialiasing) { #ifndef QT_NO_OPENGL - setRenderHint(QPainter::HighQualityAntialiasing, highQualityAntialiasing); + setRenderHint(QPainter::Antialiasing); #else Q_UNUSED(highQualityAntialiasing); #endif diff --git a/src/Mod/Spreadsheet/Gui/SheetModel.cpp b/src/Mod/Spreadsheet/Gui/SheetModel.cpp index ab1dde1c47..01677bdc6c 100644 --- a/src/Mod/Spreadsheet/Gui/SheetModel.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetModel.cpp @@ -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(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(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(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(prop); switch (role) { - case Qt::TextColorRole: { + case Qt::ForegroundRole: { Color color; if (cell->getForeground(color)) diff --git a/src/Mod/Spreadsheet/Gui/Workbench.cpp b/src/Mod/Spreadsheet/Gui/Workbench.cpp index 2a578426f3..ec6cec5e77 100644 --- a/src/Mod/Spreadsheet/Gui/Workbench.cpp +++ b/src/Mod/Spreadsheet/Gui/Workbench.cpp @@ -81,7 +81,7 @@ void Workbench::activated() foregroundColor = new QtColorPicker(); foregroundColor->setObjectName(QString::fromLatin1("Spreadsheet_ForegroundColor")); foregroundColor->setStandardColors(); - foregroundColor->setCurrentColor(palette.color(QPalette::Foreground)); + foregroundColor->setCurrentColor(palette.color(QPalette::WindowText)); QObject::connect(foregroundColor, SIGNAL(colorSet(QColor)), workbenchHelper.get(), SLOT(setForegroundColor(QColor))); } foregroundColor->setToolTip(QObject::tr("Set cell(s) foreground color"));