Skip to content

Commit

Permalink
UI: Convert QTStr macro to inline function
Browse files Browse the repository at this point in the history
Using inline functions improves IDE integration and avoids potential
pitfalls of that using macros has.
  • Loading branch information
gxalpha authored and RytoEX committed Oct 12, 2023
1 parent b131bda commit 44f3f79
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion UI/obs-app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 44f3f79

Please sign in to comment.