update// added clear
This commit is contained in:
@@ -80,7 +80,7 @@ QString ContactRequest::toString()
|
||||
return "sender: " + _senderAddress + " receiver: " + _receiverAddress + " memo: " + _memo + " cid: " + _cid + " label: " + _label + " avatar: " + _avatar;
|
||||
}
|
||||
|
||||
ContactRequest::~ContactRequest()
|
||||
void ContactRequest::clear()
|
||||
{
|
||||
_senderAddress = "";
|
||||
_receiverAddress = "";
|
||||
@@ -88,4 +88,9 @@ ContactRequest::~ContactRequest()
|
||||
_cid = "";
|
||||
_label = "";
|
||||
_avatar = "";
|
||||
}
|
||||
|
||||
ContactRequest::~ContactRequest()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
@@ -33,6 +33,7 @@ class ContactRequest
|
||||
void setLabel(QString label);
|
||||
void setAvatar(QString avatar);
|
||||
QString toString();
|
||||
void clear();
|
||||
~ContactRequest();
|
||||
};
|
||||
|
||||
|
||||
@@ -515,6 +515,7 @@ void MainWindow::saveandsendContact()
|
||||
QString myAddr = contactRequest.getSenderAddress();
|
||||
QString cid = contactRequest.getCid();
|
||||
QString avatar = contactRequest.getAvatar();
|
||||
contactRequest.clear();
|
||||
|
||||
if (addr.isEmpty() || newLabel.isEmpty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user