diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-08-04 22:07:36 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-09-02 09:04:04 +0200 |
commit | 10809e0c4b7b61210d5318cd3ebfb9a6da550919 (patch) | |
tree | 4972e126a35446be9819b7915b193ad030920fe8 | |
parent | be5a6ed71b539b93cd96883673a5a7110d5c6263 (diff) | |
download | qttools-10809e0c4b7b61210d5318cd3ebfb9a6da550919.tar.gz |
remove pointless empty column in message list
the view has one column less than the context list, so reflect that in
the model.
Change-Id: I51c87167bc334b47e4a35874a476823db4908790
Reviewed-by: hjk <hjk121@nokiamail.com>
-rw-r--r-- | src/linguist/linguist/messagemodel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/linguist/linguist/messagemodel.cpp b/src/linguist/linguist/messagemodel.cpp index d95e2e25c..50631c110 100644 --- a/src/linguist/linguist/messagemodel.cpp +++ b/src/linguist/linguist/messagemodel.cpp @@ -1229,9 +1229,11 @@ int MessageModel::rowCount(const QModelIndex &parent) const return 0; } -int MessageModel::columnCount(const QModelIndex &) const +int MessageModel::columnCount(const QModelIndex &parent) const { - return m_data->modelCount() + 3; + if (!parent.isValid()) + return m_data->modelCount() + 3; + return m_data->modelCount() + 2; } QVariant MessageModel::data(const QModelIndex &index, int role) const |