summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qsystemlibrary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/plugin/qsystemlibrary.cpp')
-rw-r--r--src/corelib/plugin/qsystemlibrary.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/corelib/plugin/qsystemlibrary.cpp b/src/corelib/plugin/qsystemlibrary.cpp
index c983f38..7296c5b 100644
--- a/src/corelib/plugin/qsystemlibrary.cpp
+++ b/src/corelib/plugin/qsystemlibrary.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include "qsystemlibrary_p.h"
+
#include <QtCore/qvarlengtharray.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qfileinfo.h>
@@ -91,7 +92,7 @@ HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirect
extern QString qAppFileName();
#endif
-static QString qSystemDirectory()
+static inline QString qSystemDirectory()
{
QVarLengthArray<wchar_t, MAX_PATH> fullPath;
@@ -118,24 +119,22 @@ HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirect
const QString PATH = QString::fromWCharArray((const wchar_t *)_wgetenv(L"PATH"));
searchOrder << PATH.split(QLatin1Char(';'), QString::SkipEmptyParts);
}
- QString fileName = QString::fromWCharArray(libraryName);
- fileName.append(QLatin1String(".dll"));
+ const QString fileName = QString::fromWCharArray(libraryName) + QLatin1String(".dll");
// Start looking in the order specified
for (int i = 0; i < searchOrder.count(); ++i) {
QString fullPathAttempt = searchOrder.at(i);
- if (!fullPathAttempt.endsWith(QLatin1Char('\\'))) {
+ if (!fullPathAttempt.endsWith(QLatin1Char('\\')))
fullPathAttempt.append(QLatin1Char('\\'));
- }
fullPathAttempt.append(fileName);
HINSTANCE inst = ::LoadLibrary((const wchar_t *)fullPathAttempt.utf16());
if (inst != 0)
return inst;
}
- return 0;
+ return 0;
}
-#endif //Q_OS_WINCE
+#endif // !Q_OS_WINCE
QT_END_NAMESPACE