diff --git a/src/app/puzzle/vpmainwindow.cpp b/src/app/puzzle/vpmainwindow.cpp index 233143f5e..1a181563b 100644 --- a/src/app/puzzle/vpmainwindow.cpp +++ b/src/app/puzzle/vpmainwindow.cpp @@ -88,12 +88,16 @@ Q_LOGGING_CATEGORY(pWindow, "p.window") // NOLINT QT_WARNING_POP +#if (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) +// DO NOT WORK WITH GCC 4.8 +#else #if __cplusplus >= 201402L using namespace std::chrono_literals; #else #include "../vmisc/bpstd/chrono.hpp" using namespace bpstd::literals::chrono_literals; -#endif +#endif // __cplusplus >= 201402L +#endif //(defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) namespace { diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index aa8b8a32a..86cda877e 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -74,12 +74,16 @@ #include #include +#if (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) +// DO NOT WORK WITH GCC 4.8 +#else #if __cplusplus >= 201402L using namespace std::chrono_literals; #else #include "../vmisc/bpstd/chrono.hpp" using namespace bpstd::literals::chrono_literals; -#endif +#endif // __cplusplus >= 201402L +#endif //(defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) #if defined(Q_OS_MAC) #include diff --git a/src/app/valentina/dialogs/dialoglayoutprogress.cpp b/src/app/valentina/dialogs/dialoglayoutprogress.cpp index 70acfe90e..e80b33057 100644 --- a/src/app/valentina/dialogs/dialoglayoutprogress.cpp +++ b/src/app/valentina/dialogs/dialoglayoutprogress.cpp @@ -39,12 +39,16 @@ #include #include +#if (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) +// DO NOT WORK WITH GCC 4.8 +#else #if __cplusplus >= 201402L using namespace std::chrono_literals; #else #include "../vmisc/bpstd/chrono.hpp" using namespace bpstd::literals::chrono_literals; -#endif +#endif // __cplusplus >= 201402L +#endif //(defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) //--------------------------------------------------------------------------------------------------------------------- DialogLayoutProgress::DialogLayoutProgress(QElapsedTimer timer, qint64 timeout, QWidget *parent) diff --git a/src/app/valentina/dialogs/vwidgetdetails.cpp b/src/app/valentina/dialogs/vwidgetdetails.cpp index 1c41f56f1..e472eba11 100644 --- a/src/app/valentina/dialogs/vwidgetdetails.cpp +++ b/src/app/valentina/dialogs/vwidgetdetails.cpp @@ -39,12 +39,16 @@ #include #include +#if (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) +// DO NOT WORK WITH GCC 4.8 +#else #if __cplusplus >= 201402L using namespace std::chrono_literals; #else #include "../vmisc/bpstd/chrono.hpp" using namespace bpstd::literals::chrono_literals; -#endif +#endif // __cplusplus >= 201402L +#endif //(defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) namespace { diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 78af326a1..f92d60f65 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -214,12 +214,16 @@ #include #endif //defined(Q_OS_MAC) +#if (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) +// DO NOT WORK WITH GCC 4.8 +#else #if __cplusplus >= 201402L using namespace std::chrono_literals; #else #include "../vmisc/bpstd/chrono.hpp" using namespace bpstd::literals::chrono_literals; -#endif +#endif // __cplusplus >= 201402L +#endif //(defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) QT_WARNING_PUSH QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes") diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index a768bff81..d6102b94b 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -120,12 +120,16 @@ #include #include +#if (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) +// DO NOT WORK WITH GCC 4.8 +#else #if __cplusplus >= 201402L using namespace std::chrono_literals; #else #include "../vmisc/bpstd/chrono.hpp" using namespace bpstd::literals::chrono_literals; -#endif +#endif // __cplusplus >= 201402L +#endif //(defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) const QString VPattern::AttrReadOnly = QStringLiteral("readOnly"); const QString VPattern::AttrLabelPrefix = QStringLiteral("labelPrefix"); diff --git a/src/libs/vmisc/defglobal.h b/src/libs/vmisc/defglobal.h index c093be593..0302463f8 100644 --- a/src/libs/vmisc/defglobal.h +++ b/src/libs/vmisc/defglobal.h @@ -57,6 +57,14 @@ void qAsConst(const T &&) Q_DECL_EQ_DELETE; #define SUFFIX_APPEND(x, y) x ## y // NOLINT(cppcoreguidelines-macro-usage) +#if (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) +#define HOURS(x) (x * 3600000) // NOLINT(cppcoreguidelines-macro-usage) +#define MINUTES(x) (x * 60000) // NOLINT(cppcoreguidelines-macro-usage) +#define SECONDS(x) (x * 1000) // NOLINT(cppcoreguidelines-macro-usage) +#define MSECONDS(x) (x) // NOLINT(cppcoreguidelines-macro-usage) +#define MICSECONDS(x) (x) // NOLINT(cppcoreguidelines-macro-usage) +#define NANOSECONDS(x) (x) // NOLINT(cppcoreguidelines-macro-usage) +#else #if __cplusplus >= 201402L #define HOURS(x) SUFFIX_APPEND(x, h) // NOLINT(cppcoreguidelines-macro-usage) #define MINUTES(x) SUFFIX_APPEND(x, min) // NOLINT(cppcoreguidelines-macro-usage) @@ -72,7 +80,16 @@ void qAsConst(const T &&) Q_DECL_EQ_DELETE; #define MICSECONDS(x) SUFFIX_APPEND(x, _us) // NOLINT(cppcoreguidelines-macro-usage) #define NANOSECONDS(x) SUFFIX_APPEND(x, _ns) // NOLINT(cppcoreguidelines-macro-usage) #endif // __cplusplus >= 201402L +#endif // (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) +#if (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) +#define V_HOURS(x) HOURS(x) // NOLINT(cppcoreguidelines-macro-usage) +#define V_MINUTES(x) MINUTES(x) // NOLINT(cppcoreguidelines-macro-usage) +#define V_SECONDS(x) SECONDS(x) // NOLINT(cppcoreguidelines-macro-usage) +#define V_MSECONDS(x) MSECONDS(x) // NOLINT(cppcoreguidelines-macro-usage) +#define V_MICSECONDS(x) MICSECONDS(x) // NOLINT(cppcoreguidelines-macro-usage) +#define V_NANOSECONDS(x) NANOSECONDS(x) // NOLINT(cppcoreguidelines-macro-usage) +#else #if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) #define V_HOURS(x) HOURS(x) // NOLINT(cppcoreguidelines-macro-usage) #define V_MINUTES(x) MINUTES(x) // NOLINT(cppcoreguidelines-macro-usage) @@ -87,6 +104,7 @@ void qAsConst(const T &&) Q_DECL_EQ_DELETE; #define V_MSECONDS(x) (x) // NOLINT(cppcoreguidelines-macro-usage) #define V_MICSECONDS(x) (x) // NOLINT(cppcoreguidelines-macro-usage) #define V_NANOSECONDS(x) (x) // NOLINT(cppcoreguidelines-macro-usage) -#endif +#endif // QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) +#endif // (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) #endif // DEFGLOBAL_H diff --git a/src/libs/vtools/tools/vtoolseamallowance.cpp b/src/libs/vtools/tools/vtoolseamallowance.cpp index 243b45b61..216faaa57 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.cpp +++ b/src/libs/vtools/tools/vtoolseamallowance.cpp @@ -75,12 +75,16 @@ #include #include +#if (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) +// DO NOT WORK WITH GCC 4.8 +#else #if __cplusplus >= 201402L using namespace std::chrono_literals; #else #include "../vmisc/bpstd/chrono.hpp" using namespace bpstd::literals::chrono_literals; -#endif +#endif // __cplusplus >= 201402L +#endif //(defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) // Current version of seam allowance tag need for backward compatibility const quint8 VToolSeamAllowance::pieceVersion = 2; diff --git a/src/libs/vwidgets/vlineedit.cpp b/src/libs/vwidgets/vlineedit.cpp index 438d02847..084479161 100644 --- a/src/libs/vwidgets/vlineedit.cpp +++ b/src/libs/vwidgets/vlineedit.cpp @@ -35,12 +35,16 @@ #include #include +#if (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) +// DO NOT WORK WITH GCC 4.8 +#else #if __cplusplus >= 201402L using namespace std::chrono_literals; #else #include "../vmisc/bpstd/chrono.hpp" using namespace bpstd::literals::chrono_literals; -#endif +#endif // __cplusplus >= 201402L +#endif //(defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG) namespace {