mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 13:22:49 +00:00
Merge pull request #1969 from lioncash/cast
yuzu: Fix truncation warnings within UI code
This commit is contained in:
commit
dd0b17a5f0
|
@ -680,7 +680,7 @@ void Config::SaveValues() {
|
||||||
qt_config->setValue("title_id", QVariant::fromValue<u64>(elem.first));
|
qt_config->setValue("title_id", QVariant::fromValue<u64>(elem.first));
|
||||||
qt_config->beginWriteArray("disabled");
|
qt_config->beginWriteArray("disabled");
|
||||||
for (std::size_t j = 0; j < elem.second.size(); ++j) {
|
for (std::size_t j = 0; j < elem.second.size(); ++j) {
|
||||||
qt_config->setArrayIndex(j);
|
qt_config->setArrayIndex(static_cast<int>(j));
|
||||||
qt_config->setValue("d", QString::fromStdString(elem.second[j]));
|
qt_config->setValue("d", QString::fromStdString(elem.second[j]));
|
||||||
}
|
}
|
||||||
qt_config->endArray();
|
qt_config->endArray();
|
||||||
|
|
|
@ -120,7 +120,7 @@ void ConfigurePerGameGeneral::loadConfiguration() {
|
||||||
|
|
||||||
QPixmap map;
|
QPixmap map;
|
||||||
const auto bytes = control.second->ReadAllBytes();
|
const auto bytes = control.second->ReadAllBytes();
|
||||||
map.loadFromData(bytes.data(), bytes.size());
|
map.loadFromData(bytes.data(), static_cast<u32>(bytes.size()));
|
||||||
|
|
||||||
scene->addPixmap(map.scaled(ui->icon_view->width(), ui->icon_view->height(),
|
scene->addPixmap(map.scaled(ui->icon_view->width(), ui->icon_view->height(),
|
||||||
Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||||
|
@ -130,7 +130,7 @@ void ConfigurePerGameGeneral::loadConfiguration() {
|
||||||
scene->clear();
|
scene->clear();
|
||||||
|
|
||||||
QPixmap map;
|
QPixmap map;
|
||||||
map.loadFromData(bytes.data(), bytes.size());
|
map.loadFromData(bytes.data(), static_cast<u32>(bytes.size()));
|
||||||
|
|
||||||
scene->addPixmap(map.scaled(ui->icon_view->width(), ui->icon_view->height(),
|
scene->addPixmap(map.scaled(ui->icon_view->width(), ui->icon_view->height(),
|
||||||
Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||||
|
|
Loading…
Reference in a new issue