Allow building with GCC 12 https://invent.kde.org/graphics/spectacle/-/merge_requests/383 --- a/src/Gui/Annotations/AnnotationDocument.cpp +++ b/src/Gui/Annotations/AnnotationDocument.cpp @@ -16,6 +16,7 @@ #include #include #include +#include using G = Geometry; @@ -73,12 +74,12 @@ { // Don't allow an invalid canvas rect or device pixel ratio. if (rect.isEmpty()) { - Log::warning() << std::format("`{}`:\n\t`rect` is empty. This should not happen.", - std::source_location::current().function_name()); + Log::warning() << '`' << std::source_location::current().function_name() + << "`:\n\t`rect` is empty. This should not happen."; return; } else if (dpr <= 0) { - Log::warning() << std::format("`{}`:\n\t`dpr` <= 0. This should not happen.", - std::source_location::current().function_name()); + Log::warning() << '`' << std::source_location::current().function_name() + << "`:\n\t`dpr` <= 0. This should not happen."; return; } const bool posChanged = m_canvasRect.topLeft() != rect.topLeft();