mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
themeeditor: Get rid of another pile of deprecation warnings
Change-Id: Ifc6274d7f2f0de85db7b652f479ba7f9b7ef86bb
This commit is contained in:
parent
a565734e47
commit
c24862ab64
5 changed files with 17 additions and 18 deletions
|
@ -27,7 +27,6 @@
|
|||
#include "newprojectdialog.h"
|
||||
#include "projectexporter.h"
|
||||
|
||||
#include <QDesktopWidget>
|
||||
#include <QFileSystemModel>
|
||||
#include <QSettings>
|
||||
#include <QFileDialog>
|
||||
|
|
|
@ -50,7 +50,7 @@ SyntaxCompleter::SyntaxCompleter(CodeEditor *parent) :
|
|||
QStringList tag;
|
||||
tag.append(split[0].trimmed());
|
||||
tag.append(split[1].trimmed());
|
||||
tags.insertMulti(split[0].trimmed().toLower(), tag);
|
||||
tags.insert(split[0].trimmed().toLower(), tag);
|
||||
}
|
||||
|
||||
filter("");
|
||||
|
|
|
@ -38,7 +38,7 @@ signals:
|
|||
public slots:
|
||||
|
||||
private:
|
||||
QMap<QString, QStringList> tags;
|
||||
QMultiMap<QString, QStringList> tags;
|
||||
QStringList keys;
|
||||
|
||||
};
|
||||
|
|
|
@ -46,7 +46,7 @@ TargetData::TargetData()
|
|||
|
||||
int cursor = 0;
|
||||
int index = 0;
|
||||
while(cursor < data.count())
|
||||
while(cursor < data.length())
|
||||
{
|
||||
QString id = scanString(data, cursor);
|
||||
QString name = "";
|
||||
|
@ -64,7 +64,7 @@ TargetData::TargetData()
|
|||
break;
|
||||
|
||||
/* Now we have to parse each of the arguments */
|
||||
while(cursor < data.count())
|
||||
while(cursor < data.length())
|
||||
{
|
||||
QString key = scanString(data, cursor);
|
||||
if(key == "")
|
||||
|
@ -159,7 +159,7 @@ QString TargetData::scanString(QString data, int &index)
|
|||
QString retval;
|
||||
|
||||
/* Skipping whitespace and comments */
|
||||
while(index < data.count() && (data[index].isSpace() || data[index] == '#'))
|
||||
while(index < data.length() && (data[index].isSpace() || data[index] == '#'))
|
||||
{
|
||||
if(data[index] == '#')
|
||||
skipComment(data, index);
|
||||
|
@ -167,7 +167,7 @@ QString TargetData::scanString(QString data, int &index)
|
|||
index++;
|
||||
}
|
||||
|
||||
while(index < data.count() && !reserved.contains(data[index]))
|
||||
while(index < data.length() && !reserved.contains(data[index]))
|
||||
{
|
||||
if(data[index] == '%')
|
||||
{
|
||||
|
@ -187,7 +187,7 @@ QString TargetData::scanString(QString data, int &index)
|
|||
int TargetData::scanInt(QString data, int &index)
|
||||
{
|
||||
/* Skipping whitespace and comments */
|
||||
while(index < data.count() && (data[index].isSpace() || data[index] == '#'))
|
||||
while(index < data.length() && (data[index].isSpace() || data[index] == '#'))
|
||||
{
|
||||
if(data[index] == '#')
|
||||
skipComment(data, index);
|
||||
|
@ -196,7 +196,7 @@ int TargetData::scanInt(QString data, int &index)
|
|||
}
|
||||
|
||||
QString number;
|
||||
while(index < data.count() && data[index].isDigit())
|
||||
while(index < data.length() && data[index].isDigit())
|
||||
number.append(data[index++]);
|
||||
|
||||
return number.toInt();
|
||||
|
@ -221,17 +221,17 @@ void TargetData::skipComment(QString data, int &index)
|
|||
if(data[index] != '#')
|
||||
return;
|
||||
|
||||
while(index < data.count() && data[index] != '\n')
|
||||
while(index < data.length() && data[index] != '\n')
|
||||
index++;
|
||||
|
||||
if(index < data.count())
|
||||
if(index < data.length())
|
||||
index++;
|
||||
}
|
||||
|
||||
bool TargetData::require(QChar required, QString data, int &index)
|
||||
{
|
||||
/* Skipping whitespace and comments */
|
||||
while(index < data.count() && (data[index].isSpace() || data[index] == '#'))
|
||||
while(index < data.length() && (data[index].isSpace() || data[index] == '#'))
|
||||
{
|
||||
if(data[index] == '#')
|
||||
skipComment(data, index);
|
||||
|
@ -239,7 +239,7 @@ bool TargetData::require(QChar required, QString data, int &index)
|
|||
index++;
|
||||
}
|
||||
|
||||
if(index == data.count())
|
||||
if(index == data.length())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <QtGui>
|
||||
#include <QTextEdit>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
#include <QSettings>
|
||||
|
||||
#include "varianteditor.h"
|
||||
|
@ -96,8 +96,8 @@ void FindReplaceForm::validateRegExp(const QString &text) {
|
|||
return; // nothing to validate
|
||||
}
|
||||
|
||||
QRegExp reg(text,
|
||||
(ui->caseCheckBox->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive));
|
||||
QRegularExpression reg(text,
|
||||
(ui->caseCheckBox->isChecked() ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption));
|
||||
|
||||
if (reg.isValid()) {
|
||||
showError("");
|
||||
|
@ -151,8 +151,8 @@ void FindReplaceForm::find(bool next) {
|
|||
flags |= QTextDocument::FindWholeWords;
|
||||
|
||||
if (ui->regexCheckBox->isChecked()) {
|
||||
QRegExp reg(toSearch,
|
||||
(ui->caseCheckBox->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive));
|
||||
QRegularExpression reg(toSearch,
|
||||
(ui->caseCheckBox->isChecked() ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption));
|
||||
|
||||
qDebug() << "searching for regexp: " << reg.pattern();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue