Commit 11af5b30 authored by Kåre Särs's avatar Kåre Särs
Browse files

Fix compilation on Kubuntu 20.04

-QLatin1String gained .arg() function in Qt 5.14 (> required 5.10)
-Qt::SkipEmptyParts was introduced in Qt 5.15
-QList != QVector in Qt < 5.15 ?
-Mistakenly removed const variable used inside KF5 5.69 version check
-QActionGroup::setExclusionPolicy() was introduced in Qt 5.14 and the
 enum QActionGroup::ExclusionPolicy::Exclusive is default policy
parent a4136d7a
......@@ -107,7 +107,7 @@ void ColorPickerInlineNoteProvider::updateColorMatchingCriteria()
if (config.readEntry("NamedColors", true)) {
if (!colorRegex.isEmpty()) {
colorRegex = QLatin1String("(%1)|").arg(colorRegex);
colorRegex = QStringLiteral("(%1)|").arg(colorRegex);
}
QHash <int, QStringList> colorsByLength;
......@@ -130,7 +130,7 @@ void ColorPickerInlineNoteProvider::updateColorMatchingCriteria()
colorNames.append(colorsByLength[length]);
}
colorRegex.append(QLatin1String("(?<![-\\w])(%1)(?![-\\w])").arg(colorNames.join(QLatin1String("|"))));
colorRegex.append(QStringLiteral("(?<![-\\w])(%1)(?![-\\w])").arg(colorNames.join(QLatin1String("|"))));
}
if (colorRegex.isEmpty()) {
......
......@@ -50,7 +50,12 @@ public:
public Q_SLOTS:
void setFilterText(const QString& text)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
m_filterStrings = text.split(QLatin1Char(' '), QString::SkipEmptyParts);
#else
m_filterStrings = text.split(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
invalidateFilter();
}
......@@ -116,7 +121,11 @@ public:
public Q_SLOTS:
void setFilterStrings(const QString& text)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
m_filterStrings = text.split(QLatin1Char(' '), QString::SkipEmptyParts);
#else
m_filterStrings = text.split(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
}
private:
......
......@@ -9,7 +9,7 @@
#ifndef TAGS_H
#define TAGS_H
#include <QList>
#include <QVector>
#include <QString>
#include <QStringList>
......
......@@ -876,6 +876,9 @@ public:
}
// add match mark for range
#if KTEXTEDITOR_VERSION < QT_VERSION_CHECK(5, 69, 0)
const int ps = 32;
#endif
bool handleClick = true;
enabled = m_diagnostics && m_diagnostics->isChecked() && m_diagnosticsMark && m_diagnosticsMark->isChecked();
switch (markType) {
......
......@@ -64,7 +64,6 @@ void QuickOpenLineEdit::setupMenu()
menu->addSeparator();
QActionGroup *actGp = new QActionGroup(this);
actGp->setExclusionPolicy(QActionGroup::ExclusionPolicy::Exclusive);
auto act = menu->addAction(i18n("All Projects"));
act->setCheckable(true);
......
Markdown is supported
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