Commit bb12572d authored by Volker Krause's avatar Volker Krause
Browse files

Port away from QStringRef

parent fbb9fa24
Pipeline #244900 passed with stage
in 7 minutes and 10 seconds
......@@ -199,7 +199,7 @@ KIO::WorkerResult RecentlyUsed::listDir(const QUrl &url)
path != QStringLiteral("/files") &&
path != QStringLiteral("/locations") ) {
const auto splitted = url.fileName().splitRef(QStringLiteral("-"));
const auto splitted = QStringView(url.fileName()).split(QLatin1Char('-'));
if (splitted.count() < 2) {
return KIO::WorkerResult::fail(KIO::ERR_DOES_NOT_EXIST, url.toDisplayString());
}
......
......@@ -124,10 +124,10 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
// If the text contains tabs or consecutive spaces, it is probably
// formatted using white space. Use a fixed pitch font in this case.
const auto textLines = text.splitRef(QLatin1Char('\n'));
const auto textLines = QStringView(text).split(QLatin1Char('\n'));
for (const auto& line : textLines) {
const auto trimmedLine = line.trimmed();
if ( trimmedLine.contains( '\t' ) || trimmedLine.contains( " " ) ) {
if ( trimmedLine.contains( '\t' ) || trimmedLine.contains( QLatin1String(" ") ) ) {
font.setFamily( QFontDatabase::systemFont(QFontDatabase::FixedFont).family());
break;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment