I've created a console program. For debugging purposes, I need the program to quit if some conditions are not met. Here is an example:
if (VDD.isEmpty() || GND.isEmpty()){
qWarning() << "VDD and GND must NOT be empty";
QCoreApplication::quit();
qWarning() << "After the quit";
}
As I understand it, the output after quit() should not be printed.
The main() function of my program is something like this:
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
// Do stuff that calls the code above
return a.exec();
}
Can anyone tell why this is happening?
For the time being I'm using abort(), but I would rather use quit().