diff --git a/AdvancedDockingSystem/include/ads/Internal.h b/AdvancedDockingSystem/include/ads/Internal.h index b97e838..7a1acf1 100644 --- a/AdvancedDockingSystem/include/ads/Internal.h +++ b/AdvancedDockingSystem/include/ads/Internal.h @@ -6,7 +6,7 @@ #include "ads/API.h" -#if QT_VERSION >= 0x050000 +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #else #include "ads/SectionContent.h" #endif diff --git a/AdvancedDockingSystem/src/ContainerWidget.cpp b/AdvancedDockingSystem/src/ContainerWidget.cpp index 1fc51dd..918c80e 100644 --- a/AdvancedDockingSystem/src/ContainerWidget.cpp +++ b/AdvancedDockingSystem/src/ContainerWidget.cpp @@ -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))); diff --git a/AdvancedDockingSystem/src/DropOverlay.cpp b/AdvancedDockingSystem/src/DropOverlay.cpp index 269d84c..67def33 100644 --- a/AdvancedDockingSystem/src/DropOverlay.cpp +++ b/AdvancedDockingSystem/src/DropOverlay.cpp @@ -286,7 +286,7 @@ void hideDropOverlay() { MyOverlay->hide(); delete MyOverlay; -#if QT_VERSION >= 0x050000 +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) MyOverlayParent.clear(); #else MyOverlayParent = 0; diff --git a/AdvancedDockingSystem/src/SectionTitleWidget.cpp b/AdvancedDockingSystem/src/SectionTitleWidget.cpp index 243b394..2793498 100644 --- a/AdvancedDockingSystem/src/SectionTitleWidget.cpp +++ b/AdvancedDockingSystem/src/SectionTitleWidget.cpp @@ -90,7 +90,7 @@ void SectionTitleWidget::mouseReleaseEvent(QMouseEvent* ev) InternalContentData data; _fw->takeContent(data); _fw->deleteLater(); -#if QT_VERSION >= 0x050000 +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) _fw.clear(); #else _fw = 0; @@ -140,7 +140,7 @@ void SectionTitleWidget::mouseReleaseEvent(QMouseEvent* ev) InternalContentData data; _fw->takeContent(data); _fw->deleteLater(); -#if QT_VERSION >= 0x050000 +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) _fw.clear(); #else _fw = 0; diff --git a/AdvancedDockingSystem/src/SectionWidget.cpp b/AdvancedDockingSystem/src/SectionWidget.cpp index 574f134..6647616 100644 --- a/AdvancedDockingSystem/src/SectionWidget.cpp +++ b/AdvancedDockingSystem/src/SectionWidget.cpp @@ -55,7 +55,7 @@ SectionWidget::SectionWidget(ContainerWidget* parent) : closeButton->setToolTip(tr("Close")); closeButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); _tabsLayout->addWidget(closeButton); -#if QT_VERSION >= 0x050000 +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QObject::connect(closeButton, &QPushButton::clicked, this, &SectionWidget::onCloseButtonClicked); #else QObject::connect(closeButton, SIGNAL(clicked(bool)), this, SLOT(onCloseButtonClicked())); @@ -119,7 +119,7 @@ void SectionWidget::addContent(const SectionContent::RefPtr& c) SectionTitleWidget* title = new SectionTitleWidget(c, NULL); _sectionTitles.append(title); _tabsLayout->insertWidget(_tabsLayout->count() - 2, title); -#if QT_VERSION >= 0x050000 +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QObject::connect(title, &SectionTitleWidget::clicked, this, &SectionWidget::onSectionTitleClicked); #else QObject::connect(title, SIGNAL(clicked()), this, SLOT(onSectionTitleClicked())); @@ -146,7 +146,7 @@ void SectionWidget::addContent(const InternalContentData& data, bool autoActivat _sectionTitles.append(data.titleWidget); _tabsLayout->insertWidget(_tabsLayout->count() - 2, data.titleWidget); data.titleWidget->setVisible(true); -#if QT_VERSION >= 0x050000 +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QObject::connect(data.titleWidget, &SectionTitleWidget::clicked, this, &SectionWidget::onSectionTitleClicked); #else QObject::connect(data.titleWidget, SIGNAL(clicked()), this, SLOT(onSectionTitleClicked())); @@ -257,7 +257,7 @@ void SectionWidget::moveContent(int from, int to) QLayoutItem* liFrom = NULL; liFrom = _tabsLayout->takeAt(from); -#if QT_VERSION >= 0x050000 +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) _tabsLayout->insertItem(to, liFrom); #else _tabsLayout->insertWidget(to, liFrom->widget());