Fix last commit and a couple style changes.

This commit is contained in:
CozmoP 2018-12-19 21:28:11 +01:00
parent a396008bf6
commit 7bb23d15bd
3 changed files with 9 additions and 9 deletions

View File

@ -342,17 +342,16 @@ QRegion GridView::visualRegionForSelection(const QItemSelection &selection) cons
{
QRegion region;
QItemSelectionRange range;
int i = 0;
int i;
for (i; i < selection.size(); i++)
for (i = 0; i < selection.size(); i++)
{
int row;
range = selection.at(i);
row = range.top();
for (row; row <= range.bottom(); ++row)
int row;
for (row = range.top(); row <= range.bottom(); row++)
{
int column = range.left();
for (column; column < range.right(); ++column)
int column;
for (column = range.left(); column < range.right(); column++)
{
QModelIndex index = model()->index(row, column, rootIndex());
region += visualRect(index);

View File

@ -31,7 +31,7 @@ extern "C" {
#include <string/stdstring.h>
#include <file/file_path.h>
#include <retro_miscellaneous.h>
};
}
#define CORE_NAME_COLUMN 0
#define CORE_VERSION_COLUMN 1

View File

@ -655,7 +655,8 @@ void MainWindow::updateVisibleItems() {
if (m_viewType == VIEW_TYPE_ICONS)
{
QVector<QModelIndex> indexes = m_gridView->visibleIndexes();
for (int i = 0; i < indexes.size(); i++)
int i;
for (i = 0; i < indexes.size(); i++)
{
m_playlistModel->loadThumbnail(m_proxyModel->mapToSource(indexes.at(i)));
}