Introduced global enum to keep track of custom roles we want to use in our datamodels.
This commit is contained in:
parent
ad4c6fd442
commit
a4054ed789
4 changed files with 15 additions and 2 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "PgIndexContainer.h"
|
||||
#include "Pgsql_oids.h"
|
||||
#include "ScopeGuard.h"
|
||||
#include "CustomDataRole.h"
|
||||
|
||||
void IndexModel::setData(std::shared_ptr<const PgDatabaseCatalog> cat, const PgClass &table)
|
||||
{
|
||||
|
|
@ -96,7 +97,7 @@ QVariant IndexModel::data(const QModelIndex &index, int role) const
|
|||
QVariant v;
|
||||
if (role == Qt::DisplayRole)
|
||||
v = getData(index);
|
||||
else if (role == Qt::UserRole)
|
||||
else if (role == CustomDataTypeRole)
|
||||
v = getType(index.column());
|
||||
return v;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue