fix return code
This commit is contained in:
parent
7e36686d1a
commit
3711a37786
|
@ -70,15 +70,16 @@ int main ( int argc, char *argv[] )
|
||||||
|
|
||||||
core.broadcastNotification(n);
|
core.broadcastNotification(n);
|
||||||
int returnCode = -1;
|
int returnCode = -1;
|
||||||
|
|
||||||
|
app.connect(&core, &SnoreCore::notificationClosed, [&returnCode,&parser](Notification noti){
|
||||||
if(!parser.isSet(silent))
|
if(!parser.isSet(silent))
|
||||||
{
|
{
|
||||||
app.connect(&core, &SnoreCore::notificationClosed, [&returnCode](Notification noti){
|
|
||||||
QString reason;
|
QString reason;
|
||||||
QDebug(&reason) << noti.closeReason();
|
QDebug(&reason) << noti.closeReason();
|
||||||
std::cout << qPrintable(reason) << std::endl;
|
std::cout << qPrintable(reason) << std::endl;
|
||||||
|
}
|
||||||
returnCode = noti.closeReason();
|
returnCode = noti.closeReason();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
app.connect(&core, &SnoreCore::notificationClosed, &app, &QApplication::quit);
|
app.connect(&core, &SnoreCore::notificationClosed, &app, &QApplication::quit);
|
||||||
app.exec();
|
app.exec();
|
||||||
return returnCode;
|
return returnCode;
|
||||||
|
|
Loading…
Reference in New Issue