summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Marchal <frederic.marchal@wowtechnology.com>2016-01-13 19:38:31 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-22 16:38:04 +0000
commit4d86df930a77ee745cbec4066119c7f2e30a7da4 (patch)
tree02f1fa4656b36c7c22b7bd9647ca51eb2005983c
parent0ea13138a8b8ad324c5bdf2a566fe949766713ef (diff)
Register the right number of QTableWidget header texts to translate
When linguist parses a QTableWidget from a ui file, the column count is the number of horizontal headers and the row count is the number of vertical headers. Not the opposite. Change-Id: Icbac8581f344773822a2520cb986769bebb630c5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rw-r--r--src/linguist/linguist/formpreviewview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linguist/linguist/formpreviewview.cpp b/src/linguist/linguist/formpreviewview.cpp
index c73a2366f..b4e729c51 100644
--- a/src/linguist/linguist/formpreviewview.cpp
+++ b/src/linguist/linguist/formpreviewview.cpp
@@ -187,9 +187,9 @@ static void buildTargets(QObject *o, TargetsHash *targets)
const int row_cnt = tablew->rowCount();
const int col_cnt = tablew->columnCount();
for (int j = 0; j < col_cnt; ++j)
- registerTableItem(tablew->verticalHeaderItem(j), targets);
+ registerTableItem(tablew->horizontalHeaderItem(j), targets);
for (int i = 0; i < row_cnt; ++i) {
- registerTableItem(tablew->horizontalHeaderItem(i), targets);
+ registerTableItem(tablew->verticalHeaderItem(i), targets);
for (int j = 0; j < col_cnt; ++j)
registerTableItem(tablew->item(i, j), targets);
}