You can only use methods declared as Slots for QObject::connect SLOT.
quit method is declared as a slot method in QApplication class and exit is not a slot.
If you want, you can inherit a class from QApplication and declare your own slot method and call exit( 1 ) in your slot method.
IIRC, you can't specify usingnamespace std; in Qt applications. There are constructs in the std library which is incompatible with the Mock Compiler (moc).
Try instead of omitting usingnamespace std and just using the scope resolution operator (::) for explicitly calling std function.