1
0
Эх сурвалжийг харах

UI: Convert QTStr macro to inline function

Using inline functions improves IDE integration and avoids potential
pitfalls of that using macros has.

(cherry picked from commit 44f3f7929678292f2680f1962ceddefa9766d590)
gxalpha 2 жил өмнө
parent
commit
5c9cf1fba1
1 өөрчлөгдсөн 4 нэмэгдсэн , 1 устгасан
  1. 4 1
      UI/obs-app.hpp

+ 4 - 1
UI/obs-app.hpp

@@ -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);