fix Trusty/Indigo build

This commit is contained in:
Robert Haschke 2017-11-24 15:12:38 +01:00
parent 1bc485658e
commit 40cfceb557
7 changed files with 11 additions and 4 deletions

View File

@ -46,6 +46,7 @@
#include <QHeaderView> #include <QHeaderView>
#include <QScrollBar> #include <QScrollBar>
#include <qevent.h> #include <qevent.h>
#include <numeric>
namespace moveit_rviz_plugin { namespace moveit_rviz_plugin {
@ -306,7 +307,9 @@ AutoAdjustingTreeView::AutoAdjustingTreeView(QWidget *parent)
: QTreeView(parent) : QTreeView(parent)
{ {
// consider viewportSizeHint() // consider viewportSizeHint()
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
#endif
} }
void AutoAdjustingTreeView::setStretchSection(int section) void AutoAdjustingTreeView::setStretchSection(int section)

View File

@ -150,7 +150,7 @@ public:
class AutoAdjustingTreeView : public QTreeView { class AutoAdjustingTreeView : public QTreeView {
Q_OBJECT Q_OBJECT
Q_PROPERTY(int stretchSection MEMBER stretch_section_ READ stretchSection WRITE setStretchSection) Q_PROPERTY(int stretchSection READ stretchSection WRITE setStretchSection)
mutable std::vector<int> size_hints_; // size hints for sections mutable std::vector<int> size_hints_; // size hints for sections
QList<int> auto_hide_cols_; // auto-hiding sections QList<int> auto_hide_cols_; // auto-hiding sections
@ -165,7 +165,7 @@ public:
void setAutoHideSections(const QList<int> &sections); void setAutoHideSections(const QList<int> &sections);
void setModel(QAbstractItemModel *model); void setModel(QAbstractItemModel *model);
QSize viewportSizeHint() const override; QSize viewportSizeHint() const;
void resizeEvent(QResizeEvent *event) override; void resizeEvent(QResizeEvent *event) override;
}; };

View File

@ -40,6 +40,7 @@
#include <rviz/panel.h> #include <rviz/panel.h>
#include <moveit/macros/class_forward.h> #include <moveit/macros/class_forward.h>
#include <QModelIndex>
namespace moveit_rviz_plugin { namespace moveit_rviz_plugin {

View File

@ -35,6 +35,8 @@
/* Author: Robert Haschke */ /* Author: Robert Haschke */
#include "flat_merge_proxy_model.h" #include "flat_merge_proxy_model.h"
#include <vector>
#include <numeric>
namespace moveit_rviz_plugin { namespace moveit_rviz_plugin {
namespace utils { namespace utils {

View File

@ -103,7 +103,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)) Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))
Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int)) Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int))
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #if QT_VERSION >= 0x050000 // due to moc issue we need to use the hex number
Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>)) Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>))
#else #else
Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex,QModelIndex)) Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex,QModelIndex))

View File

@ -35,6 +35,7 @@
/* Author: Robert Haschke */ /* Author: Robert Haschke */
#include "tree_merge_proxy_model.h" #include "tree_merge_proxy_model.h"
#include <vector>
namespace moveit_rviz_plugin { namespace moveit_rviz_plugin {
namespace utils { namespace utils {

View File

@ -106,7 +106,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)) Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))
Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int)) Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int))
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #if QT_VERSION >= 0x050000 // due to moc issue we need to use the hex number
Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>)) Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>))
#else #else
Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex,QModelIndex)) Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex,QModelIndex))