summaryrefslogtreecommitdiff
path: root/kde-apps/spectacle/files/spectacle-24.05.2-gcc12.patch
blob: e60de2c07123559e9424f637073316984fb5cd79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 <QQuickWindow>
 #include <QScreen>
 #include <memory>
+#include <source_location>
 
 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();