[ACCEPTED]-Getting a warning C4189 "local variable is initialized but not referenced" even though the variable is being referenced-qt

Accepted answer
Score: 23

It's because startDetached is a static member function. You're 5 allowed to write process->startDetached(...) in order to indicate the 4 namespace in which the compiler will look 3 for the member name, instead of QProcess::startDetached(...). But the 2 two invocations are identical; the call 1 does not use the value of process.

More Related questions