From 041d0616ec4553e368fa8071323e0e14ddf1684c Mon Sep 17 00:00:00 2001
From: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
Date: Tue, 28 Oct 2025 10:58:48 -0400
Subject: [PATCH] [Dev] Update C++ headers for MSVC v145 toolset compatibility
- Update trace.h files for MSVC v145 template compatibility
- Adjust GPOWrapper.h and theme_listener.h for toolset update
- Update KeyboardListener.h and Shortcut.h for MSVC v145
---
src/common/COMUtils/COMUtils.vcxproj | 4 ++--
src/common/COMUtils/packages.config | 2 +-
src/common/GPOWrapper/GPOWrapper.h | 2 +-
src/common/GPOWrapper/packages.config | 2 +-
src/common/SettingsAPI/SettingsAPI.vcxproj | 4 ++--
src/common/SettingsAPI/packages.config | 2 +-
src/common/Telemetry/EtwTrace/EtwTrace.vcxproj | 4 ++--
src/common/Telemetry/EtwTrace/packages.config | 2 +-
src/common/Themes/packages.config | 2 +-
src/common/Themes/theme_listener.h | 4 ++--
.../UITestAutomation/UITestAutomation.csproj | 1 -
src/common/UnitTests-CommonLib/packages.config | 2 +-
src/common/interop/PowerToys.Interop.vcxproj | 4 ++--
src/common/interop/packages.config | 2 +-
src/common/logger/packages.config | 2 +-
.../BackgroundActivator/packages.config | 2 +-
.../BackgroundActivatorDLL/packages.config | 2 +-
src/common/notifications/notifications.vcxproj | 4 ++--
src/common/notifications/packages.config | 4 ++--
src/common/updating/packages.config | 4 ++--
src/common/updating/updating.vcxproj | 4 ++--
.../AdvancedPasteModuleInterface/trace.h | 4 ++--
src/modules/keyboardmanager/common/Shortcut.h | 18 +++++++++---------
src/modules/peek/peek/trace.h | 2 +-
.../KeyboardListener.h | 4 ++--
25 files changed, 43 insertions(+), 44 deletions(-)
diff --git a/src/common/COMUtils/COMUtils.vcxproj b/src/common/COMUtils/COMUtils.vcxproj
index f582df593b..b89738ed21 100644
--- a/src/common/COMUtils/COMUtils.vcxproj
+++ b/src/common/COMUtils/COMUtils.vcxproj
@@ -36,12 +36,12 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
+
\ No newline at end of file
diff --git a/src/common/COMUtils/packages.config b/src/common/COMUtils/packages.config
index 6199e2345c..d690ede8a3 100644
--- a/src/common/COMUtils/packages.config
+++ b/src/common/COMUtils/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/GPOWrapper/GPOWrapper.h b/src/common/GPOWrapper/GPOWrapper.h
index c0fff9f542..5cc12f9298 100644
--- a/src/common/GPOWrapper/GPOWrapper.h
+++ b/src/common/GPOWrapper/GPOWrapper.h
@@ -64,7 +64,7 @@ namespace winrt::PowerToys::GPOWrapper::implementation
static GpoRuleConfigured GetConfiguredMwbSameSubnetOnlyValue();
static GpoRuleConfigured GetConfiguredMwbValidateRemoteIpValue();
static GpoRuleConfigured GetConfiguredMwbDisableUserDefinedIpMappingRulesValue();
- static winrt::hstring GPOWrapper::GetConfiguredMwbPolicyDefinedIpMappingRules();
+ static winrt::hstring GetConfiguredMwbPolicyDefinedIpMappingRules();
static GpoRuleConfigured GetConfiguredNewPlusHideTemplateFilenameExtensionValue();
static GpoRuleConfigured GetAllowDataDiagnosticsValue();
static GpoRuleConfigured GetConfiguredRunAtStartupValue();
diff --git a/src/common/GPOWrapper/packages.config b/src/common/GPOWrapper/packages.config
index 09bfc449e2..f32f48b009 100644
--- a/src/common/GPOWrapper/packages.config
+++ b/src/common/GPOWrapper/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/SettingsAPI/SettingsAPI.vcxproj b/src/common/SettingsAPI/SettingsAPI.vcxproj
index d09e33a334..7c3d435074 100644
--- a/src/common/SettingsAPI/SettingsAPI.vcxproj
+++ b/src/common/SettingsAPI/SettingsAPI.vcxproj
@@ -55,7 +55,7 @@
-
+
@@ -63,6 +63,6 @@
-
+
\ No newline at end of file
diff --git a/src/common/SettingsAPI/packages.config b/src/common/SettingsAPI/packages.config
index 09bfc449e2..f32f48b009 100644
--- a/src/common/SettingsAPI/packages.config
+++ b/src/common/SettingsAPI/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/Telemetry/EtwTrace/EtwTrace.vcxproj b/src/common/Telemetry/EtwTrace/EtwTrace.vcxproj
index 17b3be7a26..0ce4697fce 100644
--- a/src/common/Telemetry/EtwTrace/EtwTrace.vcxproj
+++ b/src/common/Telemetry/EtwTrace/EtwTrace.vcxproj
@@ -38,7 +38,7 @@
-
+
@@ -46,6 +46,6 @@
-
+
\ No newline at end of file
diff --git a/src/common/Telemetry/EtwTrace/packages.config b/src/common/Telemetry/EtwTrace/packages.config
index ff4b059648..8c35df963c 100644
--- a/src/common/Telemetry/EtwTrace/packages.config
+++ b/src/common/Telemetry/EtwTrace/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/common/Themes/packages.config b/src/common/Themes/packages.config
index 09bfc449e2..f32f48b009 100644
--- a/src/common/Themes/packages.config
+++ b/src/common/Themes/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/Themes/theme_listener.h b/src/common/Themes/theme_listener.h
index a6ab4464fc..111c53c7a9 100644
--- a/src/common/Themes/theme_listener.h
+++ b/src/common/Themes/theme_listener.h
@@ -23,8 +23,8 @@ public:
}
Theme AppTheme;
- void ThemeListener::AddChangedHandler(THEME_HANDLE handle);
- void ThemeListener::DelChangedHandler(THEME_HANDLE handle);
+ void AddChangedHandler(THEME_HANDLE handle);
+ void DelChangedHandler(THEME_HANDLE handle);
void CheckTheme();
private:
diff --git a/src/common/UITestAutomation/UITestAutomation.csproj b/src/common/UITestAutomation/UITestAutomation.csproj
index 09b089b22f..c101e1eb69 100644
--- a/src/common/UITestAutomation/UITestAutomation.csproj
+++ b/src/common/UITestAutomation/UITestAutomation.csproj
@@ -17,7 +17,6 @@
-
diff --git a/src/common/UnitTests-CommonLib/packages.config b/src/common/UnitTests-CommonLib/packages.config
index 09bfc449e2..f32f48b009 100644
--- a/src/common/UnitTests-CommonLib/packages.config
+++ b/src/common/UnitTests-CommonLib/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/interop/PowerToys.Interop.vcxproj b/src/common/interop/PowerToys.Interop.vcxproj
index 472119925e..d336eeb2ff 100644
--- a/src/common/interop/PowerToys.Interop.vcxproj
+++ b/src/common/interop/PowerToys.Interop.vcxproj
@@ -170,14 +170,14 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
+
diff --git a/src/common/interop/packages.config b/src/common/interop/packages.config
index 6199e2345c..d690ede8a3 100644
--- a/src/common/interop/packages.config
+++ b/src/common/interop/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/logger/packages.config b/src/common/logger/packages.config
index 09bfc449e2..f32f48b009 100644
--- a/src/common/logger/packages.config
+++ b/src/common/logger/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/notifications/BackgroundActivator/packages.config b/src/common/notifications/BackgroundActivator/packages.config
index 09bfc449e2..f32f48b009 100644
--- a/src/common/notifications/BackgroundActivator/packages.config
+++ b/src/common/notifications/BackgroundActivator/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/notifications/BackgroundActivatorDLL/packages.config b/src/common/notifications/BackgroundActivatorDLL/packages.config
index 09bfc449e2..f32f48b009 100644
--- a/src/common/notifications/BackgroundActivatorDLL/packages.config
+++ b/src/common/notifications/BackgroundActivatorDLL/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/notifications/notifications.vcxproj b/src/common/notifications/notifications.vcxproj
index b55d67e7b3..19b9018d96 100644
--- a/src/common/notifications/notifications.vcxproj
+++ b/src/common/notifications/notifications.vcxproj
@@ -45,7 +45,7 @@
-
+
@@ -53,6 +53,6 @@
-
+
\ No newline at end of file
diff --git a/src/common/notifications/packages.config b/src/common/notifications/packages.config
index ff4b059648..3a8e0698a3 100644
--- a/src/common/notifications/packages.config
+++ b/src/common/notifications/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/common/updating/packages.config b/src/common/updating/packages.config
index ff4b059648..3a8e0698a3 100644
--- a/src/common/updating/packages.config
+++ b/src/common/updating/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/common/updating/updating.vcxproj b/src/common/updating/updating.vcxproj
index bfcf1f22b4..e0a50262a3 100644
--- a/src/common/updating/updating.vcxproj
+++ b/src/common/updating/updating.vcxproj
@@ -58,7 +58,7 @@
-
+
@@ -66,6 +66,6 @@
-
+
\ No newline at end of file
diff --git a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h
index 7ef6250baa..3aeca0e24f 100644
--- a/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h
+++ b/src/modules/AdvancedPaste/AdvancedPasteModuleInterface/trace.h
@@ -13,10 +13,10 @@ public:
static void AdvancedPaste_Invoked(std::wstring mode) noexcept;
// Log if an error occurs in AdvancedPaste
- static void Trace::AdvancedPaste_Error(const DWORD errorCode, std::wstring errorMessage, std::wstring methodName) noexcept;
+ static void AdvancedPaste_Error(const DWORD errorCode, std::wstring errorMessage, std::wstring methodName) noexcept;
// Event to send settings telemetry.
- static void Trace::AdvancedPaste_SettingsTelemetry(const PowertoyModuleIface::Hotkey& pastePlainHotkey,
+ static void AdvancedPaste_SettingsTelemetry(const PowertoyModuleIface::Hotkey& pastePlainHotkey,
const PowertoyModuleIface::Hotkey& advancedPasteUIHotkey,
const PowertoyModuleIface::Hotkey& pasteMarkdownHotkey,
const PowertoyModuleIface::Hotkey& pasteJsonHotkey,
diff --git a/src/modules/keyboardmanager/common/Shortcut.h b/src/modules/keyboardmanager/common/Shortcut.h
index 439559c9d0..18a6968a7e 100644
--- a/src/modules/keyboardmanager/common/Shortcut.h
+++ b/src/modules/keyboardmanager/common/Shortcut.h
@@ -22,7 +22,7 @@ private:
}
// helper to use the same code in more places.
- std::vector Shortcut::ConvertToNumbers(std::vector& keys);
+ std::vector ConvertToNumbers(std::vector& keys);
public:
@@ -103,9 +103,9 @@ public:
return lhs.comparator() == rhs.comparator();
}
- static bool Shortcut::IsActionKey(const DWORD input);
+ static bool IsActionKey(const DWORD input);
- static bool Shortcut::IsModifier(const DWORD input);
+ static bool IsModifier(const DWORD input);
// Function to return the number of keys in the shortcut
int Size() const;
@@ -120,22 +120,22 @@ public:
DWORD GetActionKey() const;
// Function to return IsRunProgram
- bool Shortcut::IsRunProgram() const;
+ bool IsRunProgram() const;
// Function to return IsOpenURI
- bool Shortcut::IsOpenURI() const;
+ bool IsOpenURI() const;
// Function to return the second key (of the chord)
- DWORD Shortcut::GetSecondKey() const;
+ DWORD GetSecondKey() const;
// Function to check if a chord is started for this shortcut
- bool Shortcut::IsChordStarted() const;
+ bool IsChordStarted() const;
// Function to check if this shortcut has a chord
- bool Shortcut::HasChord() const;
+ bool HasChord() const;
// Function to set that we started a chord
- void Shortcut::SetChordStarted(bool started);
+ void SetChordStarted(bool started);
// Function to return the virtual key code of the win key state expected in the shortcut. Argument is used to decide which win key to return in case of both. If the current shortcut doesn't use both win keys then arg is ignored. Return NULL if it is not a part of the shortcut
DWORD GetWinKey(const ModifierKey& input) const;
diff --git a/src/modules/peek/peek/trace.h b/src/modules/peek/peek/trace.h
index b5c22e7645..e7e43e3ace 100644
--- a/src/modules/peek/peek/trace.h
+++ b/src/modules/peek/peek/trace.h
@@ -13,7 +13,7 @@ public:
static void PeekInvoked() noexcept;
// Event to send settings telemetry.
- static void Trace::SettingsTelemetry(PowertoyModuleIface::Hotkey& hotkey) noexcept;
+ static void SettingsTelemetry(PowertoyModuleIface::Hotkey& hotkey) noexcept;
// Space mode telemetry (single-key activation toggle)
static void SpaceModeEnabled(bool enabled) noexcept;
diff --git a/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.h b/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.h
index 61c28e1866..555a21f589 100644
--- a/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.h
+++ b/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.h
@@ -29,8 +29,8 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation
KeyboardListener();
- void KeyboardListener::InitHook();
- void KeyboardListener::UnInitHook();
+ void InitHook();
+ void UnInitHook();
void SetShowToolbarEvent(ShowToolbar showToolbarEvent);
void SetHideToolbarEvent(HideToolbar hideToolbarEvent);
void SetNextCharEvent(NextChar NextCharEvent);