From fa82d1cca1544c401bc06c341ce265a346a498b9 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Sat, 25 May 2024 13:14:46 +0200 Subject: Switch from fmtlib to std::format. (#2031) * Switch from fmtlib to std::format. * Remove libffi from dependencies in Github action. --- src/envshell.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/envshell.cpp') diff --git a/src/envshell.cpp b/src/envshell.cpp index 3d0f774e..94c089b3 100644 --- a/src/envshell.cpp +++ b/src/envshell.cpp @@ -1,8 +1,12 @@ -#include "envshell.h" + +#include + #include #include #include +#include "envshell.h" + namespace env { @@ -16,7 +20,7 @@ class MenuFailed : public std::runtime_error public: MenuFailed(HRESULT r, const std::string& what) : runtime_error( - fmt::format("{}, {}", what, + std::format("{}, {}", what, QString::fromStdWString(formatSystemMessage(r)).toStdString())) {} }; @@ -478,7 +482,7 @@ void ShellMenu::invoke(const QPoint& p, int cmd) const auto r = m_cm->InvokeCommand((CMINVOKECOMMANDINFO*)&info); if (FAILED(r)) { - throw MenuFailed(r, fmt::format("InvokeCommand failed, verb={}", cmd)); + throw MenuFailed(r, std::format("InvokeCommand failed, verb={}", cmd)); } } @@ -568,7 +572,7 @@ void ShellMenuCollection::exec(const QPoint& pos) } if (!m_active) { - log::debug("SMC: command {} selected without active submenu"); + log::debug("SMC: command {} selected without active submenu", cmd); return; } -- cgit v1.3.1