summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 25429154f..1e5f15f0c 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -650,6 +650,24 @@ WSInfoModel::WSInfoModel() : QAbstractTableModel(), rows(-1)
}
}
+void WSInfoModel::updateInfo()
+{
+ struct ws_info *info = ws_info;
+ beginRemoveRows(QModelIndex(), 0, this->rows);
+ endRemoveRows();
+ for (info = ws_info; info->name; info++, rows++){
+ QString wsInfoName(info->name);
+ if( wsInfoName.count() > biggerEntry.count()){
+ biggerEntry = wsInfoName;
+ }
+ }
+
+ if (rows > -1) {
+ beginInsertRows(QModelIndex(), 0, rows);
+ endInsertRows();
+ }
+}
+
void WSInfoModel::update()
{
if (rows > -1) {