mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Added closing LogsPopup with QMessageBox.
This commit is contained in:
parent
fb14e1f88a
commit
06e3fabfe4
1 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue