summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r--src/gui/painting/qpainter.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 57079a5b21..eeebfde98c 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -200,11 +200,8 @@ void QPainterPrivate::checkEmulation()
QPainterPrivate::~QPainterPrivate()
{
delete emulationEngine;
- for (int i=0; i<states.size(); ++i)
- delete states.at(i);
-
- if (dummyState)
- delete dummyState;
+ qDeleteAll(states);
+ delete dummyState;
}
@@ -456,7 +453,7 @@ void QPainterPrivate::draw_helper(const QPainterPath &originalPath, DrawOperatio
p.drawPath(originalPath);
#ifndef QT_NO_DEBUG
- static bool do_fallback_overlay = qgetenv("QT_PAINT_FALLBACK_OVERLAY").size() > 0;
+ static bool do_fallback_overlay = !qEnvironmentVariableIsEmpty("QT_PAINT_FALLBACK_OVERLAY");
if (do_fallback_overlay) {
QImage block(8, 8, QImage::Format_ARGB32_Premultiplied);
QPainter pt(&block);
@@ -3432,8 +3429,7 @@ void QPainter::drawPath(const QPainterPath &path)
\fn void QPainter::drawLine(int x1, int y1, int x2, int y2)
\overload
- Draws a line from (\a x1, \a y1) to (\a x2, \a y2) and sets the
- current pen position to (\a x2, \a y2).
+ Draws a line from (\a x1, \a y1) to (\a x2, \a y2).
*/
/*!
@@ -7024,7 +7020,7 @@ void QPainter::setRenderHint(RenderHint hint, bool on)
#endif
#ifndef QT_NO_DEBUG
- static const bool antialiasingDisabled = qgetenv("QT_NO_ANTIALIASING").toInt();
+ static const bool antialiasingDisabled = qEnvironmentVariableIntValue("QT_NO_ANTIALIASING");
if (hint == QPainter::Antialiasing && antialiasingDisabled)
return;
#endif