QGraphicsView: use qEnvironmentVariableIntValue()
It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I774ae9011b855f746b5e3fdf25995d81ec60b82a Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>bb10
parent
099f188bc8
commit
f826039e09
|
|
@ -73,7 +73,7 @@ inline bool qt_graphicsLayoutDebug()
|
|||
{
|
||||
static int checked_env = -1;
|
||||
if(checked_env == -1)
|
||||
checked_env = !!qgetenv("QT_GRAPHICSLAYOUT_DEBUG").toInt();
|
||||
checked_env = !!qEnvironmentVariableIntValue("QT_GRAPHICSLAYOUT_DEBUG");
|
||||
return checked_env;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4918,7 +4918,7 @@ void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const Q
|
|||
if (painterStateProtection || restorePainterClip)
|
||||
painter->restore();
|
||||
|
||||
static int drawRect = qgetenv("QT_DRAW_SCENE_ITEM_RECTS").toInt();
|
||||
static int drawRect = qEnvironmentVariableIntValue("QT_DRAW_SCENE_ITEM_RECTS");
|
||||
if (drawRect) {
|
||||
QPen oldPen = painter->pen();
|
||||
QBrush oldBrush = painter->brush();
|
||||
|
|
|
|||
Loading…
Reference in New Issue