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 "newprojectdialog.h"
|
||||||
#include "projectexporter.h"
|
#include "projectexporter.h"
|
||||||
|
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <QFileSystemModel>
|
#include <QFileSystemModel>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
|
|
@ -50,7 +50,7 @@ SyntaxCompleter::SyntaxCompleter(CodeEditor *parent) :
|
||||||
QStringList tag;
|
QStringList tag;
|
||||||
tag.append(split[0].trimmed());
|
tag.append(split[0].trimmed());
|
||||||
tag.append(split[1].trimmed());
|
tag.append(split[1].trimmed());
|
||||||
tags.insertMulti(split[0].trimmed().toLower(), tag);
|
tags.insert(split[0].trimmed().toLower(), tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
filter("");
|
filter("");
|
||||||
|
|
|
@ -38,7 +38,7 @@ signals:
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QMap<QString, QStringList> tags;
|
QMultiMap<QString, QStringList> tags;
|
||||||
QStringList keys;
|
QStringList keys;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,7 +46,7 @@ TargetData::TargetData()
|
||||||
|
|
||||||
int cursor = 0;
|
int cursor = 0;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
while(cursor < data.count())
|
while(cursor < data.length())
|
||||||
{
|
{
|
||||||
QString id = scanString(data, cursor);
|
QString id = scanString(data, cursor);
|
||||||
QString name = "";
|
QString name = "";
|
||||||
|
@ -64,7 +64,7 @@ TargetData::TargetData()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Now we have to parse each of the arguments */
|
/* Now we have to parse each of the arguments */
|
||||||
while(cursor < data.count())
|
while(cursor < data.length())
|
||||||
{
|
{
|
||||||
QString key = scanString(data, cursor);
|
QString key = scanString(data, cursor);
|
||||||
if(key == "")
|
if(key == "")
|
||||||
|
@ -159,7 +159,7 @@ QString TargetData::scanString(QString data, int &index)
|
||||||
QString retval;
|
QString retval;
|
||||||
|
|
||||||
/* Skipping whitespace and comments */
|
/* 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] == '#')
|
if(data[index] == '#')
|
||||||
skipComment(data, index);
|
skipComment(data, index);
|
||||||
|
@ -167,7 +167,7 @@ QString TargetData::scanString(QString data, int &index)
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
while(index < data.count() && !reserved.contains(data[index]))
|
while(index < data.length() && !reserved.contains(data[index]))
|
||||||
{
|
{
|
||||||
if(data[index] == '%')
|
if(data[index] == '%')
|
||||||
{
|
{
|
||||||
|
@ -187,7 +187,7 @@ QString TargetData::scanString(QString data, int &index)
|
||||||
int TargetData::scanInt(QString data, int &index)
|
int TargetData::scanInt(QString data, int &index)
|
||||||
{
|
{
|
||||||
/* Skipping whitespace and comments */
|
/* 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] == '#')
|
if(data[index] == '#')
|
||||||
skipComment(data, index);
|
skipComment(data, index);
|
||||||
|
@ -196,7 +196,7 @@ int TargetData::scanInt(QString data, int &index)
|
||||||
}
|
}
|
||||||
|
|
||||||
QString number;
|
QString number;
|
||||||
while(index < data.count() && data[index].isDigit())
|
while(index < data.length() && data[index].isDigit())
|
||||||
number.append(data[index++]);
|
number.append(data[index++]);
|
||||||
|
|
||||||
return number.toInt();
|
return number.toInt();
|
||||||
|
@ -221,17 +221,17 @@ void TargetData::skipComment(QString data, int &index)
|
||||||
if(data[index] != '#')
|
if(data[index] != '#')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while(index < data.count() && data[index] != '\n')
|
while(index < data.length() && data[index] != '\n')
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if(index < data.count())
|
if(index < data.length())
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TargetData::require(QChar required, QString data, int &index)
|
bool TargetData::require(QChar required, QString data, int &index)
|
||||||
{
|
{
|
||||||
/* Skipping whitespace and comments */
|
/* 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] == '#')
|
if(data[index] == '#')
|
||||||
skipComment(data, index);
|
skipComment(data, index);
|
||||||
|
@ -239,7 +239,7 @@ bool TargetData::require(QChar required, QString data, int &index)
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(index == data.count())
|
if(index == data.length())
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
#include <QRegExp>
|
#include <QRegularExpression>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
#include "varianteditor.h"
|
#include "varianteditor.h"
|
||||||
|
@ -96,8 +96,8 @@ void FindReplaceForm::validateRegExp(const QString &text) {
|
||||||
return; // nothing to validate
|
return; // nothing to validate
|
||||||
}
|
}
|
||||||
|
|
||||||
QRegExp reg(text,
|
QRegularExpression reg(text,
|
||||||
(ui->caseCheckBox->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive));
|
(ui->caseCheckBox->isChecked() ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption));
|
||||||
|
|
||||||
if (reg.isValid()) {
|
if (reg.isValid()) {
|
||||||
showError("");
|
showError("");
|
||||||
|
@ -151,8 +151,8 @@ void FindReplaceForm::find(bool next) {
|
||||||
flags |= QTextDocument::FindWholeWords;
|
flags |= QTextDocument::FindWholeWords;
|
||||||
|
|
||||||
if (ui->regexCheckBox->isChecked()) {
|
if (ui->regexCheckBox->isChecked()) {
|
||||||
QRegExp reg(toSearch,
|
QRegularExpression reg(toSearch,
|
||||||
(ui->caseCheckBox->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive));
|
(ui->caseCheckBox->isChecked() ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption));
|
||||||
|
|
||||||
qDebug() << "searching for regexp: " << reg.pattern();
|
qDebug() << "searching for regexp: " << reg.pattern();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue