From 74bd52652e75fcf9f9ae2b803806ffad0fc83134 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 16 Jan 2023 18:48:21 +0200 Subject: [PATCH] Include vsapoint.cpp only before C++17. --- src/libs/vlayout/vlayout.qbs | 97 +++++++++++++++++++---------------- src/libs/vlayout/vsapoint.cpp | 1 - 2 files changed, 52 insertions(+), 46 deletions(-) diff --git a/src/libs/vlayout/vlayout.qbs b/src/libs/vlayout/vlayout.qbs index a0a61e78a..1bd442ece 100644 --- a/src/libs/vlayout/vlayout.qbs +++ b/src/libs/vlayout/vlayout.qbs @@ -11,51 +11,58 @@ VLib { Depends { name: "VFormatLib" } name: "VLayoutLib" - files: [ - "vlayoutexporter.h", - "vlayoutgenerator.h", - "vlayoutdef.h", - "vlayoutpaper.h", - "vlayoutpaper_p.h", - "vbank.h", - "vcontour.h", - "vcontour_p.h", - "vbestsquare.h", - "vlayoutpoint.h", - "vposition.h", - "vrawlayout.h", - "vprintlayout.h", - "vsapoint.h", - "vtextmanager.h", - "vposter.h", - "vgraphicsfillitem.h", - "vabstractpiece.h", - "vabstractpiece_p.h", - "vlayoutpiece.h", - "vlayoutpiece_p.h", - "vlayoutpiecepath.h", - "vlayoutpiecepath_p.h", - "vbestsquare_p.h", - "vrawsapoint.h", - "vlayoutexporter.cpp", - "vlayoutgenerator.cpp", - "vlayoutpaper.cpp", - "vbank.cpp", - "vcontour.cpp", - "vbestsquare.cpp", - "vlayoutpoint.cpp", - "vposition.cpp", - "vrawlayout.cpp", - "vsapoint.cpp", - "vprintlayout.cpp", - "vtextmanager.cpp", - "vposter.cpp", - "vgraphicsfillitem.cpp", - "vabstractpiece.cpp", - "vlayoutpiece.cpp", - "vlayoutpiecepath.cpp", - "vrawsapoint.cpp", - ] + files: { + var files = [ + "vlayoutexporter.h", + "vlayoutgenerator.h", + "vlayoutdef.h", + "vlayoutpaper.h", + "vlayoutpaper_p.h", + "vbank.h", + "vcontour.h", + "vcontour_p.h", + "vbestsquare.h", + "vlayoutpoint.h", + "vposition.h", + "vrawlayout.h", + "vprintlayout.h", + "vsapoint.h", + "vtextmanager.h", + "vposter.h", + "vgraphicsfillitem.h", + "vabstractpiece.h", + "vabstractpiece_p.h", + "vlayoutpiece.h", + "vlayoutpiece_p.h", + "vlayoutpiecepath.h", + "vlayoutpiecepath_p.h", + "vbestsquare_p.h", + "vrawsapoint.h", + "vlayoutexporter.cpp", + "vlayoutgenerator.cpp", + "vlayoutpaper.cpp", + "vbank.cpp", + "vcontour.cpp", + "vbestsquare.cpp", + "vlayoutpoint.cpp", + "vposition.cpp", + "vrawlayout.cpp", + "vprintlayout.cpp", + "vtextmanager.cpp", + "vposter.cpp", + "vgraphicsfillitem.cpp", + "vabstractpiece.cpp", + "vlayoutpiece.cpp", + "vlayoutpiecepath.cpp", + "vrawsapoint.cpp" + ]; + + if (Qt.core.versionMajor >= 5 && Qt.core.versionMinor < 12) { + files.push("vsapoint.cpp"); // need only before C++17 + } + + return files; + } Group { name: "dialogs" diff --git a/src/libs/vlayout/vsapoint.cpp b/src/libs/vlayout/vsapoint.cpp index d00ff1320..72c00f4f4 100644 --- a/src/libs/vlayout/vsapoint.cpp +++ b/src/libs/vlayout/vsapoint.cpp @@ -26,7 +26,6 @@ ** *************************************************************************/ - // See https://stackoverflow.com/a/46719572/3045403 #if __cplusplus < 201703L #include "vsapoint.h"