diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-05-31 09:29:48 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-31 09:47:26 +0200 |
commit | 9f9330c524092e63cf5b490d193fd9172938526f (patch) | |
tree | 2047b1beaaed7ef223de2d83a25fb41e40f40aeb /src/quick | |
parent | 11cc23223c06aa86fcb5b9e5974d443a400d504f (diff) |
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: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/scenegraph/qsgcontext.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp index d3710c7bd5..1c7f9cd800 100644 --- a/src/quick/scenegraph/qsgcontext.cpp +++ b/src/quick/scenegraph/qsgcontext.cpp @@ -159,15 +159,13 @@ QSGContext::QSGContext(QObject *parent) : QObject(*(new QSGContextPrivate), parent) { Q_D(QSGContext); - static bool doSubpixel = qApp->arguments().contains(QLatin1String("--text-subpixel-antialiasing")); - static bool doLowQualSubpixel = qApp->arguments().contains(QLatin1String("--text-subpixel-antialiasing-lowq")); - static bool doGray = qApp->arguments().contains(QLatin1String("--text-gray-antialiasing")); - if (doSubpixel) + QByteArray mode = qgetenv("QSG_DISTANCEFIELD_ANTIALIASING"); + if (mode == "subpixel") d->distanceFieldAntialiasing = QSGGlyphNode::HighQualitySubPixelAntialiasing; - else if (doLowQualSubpixel) + else if (mode == "subpixel-lowq") d->distanceFieldAntialiasing = QSGGlyphNode::LowQualitySubPixelAntialiasing; - else if (doGray) - d->distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing; + else if (mode == "gray") + d->distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing; } |