Modernize Windows Qt6 wallet build
This commit is contained in:
+19
-18
@@ -4,6 +4,25 @@
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#ifdef _WIN32_IE
|
||||
#undef _WIN32_IE
|
||||
#endif
|
||||
#define _WIN32_IE 0x0501
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlwapi.h>
|
||||
#endif
|
||||
|
||||
#include "guiutil.h"
|
||||
|
||||
#include "bitcoinaddressvalidator.h"
|
||||
@@ -19,24 +38,6 @@
|
||||
#include "script/standard.h"
|
||||
#include "util.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#ifdef _WIN32_IE
|
||||
#undef _WIN32_IE
|
||||
#endif
|
||||
#define _WIN32_IE 0x0501
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include "shellapi.h"
|
||||
#include "shlobj.h"
|
||||
#include "shlwapi.h"
|
||||
#endif
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#if BOOST_FILESYSTEM_VERSION >= 3
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
// If we don't want a message to be processed by Qt, return true and set result to
|
||||
// the value that the window procedure should return. Otherwise return false.
|
||||
bool WinShutdownMonitor::nativeEventFilter(const QByteArray& eventType, void* pMessage, long* pnResult)
|
||||
bool WinShutdownMonitor::nativeEventFilter(const QByteArray& eventType, void* pMessage, WinShutdownMonitorResult* pnResult)
|
||||
{
|
||||
Q_UNUSED(eventType);
|
||||
|
||||
|
||||
@@ -12,12 +12,19 @@
|
||||
#include <windef.h> // for HWND
|
||||
|
||||
#include <QAbstractNativeEventFilter>
|
||||
#include <QtGlobal>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
typedef qintptr WinShutdownMonitorResult;
|
||||
#else
|
||||
typedef long WinShutdownMonitorResult;
|
||||
#endif
|
||||
|
||||
class WinShutdownMonitor : public QAbstractNativeEventFilter
|
||||
{
|
||||
public:
|
||||
/** Implements QAbstractNativeEventFilter interface for processing Windows messages */
|
||||
bool nativeEventFilter(const QByteArray& eventType, void* pMessage, long* pnResult);
|
||||
bool nativeEventFilter(const QByteArray& eventType, void* pMessage, WinShutdownMonitorResult* pnResult);
|
||||
|
||||
/** Register the reason for blocking shutdown on Windows to allow clean client exit */
|
||||
static void registerShutdownBlockReason(const QString& strReason, const HWND& mainWinId);
|
||||
|
||||
Reference in New Issue
Block a user