From c40a48af997f57caa0ecfca0b247837ba5b2f89b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Alvarez?= Date: Sat, 14 Sep 2013 01:00:48 -0300 Subject: 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 --- src/dbus/qdbusabstractadaptor_p.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/dbus/qdbusabstractadaptor_p.h') 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 AdaptorMap; -- cgit v1.2.3