Port yuzu commit: "yuzu/CMakeLists: Disable implicit QString co… (#5074)

* yuzu/CMakeLists: Disable implicit QString conversions

Now that all of our code is compilable with implicit QString
conversions, we can enforce it at compile-time by disabling them.

Co-Authored-By: Mat M. <lioncash@users.noreply.github.com>

* citra_qt: Remove lots of implicit QString conversions

Co-authored-by: Mat M. <mathew1800@gmail.com>
This commit is contained in:
Tobias 2020-02-11 13:12:09 +01:00 committed by GitHub
parent b53b4bfb17
commit f106e76132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 55 additions and 41 deletions

View file

@ -36,14 +36,16 @@ const std::string StillImageCameraFactory::GetFilePath() const {
return last_path;
}
QList<QByteArray> types = QImageReader::supportedImageFormats();
QList<QString> temp_filters;
QStringList temp_filters;
for (QByteArray type : types) {
temp_filters << QString("*." + QString(type));
temp_filters << QStringLiteral("*.%1").arg(QString::fromUtf8(type));
}
QString filter = QObject::tr("Supported image files (%1)").arg(temp_filters.join(" "));
QString filter =
QObject::tr("Supported image files (%1)").arg(temp_filters.join(QLatin1Char{' '}));
last_path =
QFileDialog::getOpenFileName(nullptr, QObject::tr("Open File"), ".", filter).toStdString();
QFileDialog::getOpenFileName(nullptr, QObject::tr("Open File"), QStringLiteral("."), filter)
.toStdString();
return last_path;
}