Skip to content

Copy QStringView by value #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/misc/simulation/fscommon/fsdirectories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ namespace swift::misc::simulation::fscommon
if (fileContent.isEmpty()) { continue; }
const QList<QStringView> lines = splitLinesRefs(fileContent);
static const QString p("Path=");
for (const QStringView &line : lines)
for (const QStringView line : lines)
{
const qsizetype i = line.lastIndexOf(p, -1, Qt::CaseInsensitive);
if (i < 0 || line.endsWith('=')) { continue; }
Expand Down Expand Up @@ -779,7 +779,7 @@ namespace swift::misc::simulation::fscommon
const QString relPath = fsxFileInfo.absolutePath();

QSet<QString> paths;
for (const QStringView &line : lines)
for (const QStringView line : lines)
{
const qsizetype i1 = line.lastIndexOf(p, -1, Qt::CaseInsensitive);
if (i1 < 0) { continue; }
Expand Down Expand Up @@ -845,7 +845,7 @@ namespace swift::misc::simulation::fscommon
const QString relPath = fsxFileInfo.absolutePath();

QSet<QString> paths;
for (const QStringView &line : lines)
for (const QStringView line : lines)
{
const qsizetype i1 = line.lastIndexOf(p, -1, Qt::CaseInsensitive);
if (i1 < 0) { continue; }
Expand Down
2 changes: 1 addition & 1 deletion src/misc/stringutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ namespace swift::misc
{
QMap<QString, QString> map;
QList<QStringView> lines = splitLinesRefs(data);
for (const QStringView &l : lines)
for (const QStringView l : lines)
{
if (l.isEmpty()) { continue; }
const qsizetype i = l.indexOf('=');
Expand Down