mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-29 13:00:32 +01:00
bea15bf7b1
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
126 lines
3.7 KiB
Diff
126 lines
3.7 KiB
Diff
From 6a0be1b4607da3c3eb9b7d8b547e7b489bc2d219 Mon Sep 17 00:00:00 2001
|
||
From: Vekhir <Vekhir@yahoo.com>
|
||
Date: Tue, 14 May 2024 13:47:34 +0200
|
||
Subject: [PATCH] fix: Add compatibility with C++20
|
||
|
||
C++20 and Qt5 have an issue with string literals, probably related
|
||
to char/QString conversion. The QStringLiteral macro allows using
|
||
literals without automatic conversion to QString. Fixes
|
||
https://github.com/OpenBoard-org/OpenBoard/issues/958#issuecomment-2109169685
|
||
---
|
||
src/domain/UBGraphicsWidgetItem.cpp | 92 ++++++++++++++---------------
|
||
1 file changed, 46 insertions(+), 46 deletions(-)
|
||
|
||
diff --git a/src/domain/UBGraphicsWidgetItem.cpp b/src/domain/UBGraphicsWidgetItem.cpp
|
||
index 6e3c94a10..b9b4dffb8 100644
|
||
--- a/src/domain/UBGraphicsWidgetItem.cpp
|
||
+++ b/src/domain/UBGraphicsWidgetItem.cpp
|
||
@@ -75,62 +75,62 @@ const QMap<Qt::Key, QString> UBGraphicsWidgetItem::sDeadKeys
|
||
const QMap<QString, QString> UBGraphicsWidgetItem::sAccentedCharacters
|
||
{
|
||
// Dead Key: ^
|
||
- {"^a", u8"â"},
|
||
- {"^A", u8"Â"},
|
||
- {"^e", u8"ê"},
|
||
- {"^E", u8"Ê"},
|
||
- {"^i", u8"î"},
|
||
- {"^I", u8"Î"},
|
||
- {"^o", u8"ô"},
|
||
- {"^O", u8"Ô"},
|
||
- {"^u", u8"û"},
|
||
- {"^U", u8"Û"},
|
||
+ {"^a", QStringLiteral(u"â")},
|
||
+ {"^A", QStringLiteral(u"Â")},
|
||
+ {"^e", QStringLiteral(u"ê")},
|
||
+ {"^E", QStringLiteral(u"Ê")},
|
||
+ {"^i", QStringLiteral(u"î")},
|
||
+ {"^I", QStringLiteral(u"Î")},
|
||
+ {"^o", QStringLiteral(u"ô")},
|
||
+ {"^O", QStringLiteral(u"Ô")},
|
||
+ {"^u", QStringLiteral(u"û")},
|
||
+ {"^U", QStringLiteral(u"Û")},
|
||
|
||
// Dead Key: ´
|
||
- {"´a", u8"á"},
|
||
- {"´A", u8"Á"},
|
||
- {"´e", u8"é"},
|
||
- {"´E", u8"É"},
|
||
- {"´i", u8"í"},
|
||
- {"´I", u8"Í"},
|
||
- {"´o", u8"ó"},
|
||
- {"´O", u8"Ó"},
|
||
- {"´u", u8"ú"},
|
||
- {"´U", u8"Ú"},
|
||
+ {"´a", QStringLiteral(u"á")},
|
||
+ {"´A", QStringLiteral(u"Á")},
|
||
+ {"´e", QStringLiteral(u"é")},
|
||
+ {"´E", QStringLiteral(u"É")},
|
||
+ {"´i", QStringLiteral(u"í")},
|
||
+ {"´I", QStringLiteral(u"Í")},
|
||
+ {"´o", QStringLiteral(u"ó")},
|
||
+ {"´O", QStringLiteral(u"Ó")},
|
||
+ {"´u", QStringLiteral(u"ú")},
|
||
+ {"´U", QStringLiteral(u"Ú")},
|
||
|
||
// Dead Key: `
|
||
- {"`a", u8"à"},
|
||
- {"`A", u8"À"},
|
||
- {"`e", u8"è"},
|
||
- {"`E", u8"È"},
|
||
- {"`i", u8"ì"},
|
||
- {"`I", u8"Ì"},
|
||
- {"`o", u8"ò"},
|
||
- {"`O", u8"Ò"},
|
||
- {"`u", u8"ù"},
|
||
- {"`U", u8"Ù"},
|
||
+ {"`a", QStringLiteral(u"à")},
|
||
+ {"`A", QStringLiteral(u"À")},
|
||
+ {"`e", QStringLiteral(u"è")},
|
||
+ {"`E", QStringLiteral(u"È")},
|
||
+ {"`i", QStringLiteral(u"ì")},
|
||
+ {"`I", QStringLiteral(u"Ì")},
|
||
+ {"`o", QStringLiteral(u"ò")},
|
||
+ {"`O", QStringLiteral(u"Ò")},
|
||
+ {"`u", QStringLiteral(u"ù")},
|
||
+ {"`U", QStringLiteral(u"Ù")},
|
||
|
||
// Dead Key: ~
|
||
- {"~n", u8"ñ"},
|
||
- {"~N", u8"Ñ"},
|
||
+ {"~n", QStringLiteral(u"ñ")},
|
||
+ {"~N", QStringLiteral(u"Ñ")},
|
||
|
||
// Dead Key: '
|
||
- {"'c", u8"ç"},
|
||
- {"'C", u8"Ç"},
|
||
+ {"'c", QStringLiteral(u"ç")},
|
||
+ {"'C", QStringLiteral(u"Ç")},
|
||
|
||
// Dead Key: ¨
|
||
- {"¨a", u8"ä"},
|
||
- {"¨A", u8"Ä"},
|
||
- {"¨e", u8"ë"},
|
||
- {"¨E", u8"Ë"},
|
||
- {"¨i", u8"ï"},
|
||
- {"¨I", u8"Ï"},
|
||
- {"¨o", u8"ö"},
|
||
- {"¨O", u8"Ö"},
|
||
- {"¨u", u8"ü"},
|
||
- {"¨U", u8"Ü"},
|
||
- {"¨y", u8"ÿ"},
|
||
- {"¨Y", u8"Ÿ"}
|
||
+ {"¨a", QStringLiteral(u"ä")},
|
||
+ {"¨A", QStringLiteral(u"Ä")},
|
||
+ {"¨e", QStringLiteral(u"ë")},
|
||
+ {"¨E", QStringLiteral(u"Ë")},
|
||
+ {"¨i", QStringLiteral(u"ï")},
|
||
+ {"¨I", QStringLiteral(u"Ï")},
|
||
+ {"¨o", QStringLiteral(u"ö")},
|
||
+ {"¨O", QStringLiteral(u"Ö")},
|
||
+ {"¨u", QStringLiteral(u"ü")},
|
||
+ {"¨U", QStringLiteral(u"Ü")},
|
||
+ {"¨y", QStringLiteral(u"ÿ")},
|
||
+ {"¨Y", QStringLiteral(u"Ÿ")}
|
||
};
|
||
#endif
|
||
|