forked from qt-creator/qt-creator
Utils: Make ProcessHandle comparisons hidden friends
Change-Id: I54f97f19c35596de732d57894a9146d2e517e316 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -41,17 +41,17 @@ public:
|
|||||||
void setPid(qint64 pid);
|
void setPid(qint64 pid);
|
||||||
qint64 pid() const;
|
qint64 pid() const;
|
||||||
|
|
||||||
bool equals(const ProcessHandle &) const;
|
|
||||||
|
|
||||||
bool activate();
|
bool activate();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool equals(const ProcessHandle &) const;
|
||||||
|
|
||||||
|
friend bool operator==(const ProcessHandle &p, const ProcessHandle &q) { return p.equals(q); }
|
||||||
|
friend bool operator!=(const ProcessHandle &p, const ProcessHandle &q) { return !p.equals(q); }
|
||||||
|
|
||||||
qint64 m_pid;
|
qint64 m_pid;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline bool operator==(const ProcessHandle &p1, const ProcessHandle &p2) { return p1.equals(p2); }
|
|
||||||
inline bool operator!=(const ProcessHandle &p1, const ProcessHandle &p2) { return !p1.equals(p2); }
|
|
||||||
|
|
||||||
} // Utils
|
} // Utils
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(Utils::ProcessHandle)
|
Q_DECLARE_METATYPE(Utils::ProcessHandle)
|
||||||
|
Reference in New Issue
Block a user