summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2011-09-29 12:36:44 (GMT)
committerJan-Arve Saether <jan-arve.saether@nokia.com>2011-09-29 12:36:44 (GMT)
commit569228bb5d7759025f06b1963f3d4a1fc4e05694 (patch)
tree9eed5d614523a55468bd4af7f2f7b4ecb683938d /src/corelib/plugin
parent7d9ac9659568f77d3acf70f304fa152d3ecadcb1 (diff)
downloadQt-569228bb5d7759025f06b1963f3d4a1fc4e05694.zip
Qt-569228bb5d7759025f06b1963f3d4a1fc4e05694.tar.gz
Qt-569228bb5d7759025f06b1963f3d4a1fc4e05694.tar.bz2
nano-opts, styling fixes
Merge-request: 1344 Reviewed-by: Jan-Arve Saether <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r--src/corelib/plugin/qsystemlibrary.cpp13
-rw-r--r--src/corelib/plugin/qsystemlibrary_p.h9
2 files changed, 11 insertions, 11 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
diff --git a/src/corelib/plugin/qsystemlibrary_p.h b/src/corelib/plugin/qsystemlibrary_p.h
index f20d0b6..88ab82c 100644
--- a/src/corelib/plugin/qsystemlibrary_p.h
+++ b/src/corelib/plugin/qsystemlibrary_p.h
@@ -85,9 +85,9 @@ public:
if (!m_handle)
return 0;
#ifdef Q_OS_WINCE
- return (void*)GetProcAddress(m_handle, (const wchar_t*)QString::fromLatin1(symbol).utf16());
+ return (void*)GetProcAddress(m_handle, (const wchar_t*)QString::fromLatin1(symbol).utf16());
#else
- return (void*)GetProcAddress(m_handle, symbol);
+ return (void*)GetProcAddress(m_handle, symbol);
#endif
}
@@ -97,6 +97,7 @@ public:
}
static Q_CORE_EXPORT HINSTANCE load(const wchar_t *lpFileName, bool onlySystemDirectory = true);
+
private:
HINSTANCE m_handle;
QString m_libraryName;
@@ -105,6 +106,6 @@ private:
QT_END_NAMESPACE
-#endif //Q_OS_WIN
+#endif // Q_OS_WIN
-#endif //QSYSTEMLIBRARY_P_H
+#endif // QSYSTEMLIBRARY_P_H