Returning a QString from string literal

Viewed 172

While writing a function with a QString return, I noticed that this works.

QString foo(void){
   return "foobar";
}

"foobar" isn't a QString, is a const char *. Why does this work without any warnings?

0 Answers
Related