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:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user