mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
drop QHostAddress from QByteArray assignment operator
because it may involve implicit conversion Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
b362932d07
commit
80ae49dc5a
3 changed files with 2 additions and 15 deletions
|
@ -187,18 +187,6 @@ QHostAddress &QHostAddress::operator=(const QHostAddress &address)
|
|||
return *this;
|
||||
}
|
||||
|
||||
/*!
|
||||
Assigns the host address \a address to this object, and returns a
|
||||
reference to this object.
|
||||
|
||||
\sa setAddress()
|
||||
*/
|
||||
QHostAddress &QHostAddress::operator=(const QByteArray &address)
|
||||
{
|
||||
setAddress(address);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns true if this host address is null (INADDR_ANY or in6addr_any).
|
||||
The default constructor creates a null address, and that address is
|
||||
|
|
|
@ -57,7 +57,6 @@ public:
|
|||
~QHostAddress();
|
||||
|
||||
QHostAddress &operator=(const QHostAddress &other);
|
||||
QHostAddress &operator=(const QByteArray &address);
|
||||
|
||||
bool isNull() const;
|
||||
void clear();
|
||||
|
|
|
@ -300,10 +300,10 @@ void tst_QHostAddress::compare()
|
|||
void tst_QHostAddress::assignment()
|
||||
{
|
||||
QHostAddress address;
|
||||
address = "127.0.0.1";
|
||||
address = QHostAddress("127.0.0.1");
|
||||
QCOMPARE(address, QHostAddress("127.0.0.1"));
|
||||
|
||||
address = "::1";
|
||||
address = QHostAddress("::1");
|
||||
QCOMPARE(address, QHostAddress("::1"));
|
||||
|
||||
QHostAddress addr("4.2.2.1");
|
||||
|
|
Loading…
Add table
Reference in a new issue