diff options
author | saturneric <[email protected]> | 2024-02-29 14:36:25 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-02-29 14:36:25 +0000 |
commit | 84b04d88723ef05f7873082c235ecfd56facf934 (patch) | |
tree | 286ffac004c265169931102fbc1f68a13da110fa /src/core/utils/CommonUtils.cpp | |
parent | feat: add module controller and continue to work on module system (diff) | |
download | GpgFrontend-84b04d88723ef05f7873082c235ecfd56facf934.tar.gz GpgFrontend-84b04d88723ef05f7873082c235ecfd56facf934.zip |
feat: add prefix GF to all sdk and module symbols
Diffstat (limited to 'src/core/utils/CommonUtils.cpp')
-rw-r--r-- | src/core/utils/CommonUtils.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/utils/CommonUtils.cpp b/src/core/utils/CommonUtils.cpp index 20851cca..d1704312 100644 --- a/src/core/utils/CommonUtils.cpp +++ b/src/core/utils/CommonUtils.cpp @@ -43,7 +43,7 @@ auto BeautifyFingerprint(QString fingerprint) -> QString { return out.readAll(); } -auto CompareSoftwareVersion(const QString& a, const QString& b) -> int { +auto GFCompareSoftwareVersion(const QString& a, const QString& b) -> int { auto remove_prefix = [](const QString& version) { return version.startsWith('v') ? version.mid(1) : version; }; @@ -81,4 +81,15 @@ auto GFStrDup(const QString& str) -> char* { c_str[utf8_str.size()] = '\0'; return c_str; } + +auto GPGFRONTEND_CORE_EXPORT GFUnStrDup(char* str) -> QString { + auto qt_str = QString::fromUtf8(str); + SecureFree(static_cast<void*>(const_cast<char*>(str))); + return qt_str; +} + +auto GPGFRONTEND_CORE_EXPORT GFUnStrDup(const char* str) -> QString { + return GFUnStrDup(const_cast<char*>(str)); +} + } // namespace GpgFrontend
\ No newline at end of file |