diff options
| author | saturneric <[email protected]> | 2026-10-21 22:20:16 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-10-21 22:20:16 +0200 |
| commit | c7286d3dae72a2de0ab9fa9318b5822bf4e3747d (patch) | |
| tree | a737cab4134e11ec3bec17ffae6d0158fb6648f9 /src/m_im/ImModule.cpp | |
| parent | fix(i18n): help lupdate parse command metadata (diff) | |
| download | modules-c7286d3dae72a2de0ab9fa9318b5822bf4e3747d.tar.gz modules-c7286d3dae72a2de0ab9fa9318b5822bf4e3747d.zip | |
fix(i18n): avoid lupdate namespace parsing warnings
- alias command metadata to prevent lupdate from misreading qualified types
- update command metadata declarations to use the unqualified alias
Diffstat (limited to 'src/m_im/ImModule.cpp')
| -rw-r--r-- | src/m_im/ImModule.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/m_im/ImModule.cpp b/src/m_im/ImModule.cpp index 371cb35..cee9ca9 100644 --- a/src/m_im/ImModule.cpp +++ b/src/m_im/ImModule.cpp @@ -59,6 +59,10 @@ namespace { namespace host = gf::cmd::host; using Severity = host::AppMessage::Severity; +/// Spelled unqualified: lupdate misreads `gf::cmd::Meta kMeta{` in a class +/// body and warns about an unknown namespace. +using CommandMeta = gf::cmd::Meta; + /// Whether to warn before encrypting with the default book. Its own setting, /// read in the group the Host used to keep it in. constexpr auto kWarnDefaultBookKey = "warn_default_book"; @@ -80,7 +84,7 @@ auto BytesOf(const gf::cmd::Blob& blob) -> QByteArray { } struct Decode { - static constexpr gf::cmd::Meta kMeta{ + static constexpr CommandMeta kMeta{ GF_MODULE_ID ".decode", GTrC::Noop("Instant Message Token"), GTrC::Noop( @@ -93,7 +97,7 @@ struct Decode { }; struct Encode { - static constexpr gf::cmd::Meta kMeta{ + static constexpr CommandMeta kMeta{ GF_MODULE_ID ".encode", GTrC::Noop("Instant Message Token"), GTrC::Noop("Wrap an encrypted message as an instant messaging token"), @@ -176,7 +180,7 @@ struct TargetArgs { }; struct EncryptIm { - static constexpr gf::cmd::Meta kMeta{ + static constexpr CommandMeta kMeta{ GF_MODULE_ID ".encrypt", GTrC::Noop("IM Encrypt"), GTrC::Noop("Encrypt the message as a single-line token for chat apps"), @@ -189,7 +193,7 @@ struct EncryptIm { }; struct EncryptSignIm { - static constexpr gf::cmd::Meta kMeta{ + static constexpr CommandMeta kMeta{ GF_MODULE_ID ".encrypt_sign", GTrC::Noop("IM Encrypt && Sign"), GTrC::Noop("Encrypt and sign the message as a single-line token for chat " |
