diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-12-26 18:16:30 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-12-26 18:16:30 (GMT) |
commit | 49d621c38effcdcc9aaafd3ee14082a2ae8278c4 (patch) | |
tree | 1140379b7a6357e2d197f09235b79f76db9d8e0b /Swift/QtUI | |
parent | a8c4b779ad2795f76769f7dae2749ef869300bee (diff) | |
download | swift-contrib-49d621c38effcdcc9aaafd3ee14082a2ae8278c4.zip swift-contrib-49d621c38effcdcc9aaafd3ee14082a2ae8278c4.tar.bz2 |
Fixed crash when searching for users.
Resolves: #730
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/UserSearch/QtUserSearchWindow.cpp | 1 | ||||
-rw-r--r-- | Swift/QtUI/UserSearch/UserSearchModel.cpp | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp index 034b59c..e436066 100644 --- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp +++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp @@ -59,7 +59,6 @@ QtUserSearchWindow::~QtUserSearchWindow() { } void QtUserSearchWindow::handleCurrentChanged(int page) { - qDebug() << "Next called, currently, was " << currentId() << ", " << lastPage_; if (page == 2 && lastPage_ == 1) { setError(""); /* next won't be called if JID is selected */ diff --git a/Swift/QtUI/UserSearch/UserSearchModel.cpp b/Swift/QtUI/UserSearch/UserSearchModel.cpp index 782d2d0..f6fd4c0 100644 --- a/Swift/QtUI/UserSearch/UserSearchModel.cpp +++ b/Swift/QtUI/UserSearch/UserSearchModel.cpp @@ -43,7 +43,7 @@ QModelIndex UserSearchModel::index(int row, int column, const QModelIndex & pare if (!hasIndex(row, column, parent)) { return QModelIndex(); } - return row < (int)results_.size() ? createIndex(row, column, (void*)&(results_[row])) : QModelIndex(); + return row < static_cast<int>(results_.size()) ? createIndex(row, column, reinterpret_cast<void*>(const_cast<UserSearchResult*>(&(results_[row])))) : QModelIndex(); } QModelIndex UserSearchModel::parent(const QModelIndex& /*index*/) const { |