mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: SkipEmptyParts syntax has changed
Sadly, the new enum has only been available since Qt 5.14, so this is a rather ugly replacement. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f8f83a9986
commit
ffecc00f42
6 changed files with 44 additions and 8 deletions
|
@ -39,6 +39,12 @@ void TagWidget::setCompleter(QCompleter *completer)
|
|||
connect(m_completer, SIGNAL(highlighted(QString)), this, SLOT(completionHighlighted(QString)));
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
#define SKIP_EMPTY Qt::SkipEmptyParts
|
||||
#else
|
||||
#define SKIP_EMPTY QString::SkipEmptyParts
|
||||
#endif
|
||||
|
||||
QPair<int, int> TagWidget::getCursorTagPosition()
|
||||
{
|
||||
int i = 0, start = 0, end = 0;
|
||||
|
@ -71,7 +77,7 @@ void TagWidget::highlight()
|
|||
{
|
||||
removeAllBlocks();
|
||||
int lastPos = 0;
|
||||
const auto l = text().split(QChar(','), QString::SkipEmptyParts);
|
||||
const auto l = text().split(QChar(','), SKIP_EMPTY);
|
||||
for (const QString &s: l) {
|
||||
QString trimmed = s.trimmed();
|
||||
if (trimmed.isEmpty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue