diff --git a/genericcore.cpp b/genericcore.cpp index b589405..b70515a 100644 --- a/genericcore.cpp +++ b/genericcore.cpp @@ -82,7 +82,6 @@ QString GenericCore::getMaintenanceToolFilePath() const { /// setting the applicationDirPath hard coded to test update feature from IDE #ifdef QT_DEBUG - // REFACTOR retrieve application name automatically instead of using hard coded name applicationDirPath = QString("/opt/%1").arg(APPLICATION_NAME); #endif diff --git a/model/tablemodel.cpp b/model/tablemodel.cpp index a0e3e1a..8f2c461 100644 --- a/model/tablemodel.cpp +++ b/model/tablemodel.cpp @@ -11,7 +11,7 @@ static const QHash ROLE_NAMES = {{NameRole, "Name"}, TableModel::TableModel(QObject* parent) : QAbstractTableModel{parent} { - for (int row = 0; row < 23; ++row) { + for (int row = 0; row < 5; ++row) { QHash values; values[NameRole] = QString("Item %1").arg(row); values[DescriptionRole] = QString("This is item %1").arg(row); @@ -46,6 +46,7 @@ QVariant TableModel::data(const QModelIndex& index, int role) const { int roleForColumn = getRoleForColumn(column); switch (role) { case Qt::DisplayRole: + case Qt::EditRole: return m_items.at(row)->data(roleForColumn); }