Commit 2953f7d7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix other compile error against qt6

parent 23560f8a
......@@ -60,9 +60,17 @@ int main(int argc, char** argv)
qDebug() << "Intervals should be specified as x=b..c";
}
bool ok;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
double from = interval.midRef(equalIdx+1, dotdotIdx-equalIdx).toDouble(&ok);
#else
double from = QStringView(interval).mid(equalIdx+1, dotdotIdx-equalIdx).toDouble(&ok);
#endif
Q_ASSERT(ok);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
double to = interval.midRef(dotdotIdx+2).toDouble(&ok);
#else
double to = QStringView(interval).mid(dotdotIdx+2).toDouble(&ok);
#endif
Q_ASSERT(ok);
intervals[interval.left(equalIdx)] = qMakePair<double, double>(from, to);
}
......
......@@ -19,7 +19,6 @@
#include "analitzawrapper.h"
#include <analitza/analyzer.h>
#include <analitza/value.h>
#include <analitza/variables.h>
#include <analitza/analitzautils.h>
#include <analitzagui/variablesmodel.h>
......
......@@ -23,10 +23,10 @@
#include <QObject>
#include <QVariant>
#include <analitza/expression.h>
#include <analitza/variables.h>
namespace Analitza {
class Analyzer;
class Variables;
}
class ExpressionWrapper : public QObject
......
......@@ -107,7 +107,7 @@ QStringList Graph2DMobile::addFunction(const QString& expression, const QSharedP
void Graph2DMobile::setTicksShownAtAll(bool shown)
{
Qt::Orientations show = shown ? Qt::Vertical|Qt::Horizontal : Qt::Orientations(nullptr);
Qt::Orientations show = shown ? Qt::Vertical|Qt::Horizontal : Qt::Orientations{};
setShowTicks(show);
setShowTickLabels(show);
}
......
......@@ -23,6 +23,7 @@
#include <QtQuick/QQuickPaintedItem>
#include <analitzaplot/plotter2d.h>
#include <QPixmap>
#include <QAbstractItemModel>
namespace Analitza {
class Variables;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment