Commit 9f9330c5 authored by Gunnar Sletta's avatar Gunnar Sletta Committed by The Qt Project
Browse files

Do not use QApp::arguments() to select antialiasing mode.


This selection typically interfers with an application's command line
arguments. Creator's qml2puppet needs to set this mode to avoid
getting subpixel antialiased text from DesignerSupport.

Change-Id: Iabf2bece211b897c58e2933d5502fdcf7c360c55
Reviewed-by: default avatarEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
parent 11cc2322
Branches
Tags
No related merge requests found
Showing with 5 additions and 7 deletions
...@@ -159,15 +159,13 @@ QSGContext::QSGContext(QObject *parent) : ...@@ -159,15 +159,13 @@ QSGContext::QSGContext(QObject *parent) :
QObject(*(new QSGContextPrivate), parent) QObject(*(new QSGContextPrivate), parent)
{ {
Q_D(QSGContext); Q_D(QSGContext);
static bool doSubpixel = qApp->arguments().contains(QLatin1String("--text-subpixel-antialiasing")); QByteArray mode = qgetenv("QSG_DISTANCEFIELD_ANTIALIASING");
static bool doLowQualSubpixel = qApp->arguments().contains(QLatin1String("--text-subpixel-antialiasing-lowq")); if (mode == "subpixel")
static bool doGray = qApp->arguments().contains(QLatin1String("--text-gray-antialiasing"));
if (doSubpixel)
d->distanceFieldAntialiasing = QSGGlyphNode::HighQualitySubPixelAntialiasing; d->distanceFieldAntialiasing = QSGGlyphNode::HighQualitySubPixelAntialiasing;
else if (doLowQualSubpixel) else if (mode == "subpixel-lowq")
d->distanceFieldAntialiasing = QSGGlyphNode::LowQualitySubPixelAntialiasing; d->distanceFieldAntialiasing = QSGGlyphNode::LowQualitySubPixelAntialiasing;
else if (doGray) else if (mode == "gray")
d->distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing; d->distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment