f40df29d96
Fix Windows build errors introduced in #10498 (practicalswift)
Pull request description:
Fix Windows build errors introduced in #10498
Fixes #12386
cc @ken2812221, @Sjors, @MarcoFalke and @floreslorca
Tree-SHA512: a807521fbd4015971e646fa4bab5495a3aaa97337e7b7d80b9161f33778e84ad6725cf4fbd5a35b50bf3a2bd97747cd7a630b51493ff516c2e1ad74acce148be
This commit is contained in:
commit
c997f88082
2 changed files with 2 additions and 2 deletions
|
@ -706,7 +706,7 @@ int main(int argc, char *argv[])
|
|||
if (BitcoinCore::baseInitialize()) {
|
||||
app.requestInitialize();
|
||||
#if defined(Q_OS_WIN) && QT_VERSION >= 0x050000
|
||||
WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(QObject::tr(PACKAGE_NAME)), static_cast<HWND>(app.getMainWinId()));
|
||||
WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(QObject::tr(PACKAGE_NAME)), (HWND)app.getMainWinId());
|
||||
#endif
|
||||
app.exec();
|
||||
app.requestShutdown();
|
||||
|
|
|
@ -56,7 +56,7 @@ bool WinShutdownMonitor::nativeEventFilter(const QByteArray &eventType, void *pM
|
|||
void WinShutdownMonitor::registerShutdownBlockReason(const QString& strReason, const HWND& mainWinId)
|
||||
{
|
||||
typedef BOOL (WINAPI *PSHUTDOWNBRCREATE)(HWND, LPCWSTR);
|
||||
PSHUTDOWNBRCREATE shutdownBRCreate = static_cast<PSHUTDOWNBRCREATE>(GetProcAddress(GetModuleHandleA("User32.dll"), "ShutdownBlockReasonCreate"));
|
||||
PSHUTDOWNBRCREATE shutdownBRCreate = (PSHUTDOWNBRCREATE)GetProcAddress(GetModuleHandleA("User32.dll"), "ShutdownBlockReasonCreate");
|
||||
if (shutdownBRCreate == nullptr) {
|
||||
qWarning() << "registerShutdownBlockReason: GetProcAddress for ShutdownBlockReasonCreate failed";
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue