use qWarning rather than qCritical because qCritical may exit

This commit is contained in:
Seth Alves 2016-09-21 10:08:02 -07:00
parent 5802159d16
commit b9ea93de57

View file

@ -175,7 +175,7 @@ void DomainServer::parseCommandLine() {
parser.addOption(domainIDOption); parser.addOption(domainIDOption);
if (!parser.parse(QCoreApplication::arguments())) { if (!parser.parse(QCoreApplication::arguments())) {
qCritical() << parser.errorText() << endl; qWarning() << parser.errorText() << endl;
parser.showHelp(); parser.showHelp();
Q_UNREACHABLE(); Q_UNREACHABLE();
} }
@ -191,7 +191,7 @@ void DomainServer::parseCommandLine() {
} }
if (_iceServerAddr.isEmpty()) { if (_iceServerAddr.isEmpty()) {
qCritical() << "Could not parse an IP address and port combination from" << hostnamePortString; qWarning() << "Could not parse an IP address and port combination from" << hostnamePortString;
QMetaObject::invokeMethod(this, "quit", Qt::QueuedConnection); QMetaObject::invokeMethod(this, "quit", Qt::QueuedConnection);
} }
} }
@ -210,7 +210,7 @@ DomainServer::~DomainServer() {
void DomainServer::queuedQuit(QString quitMessage, int exitCode) { void DomainServer::queuedQuit(QString quitMessage, int exitCode) {
if (!quitMessage.isEmpty()) { if (!quitMessage.isEmpty()) {
qCritical() << qPrintable(quitMessage); qWarning() << qPrintable(quitMessage);
} }
QCoreApplication::exit(exitCode); QCoreApplication::exit(exitCode);