mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-11-15 18:15:52 +08:00
Add-qt5.12.12-compatibility (#127)
add qt5.12.12 compatibility QList::swapItemsAt was introduced in Qt 5.13. and more ,,, thanks to https://github.com/Social-Mean
This commit is contained in:
parent
6482ff7a49
commit
be48ed84ba
@ -44,7 +44,7 @@ protected:
|
|||||||
inline Data(const std::function<void(void)>& f_):
|
inline Data(const std::function<void(void)>& f_):
|
||||||
type(FunctorType), f(f_), plotf(), p(nullptr)
|
type(FunctorType), f(f_), plotf(), p(nullptr)
|
||||||
{}
|
{}
|
||||||
inline Data(JKQTPlotter* p_):
|
inline Data(JKQTPlotter* p_=nullptr):
|
||||||
type(PlotterType), f(), plotf(), p(p_)
|
type(PlotterType), f(), plotf(), p(p_)
|
||||||
{}
|
{}
|
||||||
inline Data(std::function<JKQTPlotter*(void)> p_):
|
inline Data(std::function<JKQTPlotter*(void)> p_):
|
||||||
|
@ -664,7 +664,10 @@ JKQTCOMMON_LIB_EXPORT void jkqtp_estimateFraction(double input, int &sign, uint6
|
|||||||
*/
|
*/
|
||||||
template <class T>
|
template <class T>
|
||||||
inline T jkqtp_reversed(const T& l) {
|
inline T jkqtp_reversed(const T& l) {
|
||||||
return T(l.rbegin(), l.rend());
|
T reversed_l;
|
||||||
|
reversed_l.reserve(l.size());
|
||||||
|
std::reverse_copy(l.begin(), l.end(), std::back_inserter(reversed_l));
|
||||||
|
return reversed_l;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief can be used to build a hash-values from several hash-values
|
/*! \brief can be used to build a hash-values from several hash-values
|
||||||
|
@ -534,7 +534,7 @@ void doListStyles(const QDir& outputDir, const QStringList& doctomodify, int ico
|
|||||||
shtml<<"<table>\n <tr>\n <th>Style-file\n <th>Screenshot\n <th>Symbols\n";
|
shtml<<"<table>\n <tr>\n <th>Style-file\n <th>Screenshot\n <th>Symbols\n";
|
||||||
auto files=dir.entryList();
|
auto files=dir.entryList();
|
||||||
if (files.indexOf("default.ini")>=0) {
|
if (files.indexOf("default.ini")>=0) {
|
||||||
files.swapItemsAt(0,files.indexOf("default.ini"));
|
qSwap(files[0], files[files.indexOf("default.ini")]);
|
||||||
}
|
}
|
||||||
for (auto& f: files) {
|
for (auto& f: files) {
|
||||||
qDebug()<<"plotting example for style "<<f;
|
qDebug()<<"plotting example for style "<<f;
|
||||||
|
Loading…
Reference in New Issue
Block a user