WSL/SLF GitLab Repository

Commit 7889235f authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Fixing deprecation warnings by QT5.15 (paving the way for Qt6)

parent c063dfb7
......@@ -77,9 +77,9 @@ Error::Error(const QString &message, const QString &infotext, const QString &det
if (level == error::fatal) { //currently not used
QString msg;
QTextStream ss(&msg);
ss << QMessageBox::tr("Aborted after fatal error:") << endl;
ss << message << endl;
ss << infotext << endl << details;
ss << QMessageBox::tr("Aborted after fatal error:") << Qt::endl;
ss << message << Qt::endl;
ss << infotext << Qt::endl << details;
throw std::runtime_error(msg.toStdString());
//TODO: autosave log if this level is ever actually used
}
......
......@@ -35,6 +35,15 @@
#include <QStringList>
#include <QtXml>
#include <QtXmlPatterns/QAbstractMessageHandler>
#include <QtGlobal>
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
namespace Qt
{
static auto endl = ::endl;
static auto SkipEmptyParts = QString::SkipEmptyParts;
}
#endif
namespace html {
......
......@@ -238,7 +238,7 @@ inline void perform_cmd_ini_operations(const QCommandLineParser &parser, const c
const QStringList mod_ini_list( pos.split("=") );
if (mod_ini_list.size() == 2) {
const QStringList param_list(mod_ini_list.at(0).trimmed().split(
Cst::sep, QString::SkipEmptyParts));
Cst::sep, Qt::SkipEmptyParts));
if (param_list.size() == 2) //silently skip wrong formats
cmd_ini.set(param_list.at(0), param_list.at(1),
mod_ini_list.at(1).trimmed());
......
......@@ -213,7 +213,7 @@ void Checklist::onPropertySet()
const QString values( this->property("ini_value").toString() );
if (ini_value_ == values)
return;
const QStringList value_list( values.split(QRegExp("\\s+"), QString::SkipEmptyParts) );
const QStringList value_list( values.split(QRegExp("\\s+"), Qt::SkipEmptyParts) );
/* clear the list, overwriting current settings */
for (int ii = 0; ii < list_->count(); ++ii) {
......
......@@ -203,7 +203,7 @@ void Choice::onPropertySet()
const QString values( this->property("ini_value").toString() );
if (ini_value_ == values)
return;
const QStringList value_list( values.split(QRegExp("\\s+"), QString::SkipEmptyParts) );
const QStringList value_list( values.split(QRegExp("\\s+"), Qt::SkipEmptyParts) );
if (checkbox_container_->count() == 1) {
topLog(QString(tr(R"(XML error: No checkable options set for Choice panel "%1::%2".)").arg(
......
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