diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp index fa9c7439ab..d4d8a7a3e8 100644 --- a/src/gui/kernel/qplatformtheme.cpp +++ b/src/gui/kernel/qplatformtheme.cpp @@ -502,7 +502,7 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint) case MouseDoubleClickDistance: { bool ok = false; - int dist = qgetenv("QT_DBL_CLICK_DIST").toInt(&ok); + const int dist = qEnvironmentVariableIntValue("QT_DBL_CLICK_DIST", &ok); return QVariant(ok ? dist : 5); } case WheelScrollLines: