From 85fbf58c0f9b315d3ab971a7785b5fd18f58b3ba Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 8 Nov 2011 12:29:30 +0100 Subject: [PATCH] KDE paste: Fix compilation with Qt 4.7. Change-Id: I0348066272d4753442371e16dc56db56aa742b0d Reviewed-by: Bill King --- src/plugins/cpaster/kdepasteprotocol.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/cpaster/kdepasteprotocol.cpp b/src/plugins/cpaster/kdepasteprotocol.cpp index 0b366b793bb..b791672e3d5 100644 --- a/src/plugins/cpaster/kdepasteprotocol.cpp +++ b/src/plugins/cpaster/kdepasteprotocol.cpp @@ -220,7 +220,11 @@ static inline QStringList parseList(QIODevice *device) QXmlStreamReader reader(device); const QString pasteElementPrefix = QLatin1String("paste_"); while (!reader.atEnd()) { +#if QT_VERSION >= 0x040800 if (reader.readNext() == QXmlStreamReader::StartElement && reader.name().startsWith(pasteElementPrefix)) +#else + if (reader.readNext() == QXmlStreamReader::StartElement && reader.name().toString().startsWith(pasteElementPrefix)) +#endif result.append(reader.readElementText()); } return result;