diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-05-29 11:20:42 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:29:28 (GMT) |
commit | f582ed67c29e2406adeb0a52c7a68a51e0c2e8ee (patch) | |
tree | 2d353caf70eb15bf6ddf954231ee5b2cdd55fd49 /src/gui/graphicsview/qgraphicsview.cpp | |
parent | 32c09e7a36ecd41e8beb2a1f947944502793fd84 (diff) | |
download | Qt-f582ed67c29e2406adeb0a52c7a68a51e0c2e8ee.zip Qt-f582ed67c29e2406adeb0a52c7a68a51e0c2e8ee.tar.gz Qt-f582ed67c29e2406adeb0a52c7a68a51e0c2e8ee.tar.bz2 |
Only call qgetenv("QGRAPHICSVIEW_DIRECT") once.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsview.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsview.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 68c0e39..369301e 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -3313,9 +3313,8 @@ void QGraphicsView::paintEvent(QPaintEvent *event) int backgroundTime = stopWatch.elapsed() - exposedTime; #endif - const char *directEnv = getenv("QGRAPHICSVIEW_DIRECT"); - bool overrideDirectPaint = directEnv && atoi(directEnv) != 0; - if (overrideDirectPaint || (d->optimizationFlags & BypassDrawItems)) { + static int directEnv = getenv("QGRAPHICSVIEW_DIRECT").toInt(); + if (directEnv || (d->optimizationFlags & BypassDrawItems)) { d->scene->d_func()->drawSubtreeRecursive(0, &painter, viewTransform, viewTransform, exposedRegion, viewport(), d->optimizationFlags); } else { |