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