C++ (Qt)void anotherFunc(const QString &){ ...} void func(){ QString a; if(...) a = "action1"; else if(...) a = "action2"; else a = "action3"; anotherFunc(a); }
C++ (Qt)void anotherFunc(const QString &){ ...} void func(){ const char *a; if(...) a = "action1"; else if(...) a = "action2"; else a = "action3"; anotherFunc(a); }
C++ (Qt)void anotherFunc(const QString &){ ...} void func(){ const char *a; if(...) a = "action1"; else if(...) a = "action2"; else a = "action3"; anotherFunc(QLatin1String(a)); }