mirror of
https://github.com/QuasarApp/Heart.git
synced 2025-05-14 18:39:41 +00:00
fix warnings
This commit is contained in:
parent
3e7d4566ef
commit
7bea1e32c5
Heart/AbstractSpace
@ -30,10 +30,8 @@ HostAddress::HostAddress(const SpecialAddress &other, int port):
|
||||
setPort(port);
|
||||
}
|
||||
|
||||
HostAddress::HostAddress(const HostAddress &other):
|
||||
QHostAddress(*static_cast<const HostAddress*>(&other)) {
|
||||
|
||||
setPort(other.port());
|
||||
HostAddress::HostAddress(const HostAddress &other) {
|
||||
operator=(other);
|
||||
}
|
||||
|
||||
unsigned short HostAddress::port() const {
|
||||
@ -44,6 +42,13 @@ void HostAddress::setPort(unsigned short port) {
|
||||
_port = port;
|
||||
}
|
||||
|
||||
HostAddress &HostAddress::operator =(const HostAddress &right) {
|
||||
QHostAddress::operator=(*static_cast<const QHostAddress*>(&right));
|
||||
setPort(right.port());
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool HostAddress::isIP(const QString &address) {
|
||||
return !QHostAddress{address}.isNull();
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
friend bool& operator == (QDataStream& stream, HostAddress& address);
|
||||
friend bool& operator != (QDataStream& stream, HostAddress& address);
|
||||
|
||||
HostAddress& operator = (const HostAddress& right);;
|
||||
/**
|
||||
* @brief isIP This method return true if the @a address is valid.
|
||||
* @brief address This is tring value of the network ip address.
|
||||
|
Loading…
x
Reference in New Issue
Block a user