Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Fraser <jamie.f@mumbledog.com>2014-10-26 03:07:05 +0300
committerStefan Hacker <dd0t@users.sourceforge.net>2014-10-26 12:27:37 +0300
commitcde294f3a54944a0bdb8cc3f1cf4691cfdc9bc1c (patch)
tree6960c5214560c6b3aa59198c656e42274cf2479a
parent7fbd9d436b0b491e654199a62d9a8dbb84981f62 (diff)
Fix assert when viewing legacy user registration lists
This bug doesn't show up on release builds with QT4, I am not sure on the effect on QT5 builds. When you connect a recent debug build to a "legacy" server and view the user list, it will crash with the message: ASSERT: "visual != -1" in file itemviews\qheaderview.cpp, line 1184 This is related to setting resize modes on columns that don't exist.
-rw-r--r--src/mumble/UserEdit.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mumble/UserEdit.cpp b/src/mumble/UserEdit.cpp
index 49aaef77e..3a31bb022 100644
--- a/src/mumble/UserEdit.cpp
+++ b/src/mumble/UserEdit.cpp
@@ -66,12 +66,16 @@ UserEdit::UserEdit(const MumbleProto::UserList &userList, QWidget *parent)
#if QT_VERSION >= 0x050000
qtvUserList->header()->setSectionResizeMode(UserListModel::COL_NICK, QHeaderView::Stretch);
- qtvUserList->header()->setSectionResizeMode(UserListModel::COL_INACTIVEDAYS, QHeaderView::ResizeToContents);
- qtvUserList->header()->setSectionResizeMode(UserListModel::COL_LASTCHANNEL, QHeaderView::Stretch);
+ if (!m_model->isLegacy()) {
+ qtvUserList->header()->setSectionResizeMode(UserListModel::COL_INACTIVEDAYS, QHeaderView::ResizeToContents);
+ qtvUserList->header()->setSectionResizeMode(UserListModel::COL_LASTCHANNEL, QHeaderView::Stretch);
+ }
#else
qtvUserList->header()->setResizeMode(UserListModel::COL_NICK, QHeaderView::Stretch);
- qtvUserList->header()->setResizeMode(UserListModel::COL_INACTIVEDAYS, QHeaderView::ResizeToContents);
- qtvUserList->header()->setResizeMode(UserListModel::COL_LASTCHANNEL, QHeaderView::Stretch);
+ if (!m_model->isLegacy()) {
+ qtvUserList->header()->setResizeMode(UserListModel::COL_INACTIVEDAYS, QHeaderView::ResizeToContents);
+ qtvUserList->header()->setResizeMode(UserListModel::COL_LASTCHANNEL, QHeaderView::Stretch);
+ }
#endif
if (m_model->isLegacy()) {