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

Remove QStringRef leftovers

parent a26904dd
......@@ -237,7 +237,7 @@ void KatePluginSymbolViewerView::parseEcmaSymbols(void)
} // (look for functions)
// look for QML id: ....
if (stripped.midRef(c, 3) == QLatin1String("id:")) {
if (QStringView(stripped).mid(c, 3) == QLatin1String("id:")) {
c += 3;
identifier.clear();
// parse the id name
......
......@@ -114,7 +114,7 @@ void KatePluginSymbolViewerView::parseFortranSymbols(void)
}
if (m_macro->isChecked()) // not really a macro, but a subroutines
{
stripped += currline.rightRef(currline.length());
stripped += QStringView(currline).right(currline.length());
stripped = stripped.simplified();
stripped.remove(QLatin1Char('*'));
stripped.remove(QLatin1Char('+'));
......@@ -190,7 +190,7 @@ void KatePluginSymbolViewerView::parseFortranSymbols(void)
// Functions
else if (block == 3) {
if (m_func->isChecked()) {
stripped += currline.rightRef(currline.length());
stripped += QStringView(currline).right(currline.length());
stripped = stripped.trimmed();
stripped.remove(QLatin1String("function"));
stripped.remove(QLatin1Char('*'));
......
......@@ -62,7 +62,7 @@ QString longestCommonPrefix(std::vector<QString> const &strs)
for (size_t i = 1; i < strs.size(); i++) {
if (strs[i][pos] != strs[i - 1][pos]) { // we found a mis-match
// reverse search to find path separator
const int sepIndex = strs.front().leftRef(pos).lastIndexOf(QLatin1Char('/'));
const int sepIndex = QStringView(strs.front()).left(pos).lastIndexOf(QLatin1Char('/'));
if (sepIndex >= 0) {
pos = sepIndex + 1;
}
......
......@@ -57,7 +57,7 @@ protected:
int score = 0;
const auto idx = sourceModel()->index(sourceRow, 0, sourceParent);
const QString string = idx.data().toString();
const QStringView actionName = string.splitRef(QLatin1Char(':')).at(1);
const QStringView actionName = QStringView(string).split(QLatin1Char(':')).at(1);
const bool res = kfts::fuzzy_match(m_pattern, actionName.trimmed(), score);
sourceModel()->setData(idx, score, CommandModel::Score);
return res;
......
......@@ -161,7 +161,7 @@ public:
int pos = m_filterString.lastIndexOf(QLatin1Char('/'));
if (pos > -1) {
++pos;
auto pattern = m_filterString.midRef(pos);
auto pattern = QStringView(m_filterString).mid(pos);
auto nameFormats = kfts::get_fuzzy_match_formats(pattern, name, 0, fmt);
formats.append(nameFormats);
} else {
......
Markdown is supported
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