summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusabstractadaptor_p.h
diff options
context:
space:
mode:
authorNicolás Alvarez <nicolas.alvarez@gmail.com>2013-09-14 01:00:48 -0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-15 01:35:33 +0200
commitc40a48af997f57caa0ecfca0b247837ba5b2f89b (patch)
tree05b5ef72ef6364ded75177932211b3f96ffe65e2 /src/dbus/qdbusabstractadaptor_p.h
parentc8411a0281c5ebf830920bdce05160c8b0682248 (diff)
QtDBus: fix build on MSVC2008 Debug mode.
Normally, searching for a V in a container of T using std::lower_bound only needs an operator<(T,V). But in MSVC2008 debug mode, STL algorithms perform some extra checks, such as ensuring the range passed to std::lower_bound is sorted. This adds a requirement for operator<(T,T) and operator<(V,T). QtDBus didn't compile on MSVC2008+Debug since 1e37d854 (Sept 2012!) because it missed those operator overloads for some private types. Task-number: QTBUG-33473 Change-Id: I18902d86e6c58349eb7ba3601dc383ad5431c460 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus/qdbusabstractadaptor_p.h')
-rw-r--r--src/dbus/qdbusabstractadaptor_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dbus/qdbusabstractadaptor_p.h b/src/dbus/qdbusabstractadaptor_p.h
index 3dc8cd320e..284b0fb706 100644
--- a/src/dbus/qdbusabstractadaptor_p.h
+++ b/src/dbus/qdbusabstractadaptor_p.h
@@ -104,6 +104,10 @@ public: // typedefs
{ return QLatin1String(interface) < other; }
inline bool operator<(const QByteArray &other) const
{ return interface < other; }
+#if defined(Q_CC_MSVC) && _MSC_VER < 1600
+ friend inline bool operator<(const QString &str, const AdaptorData &obj)
+ { return str < QLatin1String(obj.interface); }
+#endif
};
typedef QVector<AdaptorData> AdaptorMap;