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;
|
return "sender: " + _senderAddress + " receiver: " + _receiverAddress + " memo: " + _memo + " cid: " + _cid + " label: " + _label + " avatar: " + _avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
ContactRequest::~ContactRequest()
|
void ContactRequest::clear()
|
||||||
{
|
{
|
||||||
_senderAddress = "";
|
_senderAddress = "";
|
||||||
_receiverAddress = "";
|
_receiverAddress = "";
|
||||||
@@ -89,3 +89,8 @@ ContactRequest::~ContactRequest()
|
|||||||
_label = "";
|
_label = "";
|
||||||
_avatar = "";
|
_avatar = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ContactRequest::~ContactRequest()
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
}
|
||||||
@@ -33,6 +33,7 @@ class ContactRequest
|
|||||||
void setLabel(QString label);
|
void setLabel(QString label);
|
||||||
void setAvatar(QString avatar);
|
void setAvatar(QString avatar);
|
||||||
QString toString();
|
QString toString();
|
||||||
|
void clear();
|
||||||
~ContactRequest();
|
~ContactRequest();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -515,6 +515,7 @@ void MainWindow::saveandsendContact()
|
|||||||
QString myAddr = contactRequest.getSenderAddress();
|
QString myAddr = contactRequest.getSenderAddress();
|
||||||
QString cid = contactRequest.getCid();
|
QString cid = contactRequest.getCid();
|
||||||
QString avatar = contactRequest.getAvatar();
|
QString avatar = contactRequest.getAvatar();
|
||||||
|
contactRequest.clear();
|
||||||
|
|
||||||
if (addr.isEmpty() || newLabel.isEmpty())
|
if (addr.isEmpty() || newLabel.isEmpty())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user