Commit 2b184008 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some compile error against qt6

parent fb6550f8
Pipeline #203479 passed with stage
in 4 minutes and 23 seconds
......@@ -44,7 +44,7 @@ EquationEditorWidget::EquationEditorWidget(QWidget *parent)
}
connect(constantsButton, &QPushButton::clicked, this, &EquationEditorWidget::editConstants);
connect(functionList, QOverload<const QString &>::of(&QComboBox::activated), this, &EquationEditorWidget::insertFunction);
connect(functionList, &QComboBox::textActivated, this, &EquationEditorWidget::insertFunction);
connect(constantList, QOverload<int>::of(&QComboBox::activated), this, &EquationEditorWidget::insertConstant);
QStringList functions = XParser::self()->predefinedFunctions(false);
......
......@@ -328,7 +328,7 @@ void Equation::updateVariables()
int p1 = m_fstr.indexOf('(');
int p2 = m_fstr.indexOf(')');
const QStringList listSplit = ((p1 != -1) && (p2 != -1)) ? m_fstr.mid(p1 + 1, p2 - p1 - 1).split(',', QString::SkipEmptyParts) : QStringList();
const QStringList listSplit = ((p1 != -1) && (p2 != -1)) ? m_fstr.mid(p1 + 1, p2 - p1 - 1).split(',', Qt::SkipEmptyParts) : QStringList();
// Variables shouldn't contain spaces!
for (QString s : listSplit) {
......
......@@ -36,13 +36,7 @@
static QUrl urlFromArg(const QString &arg)
{
#if QT_VERSION >= 0x050400
return QUrl::fromUserInput(arg, QDir::currentPath(), QUrl::AssumeLocalFile);
#else
// Logic from QUrl::fromUserInput(QString, QString, UserInputResolutionOptions)
return (QUrl(arg, QUrl::TolerantMode).isRelative() && !QDir::isAbsolutePath(arg)) ? QUrl::fromLocalFile(QDir::current().absoluteFilePath(arg))
: QUrl::fromUserInput(arg);
#endif
}
KmPlot::KmPlot(const QCommandLineParser &parser)
......
......@@ -26,12 +26,13 @@
int main(int argc, char **argv)
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
/**
* enable high dpi support
*/
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
#endif
QApplication qapp(argc, argv);
KCrash::initialize();
......
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