Skip to content

Commit 63ea4d7

Browse files
committed
Fix crash when opening VFS manager on Linux.
1 parent fd6f56f commit 63ea4d7

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

Source/ui_qt/vfsmanagerdialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ VFSManagerDialog::VFSManagerDialog(QWidget* parent)
1212
{
1313
ui->setupUi(this);
1414
VFSModel* model = new VFSModel(this);
15-
model->setHeaderData(1, Qt::Orientation::Horizontal, QVariant("Device"),
15+
model->setHeaderData(0, Qt::Orientation::Horizontal, QVariant("Device"),
1616
Qt::DisplayRole);
1717
model->setHeaderData(1, Qt::Orientation::Horizontal, QVariant("Binding Type"),
1818
Qt::DisplayRole);
19-
model->setHeaderData(1, Qt::Orientation::Horizontal,
19+
model->setHeaderData(2, Qt::Orientation::Horizontal,
2020
QVariant("Binding Value"), Qt::DisplayRole);
2121
ui->tableView->setModel(model);
2222
ui->tableView->horizontalHeader()->setStretchLastSection(true);

Source/ui_qt/vfsmodel.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,7 @@ int VFSModel::rowCount(const QModelIndex& /*parent*/) const
2323

2424
int VFSModel::columnCount(const QModelIndex& /*parent*/) const
2525
{
26-
if(m_devices.size() > 0)
27-
{
28-
return 3;
29-
}
30-
else
31-
{
32-
return 0;
33-
}
26+
return 3;
3427
}
3528

3629
QVariant VFSModel::data(const QModelIndex& index, int role) const

0 commit comments

Comments
 (0)