summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qlibrary_unix.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2012-07-18 09:14:41 +0100
committerQt by Nokia <qt-info@nokia.com>2012-07-21 11:26:30 +0200
commitfa3cc59868488120e8b1bced792b26bbea380966 (patch)
tree2e3c2d439b966b3027d4d1dd6717ff878f830587 /src/corelib/plugin/qlibrary_unix.cpp
parent33292ab1ae4f12d01c03ab11ad960a9dfb807b92 (diff)
Improve performance of QLibrary::load()
There is no need to create a QFileInfo object to split the path and filename. Change-Id: I54ebb4b62ebdd93a257bce0b337ac0012f0d5a56 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/plugin/qlibrary_unix.cpp')
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp
index 7062a37241..abfbeb25d4 100644
--- a/src/corelib/plugin/qlibrary_unix.cpp
+++ b/src/corelib/plugin/qlibrary_unix.cpp
@@ -43,8 +43,8 @@
#include <qfile.h>
#include "qlibrary_p.h"
-#include <qfileinfo.h>
#include <qcoreapplication.h>
+#include <private/qfilesystementry_p.h>
#ifndef QT_NO_LIBRARY
@@ -84,10 +84,10 @@ bool QLibraryPrivate::load_sys()
{
QString attempt;
#if !defined(QT_NO_DYNAMIC_LIBRARY)
- QFileInfo fi(fileName);
+ QFileSystemEntry fsEntry(fileName);
- QString path = fi.path();
- QString name = fi.fileName();
+ QString path = fsEntry.path();
+ QString name = fsEntry.fileName();
if (path == QLatin1String(".") && !fileName.startsWith(path))
path.clear();
else