diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-04-27 16:40:55 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-29 13:06:39 -0700 |
commit | 4f0fd86d3530cf921e63e8a462946a8dfccff5ae (patch) | |
tree | cf11ed9628f13448721ebd3ddd465b40dd368a31 /qt-models/weightsysteminfomodel.cpp | |
parent | ef769055900fbb391de7e2dbb89f8ffb23c237b0 (diff) | |
download | subsurface-4f0fd86d3530cf921e63e8a462946a8dfccff5ae.tar.gz |
Cleanup: remove biggerString() functions
The TankInfoModel and WeightInfoModel had biggerString() functions
to determine the correct column widths for the tank- and weight-type
columns. The users were removed around 2013. Remove these functions
and the corresponding member variable.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/weightsysteminfomodel.cpp')
-rw-r--r-- | qt-models/weightsysteminfomodel.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/qt-models/weightsysteminfomodel.cpp b/qt-models/weightsysteminfomodel.cpp index f8d2905cf..58cc0ba47 100644 --- a/qt-models/weightsysteminfomodel.cpp +++ b/qt-models/weightsysteminfomodel.cpp @@ -71,20 +71,12 @@ int WSInfoModel::rowCount(const QModelIndex&) const return rows + 1; } -const QString &WSInfoModel::biggerString() const -{ - return biggerEntry; -} - WSInfoModel::WSInfoModel() : rows(-1) { setHeaderDataStrings(QStringList() << tr("Description") << tr("kg")); struct ws_info_t *info; - for (info = ws_info; info->name && info < ws_info + MAX_WS_INFO; info++, rows++) { - QString wsInfoName = gettextFromC::tr(info->name); - if (wsInfoName.count() > biggerEntry.count()) - biggerEntry = wsInfoName; - } + for (info = ws_info; info->name && info < ws_info + MAX_WS_INFO; info++, rows++) + ; if (rows > -1) { beginInsertRows(QModelIndex(), 0, rows); @@ -98,11 +90,8 @@ void WSInfoModel::updateInfo() beginRemoveRows(QModelIndex(), 0, this->rows); endRemoveRows(); rows = -1; - for (info = ws_info; info->name && info < ws_info + MAX_WS_INFO; info++, rows++) { - QString wsInfoName = gettextFromC::tr(info->name); - if (wsInfoName.count() > biggerEntry.count()) - biggerEntry = wsInfoName; - } + for (info = ws_info; info->name && info < ws_info + MAX_WS_INFO; info++, rows++) + ; if (rows > -1) { beginInsertRows(QModelIndex(), 0, rows); @@ -118,7 +107,8 @@ void WSInfoModel::update() rows = -1; } struct ws_info_t *info; - for (info = ws_info; info->name && info < ws_info + MAX_WS_INFO; info++, rows++); + for (info = ws_info; info->name && info < ws_info + MAX_WS_INFO; info++, rows++) + ; if (rows > -1) { beginInsertRows(QModelIndex(), 0, rows); |