UI: Convert QTStr macro to inline function

Using inline functions improves IDE integration and avoids potential
pitfalls of that using macros has.
This commit is contained in:
gxalpha 2023-10-08 16:31:58 +02:00 committed by Ryan Foster
parent b131bdadca
commit 44f3f79296

View file

@ -250,7 +250,10 @@ inline const char *Str(const char *lookup)
{
return App()->GetString(lookup);
}
#define QTStr(lookupVal) QString::fromUtf8(Str(lookupVal))
inline QString QTStr(const char *lookupVal)
{
return QString::fromUtf8(Str(lookupVal));
}
bool GetFileSafeName(const char *name, std::string &file);
bool GetClosestUnusedFileName(std::string &path, const char *extension);