Skip to content

Commit

Permalink
https://github.com/StephaneCouturier/Katalog/issues/340
Browse files Browse the repository at this point in the history
  • Loading branch information
StephaneCouturier committed Dec 8, 2024
1 parent 644ec58 commit fc91e16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mainwindow_tab_backup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,11 @@ void MainWindow::loadBackUpDeviceLists(QString list)
{
//Create a model for the table
QStandardItemModel *model = new QStandardItemModel();
model->setColumnCount(3);
model->setColumnCount(4);
model->setHorizontalHeaderItem(0, new QStandardItem(tr("Parent Device")));
model->setHorizontalHeaderItem(1, new QStandardItem(tr("Device ID")));
model->setHorizontalHeaderItem(2, new QStandardItem(tr("Device Name")));
model->setHorizontalHeaderItem(3, new QStandardItem(tr("Size")));

//Populate the model from each deviceListTable if type = "Catalog"
for (int i = 0; i < selectedDevice->deviceListTable.size(); i++)
Expand All @@ -329,6 +330,7 @@ void MainWindow::loadBackUpDeviceLists(QString list)
row.append(new QStandardItem(tempParentDevice.name));
row.append(new QStandardItem(QString::number(tempDevice.ID)));
row.append(new QStandardItem(tempDevice.name));
row.append(new QStandardItem(QLocale().formattedDataSize((tempDevice.totalFileSize)) + " "));
model->appendRow(row);
}
}
Expand All @@ -339,6 +341,7 @@ void MainWindow::loadBackUpDeviceLists(QString list)
row.append(new QStandardItem(tempParentDevice.name));
row.append(new QStandardItem(QString::number(tempDevice.ID)));
row.append(new QStandardItem(tempDevice.name));
row.append(new QStandardItem(QLocale().formattedDataSize((tempDevice.totalFileSize)) + " "));
model->appendRow(row);
}
}
Expand All @@ -348,6 +351,7 @@ void MainWindow::loadBackUpDeviceLists(QString list)
row.append(new QStandardItem(tempParentDevice.name));
row.append(new QStandardItem(QString::number(tempDevice.ID)));
row.append(new QStandardItem(tempDevice.name));
row.append(new QStandardItem(QLocale().formattedDataSize((tempDevice.totalFileSize)) + " "));
model->appendRow(row);
}
}
Expand Down

0 comments on commit fc91e16

Please sign in to comment.