aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/windows/tablestructuremodel.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2016-06-13 18:42:57 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2016-06-13 18:42:57 -0400
commit65d5f68cc6dc81799c5a5d90400a2c1f0dd02547 (patch)
tree6f245ba901b87ef42fed69965aea22f5eea6b590 /SQLiteStudio3/guiSQLiteStudio/windows/tablestructuremodel.cpp
parentaeb6bad01630d325a4e768e798a7a6d44e18fdaf (diff)
parent5d9314f134ddd3dc4c853e398ac90ba247fb2e4f (diff)
Merge tag 'upstream/3.1.0'
Upstream version 3.1.0 # gpg: Signature made Mon 13 Jun 2016 06:42:54 PM EDT using RSA key ID EBE9BD91 # gpg: Good signature from "Unit 193 <unit193@gmail.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.org>" # gpg: aka "Unit 193 <unit193@ubuntu.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.com>"
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/windows/tablestructuremodel.cpp')
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/windows/tablestructuremodel.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/tablestructuremodel.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/tablestructuremodel.cpp
index 80c4567..1c817de 100644
--- a/SQLiteStudio3/guiSQLiteStudio/windows/tablestructuremodel.cpp
+++ b/SQLiteStudio3/guiSQLiteStudio/windows/tablestructuremodel.cpp
@@ -128,14 +128,16 @@ QVariant TableStructureModel::data(const QModelIndex& index, int role) const
QVariant TableStructureModel::headerData(int section, Qt::Orientation orientation, int role) const
{
- if (role != Qt::DisplayRole)
- return QAbstractTableModel::headerData(section, orientation, role);
+ if (role == Qt::DisplayRole)
+ {
+ if (orientation == Qt::Vertical)
+ return section + 1;
- if (orientation == Qt::Vertical)
- return section + 1;
+ // Now it's horizontal orientation with DisplayRole
+ return columnLabel(section);
+ }
- // Now it's horizontal orientation with DisplayRole
- return columnLabel(section);
+ return QAbstractTableModel::headerData(section, orientation, role);
}
TableStructureModel::Columns TableStructureModel::getHeaderColumn(int colIdx) const
@@ -300,17 +302,17 @@ QString TableStructureModel::columnLabel(int column) const
case Columns::TYPE:
return tr("Data type", "table structure columns");
case Columns::PK:
- return "P";
+ return tr("Primary\nKey", "table structure columns");
case Columns::FK:
- return "F";
+ return tr("Foreign\nKey", "table structure columns");
case Columns::UNIQUE:
- return "U";
+ return tr("Unique", "table structure columns");
case Columns::CHECK:
- return "H";
+ return tr("Check", "table structure columns");
case Columns::NOTNULL:
- return "N";
+ return tr("Not\nNULL", "table structure columns");
case Columns::COLLATE:
- return "C";
+ return tr("Collate", "table structure columns");
case Columns::DEFAULT:
return tr("Default value", "table structure columns");
}