diff --git a/lib/jkqtcommon.pri b/lib/jkqtcommon.pri index 6fcbc7bc715..715dafeedd4 100644 --- a/lib/jkqtcommon.pri +++ b/lib/jkqtcommon.pri @@ -48,7 +48,8 @@ isEmpty(JKQTP_COMMON_PRI_INCLUDED) { $$PWD/jkqtcommon/jkqtpicons.cpp \ $$PWD/jkqtcommon/jkqtpcsstools.cpp \ $$PWD/jkqtcommon/jkqtpcachingtools.cpp \ - $$PWD/jkqtcommon/jkqtpconcurrencytools.cpp + $$PWD/jkqtcommon/jkqtpconcurrencytools.cpp \ + $$PWD/jkqtcommon/jkqtpexpected.cpp INCLUDEPATH += $$PWD diff --git a/lib/jkqtcommon/CMakeLists.txt b/lib/jkqtcommon/CMakeLists.txt index 5a0d0098df2..4efd608de20 100644 --- a/lib/jkqtcommon/CMakeLists.txt +++ b/lib/jkqtcommon/CMakeLists.txt @@ -30,6 +30,7 @@ target_sources(${lib_name} PRIVATE jkqttools.cpp jkqtpicons.cpp jkqtpcsstools.cpp + jkqtpexpected.cpp ) # ... and add headers target_sources(${lib_name} PUBLIC FILE_SET HEADERS TYPE HEADERS diff --git a/lib/jkqtcommon/jkqtpcsstools.cpp b/lib/jkqtcommon/jkqtpcsstools.cpp index 3f1394b2ca5..7ff680bf9c3 100644 --- a/lib/jkqtcommon/jkqtpcsstools.cpp +++ b/lib/jkqtcommon/jkqtpcsstools.cpp @@ -23,6 +23,8 @@ #include "jkqtcommon/jkqtpcodestructuring.h" #include #include +#include +#include JKQTPCSSParser::RawErrorTag_t JKQTPCSSParser::RawErrorTag={}; diff --git a/lib/jkqtcommon/jkqtpexpected.cpp b/lib/jkqtcommon/jkqtpexpected.cpp new file mode 100644 index 00000000000..f6e82ba1be8 --- /dev/null +++ b/lib/jkqtcommon/jkqtpexpected.cpp @@ -0,0 +1,22 @@ +/* + Copyright (c) 2008-2022 Jan W. Krieger () + + last modification: $LastChangedDate$ (revision $Rev$) + + This software is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License (LGPL) as published by + the Free Software Foundation, either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License (LGPL) for more details. + + You should have received a copy of the GNU Lesser General Public License (LGPL) + along with this program. If not, see . +*/ + + + +#include "jkqtpexpected.h" diff --git a/lib/jkqtcommon/jkqtpexpected.h b/lib/jkqtcommon/jkqtpexpected.h index e303d770667..99295e1a79e 100644 --- a/lib/jkqtcommon/jkqtpexpected.h +++ b/lib/jkqtcommon/jkqtpexpected.h @@ -35,7 +35,7 @@ struct JKQTPExpectedUnexpectedType {}; * * \see JKQTPExpected, JKQTPExpectedUnexpectedType */ -inline constexpr JKQTPExpectedUnexpectedType JKQTPUnexpected {}; +#define JKQTPUnexpected JKQTPExpectedUnexpectedType() /** \brief an "expected" datatype, which can either represent a function result of type \c T or an error of type \c E * \ingroup jkqtptools_general