summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-05-02 15:36:35 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-03 12:09:40 +0200
commitd913f99e654d580299471d710cceb0baebde7682 (patch)
treef94569209973599cbca975ce1f7a65f00d1c6c22
parent09bf8ad071994ef9a3413349859b909cd228c18e (diff)
downloadqtbase-d913f99e654d580299471d710cceb0baebde7682.tar.gz
Use QFile::{encode,decode}Name to deal with QT_PLUGIN_PATH
Since it deals with paths, let's use the proper path-handling functions. Change-Id: I896d2c472dfd675e9ff247657447178702f178be Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp2
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index d188ccbc9a..31d83967bb 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -2041,7 +2041,7 @@ QStringList QCoreApplication::libraryPaths()
#else
QLatin1Char pathSep(':');
#endif
- QStringList paths = QString::fromLatin1(libPathEnv).split(pathSep, QString::SkipEmptyParts);
+ QStringList paths = QFile::decodeName(libPathEnv).split(pathSep, QString::SkipEmptyParts);
for (QStringList::const_iterator it = paths.constBegin(); it != paths.constEnd(); ++it) {
QString canonicalPath = QDir(*it).canonicalPath();
if (!canonicalPath.isEmpty()
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 90fa2ad716..f7937421f3 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -955,7 +955,7 @@ void tst_QApplication::libraryPaths_qt_plugin_path()
// Our hook into libraryPaths() initialization: Set the QT_PLUGIN_PATH environment variable
QString installPathPluginsDeCanon = appDirPath + QString::fromLatin1("/tmp/..");
- QByteArray ascii = installPathPluginsDeCanon.toAscii();
+ QByteArray ascii = QFile::encodeName(installPathPluginsDeCanon);
qputenv("QT_PLUGIN_PATH", ascii);
QVERIFY(!app.libraryPaths().contains(appDirPath + QString::fromLatin1("/tmp/..")));