mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Fix runner warnings (#8211)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#include <lib/FancyZonesData.h>
|
||||
#include <lib/FancyZonesWinHookEventIDs.h>
|
||||
#include <lib/FancyZonesData.cpp>
|
||||
#include <lib/FancyZonesLogger.h>
|
||||
#include <common/logger/logger.h>
|
||||
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
// Enable the powertoy
|
||||
virtual void enable()
|
||||
{
|
||||
FancyZonesLogger::GetLogger()->info("FancyZones enabling");
|
||||
Logger::info("FancyZones enabling");
|
||||
|
||||
if (!m_app)
|
||||
{
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
// Disable the powertoy
|
||||
virtual void disable()
|
||||
{
|
||||
FancyZonesLogger::GetLogger()->info("FancyZones disabling");
|
||||
Logger::info("FancyZones disabling");
|
||||
|
||||
Disable(true);
|
||||
}
|
||||
@@ -155,7 +155,9 @@ public:
|
||||
{
|
||||
app_name = GET_RESOURCE_STRING(IDS_FANCYZONES);
|
||||
app_key = NonLocalizable::FancyZonesStr;
|
||||
FancyZonesLogger::Init(PTSettingsHelper::get_module_save_folder_location(app_key));
|
||||
std::filesystem::path logFilePath(PTSettingsHelper::get_module_save_folder_location(app_key));
|
||||
logFilePath.append(LogSettings::fancyZonesLogPath);
|
||||
Logger::init(LogSettings::fancyZonesLoggerName, logFilePath.wstring(), PTSettingsHelper::get_log_settings_file_location());
|
||||
m_settings = MakeFancyZonesSettings(reinterpret_cast<HINSTANCE>(&__ImageBase), FancyZonesModule::get_name(), FancyZonesModule::get_key());
|
||||
FancyZonesDataInstance().LoadFancyZonesData();
|
||||
s_instance = this;
|
||||
|
||||
@@ -102,7 +102,6 @@
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="FancyZonesLogger.h" />
|
||||
<ClInclude Include="FancyZones.h" />
|
||||
<ClInclude Include="FancyZonesDataTypes.h" />
|
||||
<ClInclude Include="FancyZonesWinHookEventIDs.h" />
|
||||
@@ -128,7 +127,6 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="FancyZones.cpp" />
|
||||
<ClCompile Include="FancyZonesDataTypes.cpp" />
|
||||
<ClCompile Include="FancyZonesLogger.cpp" />
|
||||
<ClCompile Include="FancyZonesWinHookEventIDs.cpp" />
|
||||
<ClCompile Include="FancyZonesData.cpp" />
|
||||
<ClCompile Include="JsonHelpers.cpp" />
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include <common\settings_helpers.h>
|
||||
#include <filesystem>
|
||||
#include "FancyZonesLogger.h"
|
||||
|
||||
std::shared_ptr<Logger> FancyZonesLogger::logger;
|
||||
|
||||
void FancyZonesLogger::Init(std::wstring moduleSaveLocation)
|
||||
{
|
||||
std::filesystem::path logFilePath(moduleSaveLocation);
|
||||
logFilePath.append(LogSettings::fancyZonesLogPath);
|
||||
logger = std::make_shared<Logger>(LogSettings::fancyZonesLoggerName, logFilePath.wstring(), PTSettingsHelper::get_log_settings_file_location());
|
||||
logger->info("FancyZones logger initialized");
|
||||
}
|
||||
|
||||
std::shared_ptr<Logger> FancyZonesLogger::GetLogger()
|
||||
{
|
||||
if (!logger)
|
||||
{
|
||||
throw "FancyZones logger is not initialized";
|
||||
}
|
||||
|
||||
return logger;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
#pragma once
|
||||
#include <common/logger/logger.h>
|
||||
|
||||
class FancyZonesLogger
|
||||
{
|
||||
static std::shared_ptr<Logger> logger;
|
||||
public:
|
||||
static void Init(std::wstring moduleSaveLocation);
|
||||
static std::shared_ptr<Logger> GetLogger();
|
||||
};
|
||||
Reference in New Issue
Block a user