aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/function/gpg/GpgSmartCardManager.cpp2
-rw-r--r--src/ui/GpgFrontendApplication.cpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/core/function/gpg/GpgSmartCardManager.cpp b/src/core/function/gpg/GpgSmartCardManager.cpp
index 203c36ec..e0608dd3 100644
--- a/src/core/function/gpg/GpgSmartCardManager.cpp
+++ b/src/core/function/gpg/GpgSmartCardManager.cpp
@@ -204,7 +204,7 @@ auto PercentDataEscape(const QByteArray& data, bool plus_escape = false,
} else if (plus_escape && ch == ' ') {
result += '+';
} else if (plus_escape && (ch < 0x20 || ch == '+')) {
- result += QString("%%%1").arg(ch, 2, 16, QLatin1Char('0')).toUpper();
+ result += QString("%%%1").arg(static_cast<int>(static_cast<unsigned char>(ch)), 2, 16, QLatin1Char('0')).toUpper();
} else {
result += QLatin1Char(ch);
}
diff --git a/src/ui/GpgFrontendApplication.cpp b/src/ui/GpgFrontendApplication.cpp
index 271c8e57..961d1194 100644
--- a/src/ui/GpgFrontendApplication.cpp
+++ b/src/ui/GpgFrontendApplication.cpp
@@ -35,8 +35,9 @@ namespace GpgFrontend::UI {
GpgFrontendApplication::GpgFrontendApplication(int &argc, char *argv[])
: QApplication(argc, argv) {
#if !(defined(__APPLE__) && defined(__MACH__))
- GpgFrontend::UI::GpgFrontendApplication::setWindowIcon(
- QIcon(":/icons/gpgfrontend.png"));
+ // Try system theme icon first, fall back to resource
+ QIcon appIcon = QIcon::fromTheme("gpgfrontend", QIcon(":/icons/gpgfrontend.png"));
+ GpgFrontend::UI::GpgFrontendApplication::setWindowIcon(appIcon);
#endif
QString application_display_name = GetProjectName();