summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-03-04 13:23:10 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-03-04 16:03:53 (GMT)
commitca7a45a25c2fe332fad1ee3f7a2822415c249206 (patch)
tree268c6d37f087935a307061f9d5ef507ddd5162cf /Swift/QtUI/UserSearch
parent836925a5cdc7017da7fb84416c803e652b48e399 (diff)
downloadswift-ca7a45a25c2fe332fad1ee3f7a2822415c249206.zip
swift-ca7a45a25c2fe332fad1ee3f7a2822415c249206.tar.bz2
Qt5 support & warning fixes.
Change-Id: I62c7d5ca44c915e36c797c798294b7c34b465514
Diffstat (limited to 'Swift/QtUI/UserSearch')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index d69c626..02b238e 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -29,7 +29,7 @@ namespace Swift {
QtUserSearchWindow::QtUserSearchWindow(UIEventStream* eventStream, UserSearchWindow::Type type, const std::set<std::string>& groups) : eventStream_(eventStream), type_(type), model_(NULL) {
setupUi(this);
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
setWindowIcon(QIcon(":/logo-icon-16.png"));
#endif
QString title(type == UserSearchWindow::AddContact ? tr("Add Contact") : tr("Chat to User"));
@@ -264,7 +264,11 @@ void QtUserSearchWindow::setResultsForm(Form::ref results) {
resultsPage_->results_->setModel(newModel);
resultsPage_->results_->setItemDelegate(new QItemDelegate());
resultsPage_->results_->setHeaderHidden(false);
+#if QT_VERSION >= 0x050000
+ resultsPage_->results_->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
+#else
resultsPage_->results_->header()->setResizeMode(QHeaderView::ResizeToContents);
+#endif
delete model_;
model_ = newModel;
resultsPage_->setNoResults(model_->rowCount() == 0);