diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-04-19 16:43:30 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-04-20 11:06:34 +0000 |
commit | 385237dbbd5261ff2825e5b054166ae6a225e423 (patch) | |
tree | 3020c9ec0187a614915d291a6768eb94b0105e7c /src/libs/utils/portlist.h | |
parent | e14238650c841fdb314ded3ec59253beff1514a7 (diff) |
Use Utils::Port where possible
This solves the ambiguity between 0 and -1 being the "invalid" port.
Change-Id: I3bac11dd4117bb1820fbd58186699925b73df1c5
Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/libs/utils/portlist.h')
-rw-r--r-- | src/libs/utils/portlist.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libs/utils/portlist.h b/src/libs/utils/portlist.h index 21e05a43e5a..49adf3ae0ba 100644 --- a/src/libs/utils/portlist.h +++ b/src/libs/utils/portlist.h @@ -26,6 +26,7 @@ #pragma once #include "utils_global.h" +#include "port.h" QT_FORWARD_DECLARE_CLASS(QString) @@ -40,12 +41,12 @@ public: PortList &operator=(const PortList &other); ~PortList(); - void addPort(int port); - void addRange(int startPort, int endPort); + void addPort(Port port); + void addRange(Port startPort, Port endPort); bool hasMore() const; - bool contains(int port) const; + bool contains(Port port) const; int count() const; - int getNext(); + Port getNext(); QString toString() const; static PortList fromString(const QString &portsSpec); |