From f0e5200278764fcac7904ec885e46370fae70c92 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 23 Jan 2020 13:46:30 +0000 Subject: [PATCH] correct check for plugins path existence in QCoreApplication::libraryPaths() Signed-off-by: Ivailo Monev --- src/core/kernel/qcoreapplication.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/kernel/qcoreapplication.cpp b/src/core/kernel/qcoreapplication.cpp index 5972a8c84..f8cbac15e 100644 --- a/src/core/kernel/qcoreapplication.cpp +++ b/src/core/kernel/qcoreapplication.cpp @@ -1835,9 +1835,10 @@ QStringList QCoreApplication::libraryPaths() if (!coreappdata()->app_libpaths) { QStringList *app_libpaths = coreappdata()->app_libpaths = new QStringList; QString installPathPlugins = QLibraryInfo::location(QLibraryInfo::PluginsPath); - if (QFile::exists(installPathPlugins)) { + QDir installPathPluginsDir(installPathPlugins); + if (installPathPluginsDir.exists()) { // Make sure we convert from backslashes to slashes. - installPathPlugins = QDir(installPathPlugins).canonicalPath(); + installPathPlugins = installPathPluginsDir.canonicalPath(); if (!app_libpaths->contains(installPathPlugins)) app_libpaths->append(installPathPlugins); } -- 2.11.0