Skip to content

explicitly convert QStrings to QFileInfos#4403

Merged
uklotzde merged 1 commit intomixxxdj:mainfrom
Be-ing:qfileinfo_qstring
Oct 13, 2021
Merged

explicitly convert QStrings to QFileInfos#4403
uklotzde merged 1 commit intomixxxdj:mainfrom
Be-ing:qfileinfo_qstring

Conversation

@Be-ing
Copy link
Copy Markdown
Contributor

@Be-ing Be-ing commented Oct 13, 2021

The constructor for converting a QString to a QFileInfo was made
explicit in Qt6.

The constructor for converting a QString to a QFileInfo was made
explicit in Qt6.
Copy link
Copy Markdown
Contributor

@uklotzde uklotzde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// mapped to file type "aiff", independent of whether the file exists or not!
const QFileInfo missingFileWithUppercaseSuffixAndLeadingTrailingWhitespaceSuffix =
kTestDir.absoluteFilePath(QStringLiteral("missing_file. AIF "));
const QFileInfo missingFileWithUppercaseSuffixAndLeadingTrailingWhitespaceSuffix(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be easier to read and resembles the let syntax as found in Rust:

const auto varName = VarType(..constructor args...);

Just a personal opinion and hint, no need to change anything.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care.

@uklotzde uklotzde merged commit ace02c5 into mixxxdj:main Oct 13, 2021
@Be-ing Be-ing deleted the qfileinfo_qstring branch October 13, 2021 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants