Skip to content

Commit

Permalink
[Test] Remove deprecated Qt < 5.9 code
Browse files Browse the repository at this point in the history
  • Loading branch information
chennes authored and wwmayer committed Apr 1, 2021
1 parent 6b4b245 commit f200cea
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/Mod/Test/Gui/UnitTestImp.cpp
Expand Up @@ -85,11 +85,6 @@ UnitTestDialog::UnitTestDialog(QWidget* parent, Qt::WindowFlags f)
, ui(new Ui_UnitTest)
{
ui->setupUi(this);
#if QT_VERSION < 0x050000
// As it doesn't seem to be able to change the "Highlight" color for the active colorgroup
// we force e.g. the "Motif" style only for the progressbar to change the color to green or red.
ui->progressBar->setStyle(QStyleFactory::create(QString::fromLatin1("Motif")));
#endif
setProgressColor(QColor(40,210,43)); // a darker green
ui->progressBar->setAlignment(Qt::AlignCenter);

Expand All @@ -111,7 +106,6 @@ UnitTestDialog::~UnitTestDialog()
*/
void UnitTestDialog::setProgressColor(const QColor& col)
{
#if QT_VERSION >= 0x050000
QString qss = QString::fromLatin1(
"QProgressBar {\n"
" border: 2px solid grey;\n"
Expand All @@ -123,12 +117,6 @@ void UnitTestDialog::setProgressColor(const QColor& col)
"}"
).arg(col.name());
ui->progressBar->setStyleSheet(qss);
#else
QPalette pl = ui->progressBar->palette();
pl.setColor(QPalette::Active, QPalette::Highlight, col);
pl.setColor(QPalette::Inactive, QPalette::Highlight, col);
ui->progressBar->setPalette(pl);
#endif
}

/**
Expand Down

0 comments on commit f200cea

Please sign in to comment.