Fix LogView Qt6 compatibility: QStringRef to QStringView migration
- Migrated QStringRef to QStringView in LogViewTetraTelegramsParser - Updated tokenize() function signature and implementation - Updated bracketCount() helper function - Updated validStructTokens() function - Updated parseStruct(), parseEnum(), parseConstraint() functions - Migrated QStringRef to QStringView in LogViewGui.cpp - Updated splitRef() to splitView() calls - Updated QVector<QStringRef> to QVector<QStringView> - Migrated QStringRef to QStringView in LogViewXdrParser.cpp - Updated midRef() to mid() calls - Updated leftRef() to left() calls - Updated Qt6 include paths: QAbstractTableModel and QModelIndex moved to QtCore Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
4 files changed
+45
-43
No files matched your search
@@ -655,7 +655,7 @@ void LogViewGui::updateLogfile()
|
||||
|
||||
QString filePath(fileInfo.absolutePath() + QLatin1Char('/'));
|
||||
const QString baseName = fileInfo.baseName();
|
||||
const QVector<QStringRef> parts = baseName.splitRef(QLatin1Char('_'));
|
||||
const QVector<QStringView> parts = baseName.splitView(QLatin1Char('_'));
|
||||
|
||||
for (int iterator = 0; iterator < parts.size() - 2; ++iterator)
|
||||
filePath += parts.at(iterator).toString() + QLatin1Char('_');
|
||||
@@ -912,7 +912,7 @@ void LogViewGui::startInjectionThread()
|
||||
settings.beginGroup(QLatin1String("LogFiles"));
|
||||
QString filePath = settings.value(QLatin1String("Dir")).toString();
|
||||
QString exerciseName;
|
||||
QVector<QStringRef> parts = filePath.splitRef(QLatin1Char('/'));
|
||||
QVector<QStringView> parts = filePath.splitView(QLatin1Char('/'));
|
||||
if (parts.size() >= 2)
|
||||
exerciseName = QLatin1Char('_') + parts.at(parts.size() - 2).toString();
|
||||
|
||||
|
||||
Reference in new issue
Block a user