Misc. smaller fixes

* copy configuration dialog handles case if there is no other swift version
* QPointer "guard" for lambda
* first model set UI
This commit is contained in:
Klaus Basan
2018-05-23 23:13:39 +02:00
parent fcd08e7918
commit 26dcc547e6
4 changed files with 28 additions and 10 deletions

View File

@@ -152,9 +152,11 @@ namespace BlackGui
if (this->hasPendingConfirmation())
{
// defer message
QPointer<COverlayMessages> myself(this);
m_pendingMessageCalls.push_back([ = ]()
{
this->showOverlayMessages(messages, timeOutMs);
if (!myself) { return; }
myself->showOverlayMessages(messages, timeOutMs);
});
return;
}
@@ -185,9 +187,11 @@ namespace BlackGui
if (this->hasPendingConfirmation())
{
// defer message
QPointer<COverlayMessages> myself(this);
m_pendingMessageCalls.push_back([ = ]()
{
this->showOverlayMessage(message, timeOutMs);
if (!myself) { return; }
myself->showOverlayMessage(message, timeOutMs);
});
return;
}
@@ -214,9 +218,11 @@ namespace BlackGui
if (this->hasPendingConfirmation())
{
// defer message
QPointer<COverlayMessages> myself(this);
m_pendingMessageCalls.push_back([ = ]()
{
this->showOverlayTextMessage(textMessage, timeOutMs);
if (!myself) { return; }
myself->showOverlayTextMessage(textMessage, timeOutMs);
});
return;
}
@@ -242,9 +248,11 @@ namespace BlackGui
if (this->hasPendingConfirmation())
{
// defer message
QPointer<COverlayMessages> myself(this);
m_pendingMessageCalls.push_back([ = ]()
{
this->showOverlayImage(image, timeOutMs);
if (!myself) { return; }
myself->showOverlayImage(image, timeOutMs);
});
return;
}
@@ -358,8 +366,10 @@ namespace BlackGui
if (this->hasPendingConfirmation())
{
// defer message
QPointer<COverlayMessages> myself(this);
m_pendingMessageCalls.push_back([ = ]()
{
if (!myself) { return; }
this->showOverlayMessagesWithConfirmation(messages, appendOldMessages, confirmationMessage, okLambda, defaultButton, timeOutMs);
});
return;