summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-28 03:02:25 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-28 03:02:31 +0200
commite32b4856308c0c9c7566031022242594fd5425bf (patch)
treef0c61b6e13c7cb0c906b681c07a7e7f6e72a0db8
parente491b2ce3f1ece9959a66624b934bf41428b2d76 (diff)
parente3f090032bf0492162713fd61268a42f591e2986 (diff)
downloadqtserialport-e32b4856308c0c9c7566031022242594fd5425bf.tar.gz
Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"
-rw-r--r--src/serialport/qserialport_win.cpp2
-rw-r--r--src/serialport/qtntdll_p.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/serialport/qserialport_win.cpp b/src/serialport/qserialport_win.cpp
index da1e7aa..c0061fc 100644
--- a/src/serialport/qserialport_win.cpp
+++ b/src/serialport/qserialport_win.cpp
@@ -246,7 +246,7 @@ bool QSerialPortPrivate::open(QIODevice::OpenMode mode)
{
{
QMutexLocker locker(&helper()->mutex);
- static bool symbolsResolved = resolveSymbols(&helper()->ntLibrary);
+ static bool symbolsResolved = resolveNtdllSymbols(&helper()->ntLibrary);
if (!symbolsResolved) {
setError(QSerialPortErrorInfo(QSerialPort::OpenError,
helper()->ntLibrary.errorString()));
diff --git a/src/serialport/qtntdll_p.h b/src/serialport/qtntdll_p.h
index a8cdaf6..2e57201 100644
--- a/src/serialport/qtntdll_p.h
+++ b/src/serialport/qtntdll_p.h
@@ -123,14 +123,14 @@ typedef VOID (WINAPI *PIO_APC_ROUTINE) (
static fp_##symbolName symbolName;
#define RESOLVE_SYMBOL(symbolName) \
- symbolName = reinterpret_cast<fp_##symbolName>(resolveSymbol(ntLibrary, #symbolName)); \
+ symbolName = reinterpret_cast<fp_##symbolName>(resolveNtdllSymbol(ntLibrary, #symbolName)); \
if (!symbolName) \
return false;
GENERATE_SYMBOL_VARIABLE(ULONG, RtlNtStatusToDosError, NTSTATUS)
GENERATE_SYMBOL_VARIABLE(NTSTATUS, NtDeviceIoControlFile, HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, ULONG, PVOID, ULONG, PVOID, ULONG)
-inline QFunctionPointer resolveSymbol(QLibrary *ntLibrary, const char *symbolName)
+inline QFunctionPointer resolveNtdllSymbol(QLibrary *ntLibrary, const char *symbolName)
{
QFunctionPointer symbolFunctionPointer = ntLibrary->resolve(symbolName);
if (!symbolFunctionPointer)
@@ -139,7 +139,7 @@ inline QFunctionPointer resolveSymbol(QLibrary *ntLibrary, const char *symbolNam
return symbolFunctionPointer;
}
-inline bool resolveSymbols(QLibrary *ntLibrary)
+inline bool resolveNtdllSymbols(QLibrary *ntLibrary)
{
if (!ntLibrary->isLoaded()) {
ntLibrary->setFileName(QStringLiteral("ntdll"));