Use QT_VERSION_CHECK macro for better compatibility.

This commit is contained in:
mfreiholz
2016-04-11 07:27:02 +02:00
parent 14a80f1753
commit fffc84374a
5 changed files with 12 additions and 12 deletions

View File

@@ -99,7 +99,7 @@ SectionWidget* ContainerWidget::addSectionContent(const SectionContent::RefPtr&
data.titleWidget = new SectionTitleWidget(sc, NULL);
data.contentWidget = new SectionContentWidget(sc, NULL);
#if QT_VERSION >= 0x050000
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QObject::connect(data.titleWidget, &SectionTitleWidget::activeTabChanged, this, &ContainerWidget::onActiveTabChanged);
#else
QObject::connect(data.titleWidget, SIGNAL(activeTabChanged()), this, SLOT(onActiveTabChanged()));
@@ -308,7 +308,7 @@ QMenu* ContainerWidget::createContextMenu() const
a->setProperty("type", "section");
a->setCheckable(true);
a->setChecked(true);
#if QT_VERSION >= 0x050000
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QObject::connect(a, &QAction::toggled, this, &ContainerWidget::onActionToggleSectionContentVisibility);
#else
QObject::connect(a, SIGNAL(toggled(bool)), this, SLOT(onActionToggleSectionContentVisibility(bool)));
@@ -330,7 +330,7 @@ QMenu* ContainerWidget::createContextMenu() const
a->setProperty("type", "section");
a->setCheckable(true);
a->setChecked(false);
#if QT_VERSION >= 0x050000
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QObject::connect(a, &QAction::toggled, this, &ContainerWidget::onActionToggleSectionContentVisibility);
#else
QObject::connect(a, SIGNAL(toggled(bool)), this, SLOT(onActionToggleSectionContentVisibility(bool)));
@@ -350,7 +350,7 @@ QMenu* ContainerWidget::createContextMenu() const
a->setProperty("type", "floating");
a->setCheckable(true);
a->setChecked(fw->isVisible());
#if QT_VERSION >= 0x050000
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QObject::connect(a, &QAction::toggled, this, &ContainerWidget::onActionToggleSectionContentVisibility);
#else
QObject::connect(a, SIGNAL(toggled(bool)), this, SLOT(onActionToggleSectionContentVisibility(bool)));