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);
|
||||
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;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue