Added closing LogsPopup with QMessageBox.

This commit is contained in:
23rd 2018-10-26 22:04:15 +03:00 committed by pajlada
parent fb14e1f88a
commit 06e3fabfe4

View file

@ -152,8 +152,7 @@ void LogsPopup::getOverrustleLogs()
NetworkRequest req(url);
req.setCaller(QThread::currentThread());
req.onError([channelName](int errorCode) {
// this->close();
req.onError([this, channelName](int errorCode) {
auto box = new QMessageBox(
QMessageBox::Information, "Error getting logs",
"No logs could be found for channel " + channelName);
@ -161,6 +160,15 @@ void LogsPopup::getOverrustleLogs()
box->show();
box->raise();
static QSet<int> closeButtons {
QMessageBox::Ok,
QMessageBox::Close,
};
if (closeButtons.contains(box->exec()))
{
this->close();
}
return true;
});