From 255222e1847b0abe27e6041809675b298739c6fa Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Tue, 11 Jan 2011 18:36:20 +0100 Subject: [PATCH 1/2] Add operator< to Tp::ProtocolParameter --- TelepathyQt4/protocol-parameter.cpp | 5 +++++ TelepathyQt4/protocol-parameter.h | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/TelepathyQt4/protocol-parameter.cpp b/TelepathyQt4/protocol-parameter.cpp index b9d48c4..e08fabb 100644 --- a/TelepathyQt4/protocol-parameter.cpp +++ b/TelepathyQt4/protocol-parameter.cpp @@ -90,6 +90,11 @@ bool ProtocolParameter::operator==(const QString &name) const return (mPriv->name == name); } +bool ProtocolParameter::operator<(const Tp::ProtocolParameter& other) const +{ + return mPriv->name < other.name(); +} + QString ProtocolParameter::name() const { if (!isValid()) { diff --git a/TelepathyQt4/protocol-parameter.h b/TelepathyQt4/protocol-parameter.h index 4cddc3f..8af80b0 100644 --- a/TelepathyQt4/protocol-parameter.h +++ b/TelepathyQt4/protocol-parameter.h @@ -49,6 +49,7 @@ public: ProtocolParameter &operator=(const ProtocolParameter &other); bool operator==(const ProtocolParameter &other) const; bool operator==(const QString &name) const; + bool operator<(const ProtocolParameter &other) const; QString name() const; QDBusSignature dbusSignature() const; -- 1.7.1