Commit 938cb6ea authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port QStringRef

parent db59bcac
Pipeline #154350 failed with stage
in 2 minutes and 33 seconds
......@@ -324,9 +324,13 @@ void GotoSymbolWidget::slotReturnPressed()
// try to find the start position of this tag
// and put the cursor there
QString tag = idx.data().toString();
QString textLine = m_mainWindow->activeView()->document()->line(--line);
const QString tag = idx.data().toString();
const QString textLine = m_mainWindow->activeView()->document()->line(--line);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
int col = textLine.indexOf(tag.midRef(0, 4));
#else
int col = textLine.indexOf(QStringView(tag).mid(0, 4));
#endif
col = col >= 0 ? col : 0;
KTextEditor::Cursor c(line, col);
......
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