Skip to content

Commit

Permalink
FIX another bug from issue #124: a use of private Qt-API, which is un…
Browse files Browse the repository at this point in the history
…documented and not present in all cases was replaced ...
  • Loading branch information
jkriege2 committed Mar 15, 2024
1 parent 77f498f commit 6482ff7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/jkqtcommon/jkqtpbasicimagetools.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <limits>
#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
Expand Down Expand Up @@ -1203,7 +1204,7 @@ class JKQTCOMMON_LIB_EXPORT JKQTPPaletteList: public QList<QPair<double, QRgb> >
push_back(v.first, v.second);
}
}
template <typename InputIterator, QtPrivate::IfIsInputIterator<InputIterator> = true>
template <typename InputIterator, JKQTPIsInputIteratorTrait<InputIterator> = true>
inline JKQTPPaletteList(InputIterator first, InputIterator last): ListType(first, last) {}
inline JKQTPPaletteList(ListType &&other):ListType(std::forward<ListType>(other)) {}
inline JKQTPPaletteList(const ListType &other):ListType(other) {}
Expand Down
7 changes: 7 additions & 0 deletions lib/jkqtcommon/jkqttools.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename Iterator>
using JKQTPIsInputIteratorTrait = typename std::enable_if<std::is_convertible<typename std::iterator_traits<Iterator>::iterator_category, std::input_iterator_tag>::value, bool>::type;


#endif // JKQTTOOLS_H

0 comments on commit 6482ff7

Please sign in to comment.