From fa3cc59868488120e8b1bced792b26bbea380966 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Wed, 18 Jul 2012 09:14:41 +0100 Subject: Improve performance of QLibrary::load() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no need to create a QFileInfo object to split the path and filename. Change-Id: I54ebb4b62ebdd93a257bce0b337ac0012f0d5a56 Reviewed-by: James Turner Reviewed-by: Rafael Roquetto Reviewed-by: Marc Mutz Reviewed-by: João Abecasis Reviewed-by: Lars Knoll Reviewed-by: Andreas Holzammer Reviewed-by: Thiago Macieira Reviewed-by: Giuseppe D'Angelo --- src/corelib/plugin/qlibrary_unix.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/plugin/qlibrary_unix.cpp') 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 #include "qlibrary_p.h" -#include #include +#include #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 -- cgit v1.2.3