From 3a72b27632d596a6e2a18ce9dcd3f3451e917841 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Mon, 21 Oct 2013 09:27:12 +0000 Subject: [PATCH] Code maintenance for Qt 5: - Changed code for GXS git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6859 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- .../gui/gxschannels/CreateGxsChannelMsg.cpp | 1 + .../gui/gxsforums/GxsForumThreadWidget.cpp | 5 ++-- .../src/gui/unfinished/ExampleDialog.cpp | 27 ++++++++++--------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp index 3c4651bb2..2ba8d1ab1 100644 --- a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp +++ b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "CreateGxsChannelMsg.h" diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index 4b83a10b4..94c3c06f3 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -37,6 +37,7 @@ #include "gui/msgs/MessageComposer.h" #include "util/DateTime.h" #include "gui/common/UIStateHelper.h" +#include "util/QtVersion.h" #include #include @@ -153,7 +154,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const std::string &forumId, QWidget * /* Set header resize modes and initial section sizes */ QHeaderView * ttheader = ui->threadTreeWidget->header () ; - ttheader->setResizeMode (COLUMN_THREAD_TITLE, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(ttheader, COLUMN_THREAD_TITLE, QHeaderView::Interactive); ttheader->resizeSection (COLUMN_THREAD_DATE, 140); ttheader->resizeSection (COLUMN_THREAD_TITLE, 290); @@ -177,7 +178,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const std::string &forumId, QWidget * /* Set header sizes for the fixed columns and resize modes, must be set after processSettings */ ttheader->resizeSection (COLUMN_THREAD_READ, 24); - ttheader->setResizeMode (COLUMN_THREAD_READ, QHeaderView::Fixed); + QHeaderView_setSectionResizeMode(ttheader, COLUMN_THREAD_READ, QHeaderView::Fixed); ttheader->hideSection (COLUMN_THREAD_CONTENT); ui->progressBar->hide(); diff --git a/retroshare-gui/src/gui/unfinished/ExampleDialog.cpp b/retroshare-gui/src/gui/unfinished/ExampleDialog.cpp index 207abb644..1b410171c 100644 --- a/retroshare-gui/src/gui/unfinished/ExampleDialog.cpp +++ b/retroshare-gui/src/gui/unfinished/ExampleDialog.cpp @@ -37,6 +37,7 @@ #include #include +#include "util/QtVersion.h" /* Images for context menu icons */ #define IMAGE_REMOVEFRIEND ":/images/removefriend16.png" @@ -60,19 +61,19 @@ ExampleDialog::ExampleDialog(QWidget *parent) /* Set header resize modes and initial section sizes */ QHeaderView * _header = ui.peertreeWidget->header () ; - _header->setResizeMode (0, QHeaderView::Custom); - _header->setResizeMode (1, QHeaderView::Interactive); - _header->setResizeMode (2, QHeaderView::Interactive); - _header->setResizeMode (3, QHeaderView::Interactive); - _header->setResizeMode (4, QHeaderView::Interactive); - _header->setResizeMode (5, QHeaderView::Interactive); - _header->setResizeMode (6, QHeaderView::Interactive); - _header->setResizeMode (7, QHeaderView::Interactive); - _header->setResizeMode (8, QHeaderView::Interactive); - _header->setResizeMode (9, QHeaderView::Interactive); - _header->setResizeMode (10, QHeaderView::Interactive); - _header->setResizeMode (11, QHeaderView::Interactive); - + QHeaderView_setSectionResizeMode(_header, 0, QHeaderView::Custom); + QHeaderView_setSectionResizeMode(_header, 1, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 2, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 3, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 4, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 5, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 6, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 7, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 8, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 9, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 10, QHeaderView::Interactive); + QHeaderView_setSectionResizeMode(_header, 11, QHeaderView::Interactive); + _header->resizeSection ( 0, 25 ); _header->resizeSection ( 1, 100 ); _header->resizeSection ( 2, 100 );