ProParser: Fix build with MSVC

Strangely, MSVC requires operator< for values of std::list.

Change-Id: I5f62348a69d9b25585798b7824c6538d4cb5df7c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2020-06-23 16:17:48 +02:00
parent 028c0b1cdd
commit 6791ddb27c

View File

@@ -257,6 +257,15 @@ inline ProStringList operator+(const ProStringList &one, const ProStringList &tw
typedef QHash<ProKey, ProStringList> ProValueMap; typedef QHash<ProKey, ProStringList> ProValueMap;
// For std::list (sic!)
#ifdef Q_CC_MSVC
inline bool operator<(const ProValueMap &, const ProValueMap &)
{
Q_ASSERT(false);
return false;
}
#endif
// These token definitions affect both ProFileEvaluator and ProWriter // These token definitions affect both ProFileEvaluator and ProWriter
enum ProToken { enum ProToken {
TokTerminator = 0, // end of stream (possibly not included in length; must be zero) TokTerminator = 0, // end of stream (possibly not included in length; must be zero)