From e70d4b989903203e3309272666a42e4ee1846b6c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 5 May 2015 07:34:13 -0700 Subject: Use the default QLocale for QFileSelector, not the system locale The default locale is the system locale, unless you changed the default with QLocale::setLocale(). If you did that, you probably want it to apply to QFileSelector too. Task-number: QTBUG-45951 Change-Id: I0d4913955e3745b69672ffff13db5a2c7f8b1227 Reviewed-by: Alan Alpert --- src/corelib/io/qfileselector.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/io/qfileselector.cpp b/src/corelib/io/qfileselector.cpp index cddd70f908..85d9b0bfcb 100644 --- a/src/corelib/io/qfileselector.cpp +++ b/src/corelib/io/qfileselector.cpp @@ -80,7 +80,7 @@ QFileSelectorPrivate::QFileSelectorPrivate() QString defaultsBasePath = "data/"; QString defaultsPath = defaultsBasePath + "defaults.conf"; QString localizedPath = defaultsBasePath - + QString("%1/defaults.conf").arg(QLocale::system().name()); + + QString("%1/defaults.conf").arg(QLocale().name()); if (QFile::exists(localizedPath)) defaultsPath = localizedPath; QFile defaults(defaultsPath); @@ -148,7 +148,7 @@ QFileSelectorPrivate::QFileSelectorPrivate() on (list not exhaustive): android, blackberry, ios, osx, darwin, mac, linux, wince, unix, windows. On Linux, if it can be determined, the name of the distribution too, like debian, fedora or opensuse. - \li locale, same as QLocale::system().name(). + \li locale, same as QLocale().name(). \endlist Further selectors will be added from the \c QT_FILE_SELECTORS environment variable, which @@ -347,7 +347,7 @@ void QFileSelectorPrivate::updateSelectors() sharedData->staticSelectors << sharedData->preloadedStatics; //Potential for static selectors from other modules // TODO: Update on locale changed? - sharedData->staticSelectors << QLocale::system().name(); + sharedData->staticSelectors << QLocale().name(); sharedData->staticSelectors << platformSelectors(); } -- cgit v1.2.3