Misc: Fix a couple of code analysis warnings

pull/3568/head
Stenzek 1 month ago
parent ae570b0aca
commit 7807a6847b
No known key found for this signature in database

@ -1379,7 +1379,12 @@ GPUTexture* FullscreenUI::GetUserThemeableTexture(const std::string_view png_nam
const u32 svg_height = static_cast<u32>(svg_size.y);
tex = ImGuiFullscreen::FindCachedTexture(svg_name, svg_width, svg_height);
if (tex)
{
if (is_colorable)
*is_colorable = true;
return tex;
}
// slow path, check filesystem for override
if (EmuFolders::Resources != EmuFolders::UserResources &&

@ -5384,15 +5384,7 @@ void System::SaveScreenshot(const char* path, DisplayScreenshotMode mode, Displa
std::string auto_path;
if (!path || path[0] == '\0')
{
path = (auto_path = GetScreenshotPath(Settings::GetDisplayScreenshotFormatExtension(format))).c_str();
}
else
{
// If the user chose a specific format, use that.
format =
Settings::GetDisplayScreenshotFormatFromFileName(FileSystem::GetDisplayNameFromPath(path)).value_or(format);
}
GPUBackend::RenderScreenshotToFile(path, mode, quality, true);
}

@ -1874,7 +1874,7 @@ GameListListView::GameListListView(GameListModel* model, GameListSortModel* sort
loadColumnVisibilitySettings();
loadColumnSortSettings();
connect(horizontal_header, &QHeaderView::sortIndicatorChanged, this, &GameListListView::onHeaderSortIndicatorChanged);
connect(horizontal_header, &QHeaderView::sortIndicatorChanged, this, &GameListListView::saveColumnSortSettings);
connect(horizontal_header, &QHeaderView::customContextMenuRequested, this,
&GameListListView::onHeaderContextMenuRequested);
}
@ -2036,11 +2036,6 @@ void GameListListView::setAndSaveColumnHidden(int column, bool hidden)
Host::CommitBaseSettingChanges();
}
void GameListListView::onHeaderSortIndicatorChanged(int, Qt::SortOrder)
{
saveColumnSortSettings();
}
void GameListListView::onHeaderContextMenuRequested(const QPoint& point)
{
QMenu menu;

@ -182,16 +182,16 @@ public:
protected:
void wheelEvent(QWheelEvent* e) override;
private:
void onHeaderSortIndicatorChanged(int, Qt::SortOrder);
private Q_SLOTS:
void onHeaderContextMenuRequested(const QPoint& point);
void saveColumnSortSettings();
private:
void setFixedColumnWidth(int column, int width);
void setFixedColumnWidths();
void loadColumnVisibilitySettings();
void loadColumnSortSettings();
void saveColumnSortSettings();
GameListModel* m_model = nullptr;
GameListSortModel* m_sort_model = nullptr;

Loading…
Cancel
Save