From 6482ff7a49c5910d37b744c4192a6ec830c8b447 Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Fri, 15 Mar 2024 11:36:40 +0100 Subject: [PATCH] FIX another bug from issue #124: a use of private Qt-API, which is undocumented and not present in all cases was replaced ... --- lib/jkqtcommon/jkqtpbasicimagetools.h | 3 ++- lib/jkqtcommon/jkqttools.h | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/jkqtcommon/jkqtpbasicimagetools.h b/lib/jkqtcommon/jkqtpbasicimagetools.h index 907f48dea09..8074e8f53fb 100644 --- a/lib/jkqtcommon/jkqtpbasicimagetools.h +++ b/lib/jkqtcommon/jkqtpbasicimagetools.h @@ -33,6 +33,7 @@ #include #include "jkqtcommon/jkqtcommon_imexport.h" #include "jkqtcommon/jkqtpmathtools.h" +#include "jkqtcommon/jkqttools.h" /** \brief possible datatypes of the data array, plotted by this class. \ingroup jkqtplotter_imagelots_tools @@ -1203,7 +1204,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPPaletteList: public QList > push_back(v.first, v.second); } } - template = true> + template = true> inline JKQTPPaletteList(InputIterator first, InputIterator last): ListType(first, last) {} inline JKQTPPaletteList(ListType &&other):ListType(std::forward(other)) {} inline JKQTPPaletteList(const ListType &other):ListType(other) {} diff --git a/lib/jkqtcommon/jkqttools.h b/lib/jkqtcommon/jkqttools.h index 75712dd9e08..d39bd2bcb00 100644 --- a/lib/jkqtcommon/jkqttools.h +++ b/lib/jkqtcommon/jkqttools.h @@ -95,5 +95,12 @@ JKQTCOMMON_LIB_EXPORT void jkloadSplitter(QSettings& settings, QSplitter* splitt */ JKQTCOMMON_LIB_EXPORT quint16 jkqtp_checksum(const void* data, size_t len); +/** \brief Checks whether a given iterator is an input iterator (std::input_iterator_tag) + * \ingroup jkqtptools_general + * + **/ +template +using JKQTPIsInputIteratorTrait = typename std::enable_if::iterator_category, std::input_iterator_tag>::value, bool>::type; + #endif // JKQTTOOLS_H