diff --git a/doc/images/jkqtmathtext/jkqtmathtext_unicode.png b/doc/images/jkqtmathtext/jkqtmathtext_unicode.png index 3f8f971062..d8bf9ec46a 100644 Binary files a/doc/images/jkqtmathtext/jkqtmathtext_unicode.png and b/doc/images/jkqtmathtext/jkqtmathtext_unicode.png differ diff --git a/lib/jkqtcommon/jkqtpbasicimagetools.h b/lib/jkqtcommon/jkqtpbasicimagetools.h index c8ab6a29cb..597f3d58f4 100644 --- a/lib/jkqtcommon/jkqtpbasicimagetools.h +++ b/lib/jkqtcommon/jkqtpbasicimagetools.h @@ -1035,16 +1035,19 @@ inline QRgb jkqtp_qRgbOpaque(QRgb col) { class JKQTCOMMON_LIB_EXPORT JKQTPPaletteList: public QList > { public: - typedef QList > ListType; - JKQTPPaletteList(): ListType() {}; - JKQTPPaletteList(qsizetype size): ListType(size) {}; - JKQTPPaletteList(qsizetype size, ListType::parameter_type value): ListType(size, value) {}; + typedef QPair parameter_type; + typedef QList ListType; + inline JKQTPPaletteList(): ListType() {}; +#if QT_VERSION >= QT_VERSION_CHECK(6,0,0) + inline JKQTPPaletteList(qsizetype size): ListType(size) {}; + inline JKQTPPaletteList(qsizetype size, parameter_type value): ListType(size, value) {}; +#endif template - JKQTPPaletteList(std::initializer_list> args): ListType(args) {}; + inline JKQTPPaletteList(std::initializer_list> args): ListType(args) {}; template = true> - JKQTPPaletteList(InputIterator first, InputIterator last): ListType(first, last) {}; - JKQTPPaletteList(ListType &&other):ListType(std::forward(other)) {}; - JKQTPPaletteList(const ListType &other):ListType(other) {}; + inline JKQTPPaletteList(InputIterator first, InputIterator last): ListType(first, last) {}; + inline JKQTPPaletteList(ListType &&other):ListType(std::forward(other)) {}; + inline JKQTPPaletteList(const ListType &other):ListType(other) {}; using ListType::push_back; inline void push_back(QRgb rgb) { @@ -1066,7 +1069,7 @@ public: } /** \brief returns the minimum value of the double-component */ - double getMinPosition() const { + inline double getMinPosition() const { double mi=0; bool first=true; for (const auto& c: *this) { @@ -1080,7 +1083,7 @@ public: return mi; } /** \brief returns the maximum value of the double-component */ - double getMaxPosition() const { + inline double getMaxPosition() const { double ma=0; bool first=true; for (const auto& c: *this) { @@ -1094,7 +1097,7 @@ public: return ma; } /** \brief returns the minimum and maximum value of the double-component, as well as the avg. increment between two such values */ - void getMinMaxPosition(double& mi, double& ma, double* avgDelta=nullptr) const { + inline void getMinMaxPosition(double& mi, double& ma, double* avgDelta=nullptr) const { mi=ma=0; bool first=true; for (const auto& c: *this) { diff --git a/lib/jkqtcommon/jkqtpstringtools.cpp b/lib/jkqtcommon/jkqtpstringtools.cpp index 3d01ef91b9..e4ed74735c 100644 --- a/lib/jkqtcommon/jkqtpstringtools.cpp +++ b/lib/jkqtcommon/jkqtpstringtools.cpp @@ -752,12 +752,12 @@ QColor jkqtp_String2QColor(QString color) if (rxColMod.exactMatch(color)) { QColor col(Qt::black); const QString name=rxColMod.cap(1); - const int v1=valPercToInt(rxColMod.cap(2), rxColMod.cap(3)); - const int h1=valUnitToInt(mColMod.captured(2), mColMod.captured(3), INT_MAX); - const int v2=valPercToInt(rxColMod.cap(4), rxColMod.cap(5)); - const int a2=valPercToAInt(rxColMod.cap(4), rxColMod.cap(5)); - const int v3=valPercToInt(rxColMod.cap(6), rxColMod.cap(7)); - const int a4=valPercToAInt(rxColMod.cap(8), rxColMod.cap(9)); + const int v1=valUnitToInt(rxColMod.cap(2), rxColMod.cap(3)); + const int h1=valUnitToInt(rxColMod.cap(2), rxColMod.cap(3), INT_MAX); + const int v2=valUnitToInt(rxColMod.cap(4), rxColMod.cap(5)); + const int a2=valUnitToAlphaInt(rxColMod.cap(4), rxColMod.cap(5)); + const int v3=valUnitToInt(rxColMod.cap(6), rxColMod.cap(7)); + const int a4=valUnitToAlphaInt(rxColMod.cap(8), rxColMod.cap(9)); if (name=="gray"||name=="grey") { if (v2<0) col.setRgb(v1,v1,v1); else col.setRgb(v1,v1,v1,a2); diff --git a/lib/jkqtplotter/jkqtplotter.cpp b/lib/jkqtplotter/jkqtplotter.cpp index 5f00265c7e..bc4a3c4cac 100644 --- a/lib/jkqtplotter/jkqtplotter.cpp +++ b/lib/jkqtplotter/jkqtplotter.cpp @@ -31,7 +31,7 @@ #include "jkqtplotter.h" -std::atomic JKQTPlotter::jkqtp_RESIZE_DELAY = 100; +std::atomic JKQTPlotter::jkqtp_RESIZE_DELAY(100); void JKQTPlotter::setGlobalResizeDelay(int delayMS) { diff --git a/lib/jkqtplotter/jkqtplotter.h b/lib/jkqtplotter/jkqtplotter.h index 3da09bda37..4a83c9b273 100644 --- a/lib/jkqtplotter/jkqtplotter.h +++ b/lib/jkqtplotter/jkqtplotter.h @@ -40,6 +40,7 @@ #include #include #include +#include #include "jkqtplotter/jkqtpbaseplotter.h" #include "jkqtplotter/jkqtplotterstyle.h" diff --git a/lib/jkqtplotter/jkqtptools.cpp b/lib/jkqtplotter/jkqtptools.cpp index 37fe70c2ff..cac444b71f 100644 --- a/lib/jkqtplotter/jkqtptools.cpp +++ b/lib/jkqtplotter/jkqtptools.cpp @@ -677,8 +677,13 @@ JKQTPColorDerivationMode JKQTPColorDerivationMode::fromString(const QString &mod return rx4; }(); #endif - for (QString p: parts) { - p=p.removeIf([](QChar c) { return c.isSpace()||c=='\t';}).trimmed(); + for (QString pin: parts) { + QString p; + p.reserve(pin.size()); + for (auto c: pin) { + if (!c.isSpace()&&c!='\t') p.append(c); + } + p=p.trimmed(); if (p=="same_color") res.colorModification=ColorChangeMode::SameColor; else if (p=="invert"||p=="inverted"||p=="inverted_color") res.colorModification=ColorChangeMode::InvertColor; else if (p=="invert"||p=="inverted"||p=="inverted_color") res.colorModification=ColorChangeMode::InvertColor; @@ -694,7 +699,7 @@ JKQTPColorDerivationMode JKQTPColorDerivationMode::fromString(const QString &mod const QString instr=m1arg.captured(1).trimmed(); const QString arg1=m1arg.captured(2).trimmed(); #else - if (rx1arg.indexIn(slt[i])>=0) { + if (rx1arg.indexIn(p)>=0) { const QString instr=rx1arg.cap(1).trimmed(); const QString arg1=rx1arg.cap(2).trimmed(); #endif diff --git a/screenshots/parsedfunctionplot.png b/screenshots/parsedfunctionplot.png index 4d28d5352a..4ab500ef9e 100644 Binary files a/screenshots/parsedfunctionplot.png and b/screenshots/parsedfunctionplot.png differ diff --git a/screenshots/parsedfunctionplot_small.png b/screenshots/parsedfunctionplot_small.png index b324e66f2c..2cc88637fe 100644 Binary files a/screenshots/parsedfunctionplot_small.png and b/screenshots/parsedfunctionplot_small.png differ