summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qsystemlibrary_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/plugin/qsystemlibrary_p.h')
-rw-r--r--src/corelib/plugin/qsystemlibrary_p.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/corelib/plugin/qsystemlibrary_p.h b/src/corelib/plugin/qsystemlibrary_p.h
index c24caf3c2e..0b4ad7dbc2 100644
--- a/src/corelib/plugin/qsystemlibrary_p.h
+++ b/src/corelib/plugin/qsystemlibrary_p.h
@@ -28,27 +28,23 @@ public:
explicit QSystemLibrary(const QString &libraryName)
{
m_libraryName = libraryName;
- m_handle = 0;
- m_didLoad = false;
}
explicit QSystemLibrary(const wchar_t *libraryName)
{
m_libraryName = QString::fromWCharArray(libraryName);
- m_handle = 0;
- m_didLoad = false;
}
bool load(bool onlySystemDirectory = true)
{
m_handle = load((const wchar_t *)m_libraryName.utf16(), onlySystemDirectory);
m_didLoad = true;
- return (m_handle != 0);
+ return (m_handle != nullptr);
}
bool isLoaded()
{
- return (m_handle != 0);
+ return (m_handle != nullptr);
}
QFunctionPointer resolve(const char *symbol)
@@ -56,7 +52,7 @@ public:
if (!m_didLoad)
load();
if (!m_handle)
- return 0;
+ return nullptr;
return QFunctionPointer(GetProcAddress(m_handle, symbol));
}
@@ -66,10 +62,11 @@ public:
}
static Q_CORE_EXPORT HINSTANCE load(const wchar_t *lpFileName, bool onlySystemDirectory = true);
+
private:
- HINSTANCE m_handle;
- QString m_libraryName;
- bool m_didLoad;
+ HINSTANCE m_handle = nullptr;
+ QString m_libraryName = {};
+ bool m_didLoad = false;
};
QT_END_NAMESPACE