diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-12-04 15:45:36 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-12-04 15:45:36 -0500 |
commit | c24862ab6432896d772a0c5fc155035929915c6f (patch) | |
tree | 7a11606ad0b3cf9b07d278f08da26f7ac1169230 | |
parent | a565734e478aa5952cfb83db5c9fdfdc97979960 (diff) | |
download | rockbox-c24862ab64.tar.gz rockbox-c24862ab64.zip |
themeeditor: Get rid of another pile of deprecation warnings
Change-Id: Ifc6274d7f2f0de85db7b652f479ba7f9b7ef86bb
-rw-r--r-- | utils/themeeditor/gui/editorwindow.cpp | 1 | ||||
-rw-r--r-- | utils/themeeditor/gui/syntaxcompleter.cpp | 2 | ||||
-rw-r--r-- | utils/themeeditor/gui/syntaxcompleter.h | 2 | ||||
-rw-r--r-- | utils/themeeditor/models/targetdata.cpp | 20 | ||||
-rw-r--r-- | utils/themeeditor/qtfindreplacedialog/findreplaceform.cpp | 10 |
5 files changed, 17 insertions, 18 deletions
diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp index 89c9d670aa..10dc4067df 100644 --- a/utils/themeeditor/gui/editorwindow.cpp +++ b/utils/themeeditor/gui/editorwindow.cpp @@ -27,7 +27,6 @@ #include "newprojectdialog.h" #include "projectexporter.h" -#include <QDesktopWidget> #include <QFileSystemModel> #include <QSettings> #include <QFileDialog> diff --git a/utils/themeeditor/gui/syntaxcompleter.cpp b/utils/themeeditor/gui/syntaxcompleter.cpp index 8baace46b1..7019c457c6 100644 --- a/utils/themeeditor/gui/syntaxcompleter.cpp +++ b/utils/themeeditor/gui/syntaxcompleter.cpp @@ -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(""); diff --git a/utils/themeeditor/gui/syntaxcompleter.h b/utils/themeeditor/gui/syntaxcompleter.h index 99a1c77c37..7baa66f634 100644 --- a/utils/themeeditor/gui/syntaxcompleter.h +++ b/utils/themeeditor/gui/syntaxcompleter.h @@ -38,7 +38,7 @@ signals: public slots: private: - QMap<QString, QStringList> tags; + QMultiMap<QString, QStringList> tags; QStringList keys; }; diff --git a/utils/themeeditor/models/targetdata.cpp b/utils/themeeditor/models/targetdata.cpp index b44f1e67b3..59ec5fccb2 100644 --- a/utils/themeeditor/models/targetdata.cpp +++ b/utils/themeeditor/models/targetdata.cpp @@ -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; } diff --git a/utils/themeeditor/qtfindreplacedialog/findreplaceform.cpp b/utils/themeeditor/qtfindreplacedialog/findreplaceform.cpp index 2859e92faa..9164da52a2 100644 --- a/utils/themeeditor/qtfindreplacedialog/findreplaceform.cpp +++ b/utils/themeeditor/qtfindreplacedialog/findreplaceform.cpp @@ -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(); |