forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kde-apps/spectacle: allow building with GCC 12
Closes: https://bugs.gentoo.org/934449 Signed-off-by: David Seifert <[email protected]>
- Loading branch information
1 parent
2ccb42c
commit 7dd98a4
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters