aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpaster
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-09-18 13:18:30 +0200
committerEike Ziller <eike.ziller@qt.io>2020-09-18 14:41:32 +0000
commit6225d33c282fc56d1c7b634bdeef04bccf6a914a (patch)
treea975cea0e29c1a7dc7aa7369015aad1426a5ad60 /src/plugins/cpaster
parent2a70bc1d0983b9c26c3db513e37410bcabc73d90 (diff)
Fix build issues with Qt6
Change from QStringRef to QStringView at various places. Task-number: QTCREATORBUG-24098 Change-Id: Ia7a634fa26464fbb2962724d5f0e188cecc68801 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/cpaster')
-rw-r--r--src/plugins/cpaster/fileshareprotocol.cpp2
-rw-r--r--src/plugins/cpaster/pastebindotcomprotocol.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/cpaster/fileshareprotocol.cpp b/src/plugins/cpaster/fileshareprotocol.cpp
index 937165a3f2..3669a1c7b7 100644
--- a/src/plugins/cpaster/fileshareprotocol.cpp
+++ b/src/plugins/cpaster/fileshareprotocol.cpp
@@ -101,7 +101,7 @@ static bool parse(const QString &fileName,
QXmlStreamReader reader(&file);
while (!reader.atEnd()) {
if (reader.readNext() == QXmlStreamReader::StartElement) {
- const QStringRef elementName = reader.name();
+ const auto elementName = reader.name();
// Check start element
if (elementCount == 0 && elementName != QLatin1String(pasterElementC)) {
*errorMessage = FileShareProtocol::tr("%1 does not appear to be a paster file.").arg(fileName);
diff --git a/src/plugins/cpaster/pastebindotcomprotocol.cpp b/src/plugins/cpaster/pastebindotcomprotocol.cpp
index ed4db9cf46..6b95871a77 100644
--- a/src/plugins/cpaster/pastebindotcomprotocol.cpp
+++ b/src/plugins/cpaster/pastebindotcomprotocol.cpp
@@ -25,6 +25,7 @@
#include "pastebindotcomprotocol.h"
+#include <utils/porting.h>
#include <utils/qtcassert.h>
#include <QDebug>
@@ -149,7 +150,7 @@ void PasteBinDotComProtocol::fetch(const QString &id)
QString link = QLatin1String(PASTEBIN_BASE) + QLatin1String(PASTEBIN_RAW);
if (id.startsWith(QLatin1String("http://")))
- link.append(id.midRef(id.lastIndexOf(QLatin1Char('/')) + 1));
+ link.append(id.mid(id.lastIndexOf(QLatin1Char('/')) + 1));
else
link.append(id);
@@ -227,7 +228,7 @@ QDebug operator<<(QDebug d, const QXmlStreamAttributes &al)
static inline ParseState nextOpeningState(ParseState current, const QXmlStreamReader &reader)
{
- const QStringRef &element = reader.name();
+ const auto element = reader.name();
switch (current) {
case OutSideTable:
// Trigger on main table only.
@@ -259,7 +260,7 @@ static inline ParseState nextOpeningState(ParseState current, const QXmlStreamRe
return ParseError;
}
-static inline ParseState nextClosingState(ParseState current, const QStringRef &element)
+static inline ParseState nextClosingState(ParseState current, const Utils::StringView &element)
{
switch (current) {
case OutSideTable: