Fix build when use Qt4
authoralagoutte <alagoutte@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 13 Dec 2013 10:56:14 +0000 (10:56 +0000)
committeralagoutte <alagoutte@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 13 Dec 2013 10:56:14 +0000 (10:56 +0000)
ui/qt/sctp_chunk_statistics_dialog.cpp:16:40: error: ‘class QHeaderView’ has no member named ‘setSectionsClickable’
ui/qt/sctp_chunk_statistics_dialog.cpp:17:40: error: ‘class QHeaderView’ has no member named ‘setSectionsMovable’

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@54034 f5534014-38df-0310-8fa8-9805f1628bb7

ui/qt/sctp_chunk_statistics_dialog.cpp

index b4a70f6d7580980434e9619bfa371c6ee867109d..29c65b5e99771ab72191d0684d3ec624e16c7a3e 100644 (file)
@@ -13,8 +13,14 @@ SCTPChunkStatisticsDialog::SCTPChunkStatisticsDialog(QWidget *parent, sctp_assoc
 {
     ui->setupUi(this);
     printf("selected_assoc id=%d\n", selected_assoc->assoc_id);
+#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
+    ui->tableWidget->verticalHeader()->setClickable(true);
+    ui->tableWidget->verticalHeader()->setMovable(true);
+#else
     ui->tableWidget->verticalHeader()->setSectionsClickable(true);
     ui->tableWidget->verticalHeader()->setSectionsMovable(true);
+#endif
+
 
     ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
     ui->tableWidget->setSelectionMode(QAbstractItemView::SingleSelection);