mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
78361ef8e3
QStringRef is gone in Qt6 and mostly replaced by QStringView. The one major difference is that direct comparisons with string literals are no longer possible. Thanks to Thiago Macieira for helping me avoid more conditional compilation here. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
16 lines
364 B
C
16 lines
364 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef NAMECMP_H
|
|
#define NAMECMP_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <QXmlStreamReader>
|
|
|
|
// this is annoying Qt5 / Qt6 incompatibility where we can't compare against string literals anymore
|
|
static inline int nameCmp(QXmlStreamReader &r, const char * cs)
|
|
{
|
|
return r.name().compare(QLatin1String(cs));
|
|
}
|
|
|
|
#endif
|
|
#endif // NAMECMP_H
|