aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucie GĂ©rard <lucie.gerard@qt.io>2021-08-13 15:59:59 +0200
committerSergio Martins <smartins@kde.org>2021-08-21 22:56:04 +0000
commit62d3ade966f27016d96800dd39836971393ac4c5 (patch)
tree9e2a66b6015fedcc57c17d7f2e85d3a1c2550065
parentd9b44927e61f0ecf239ed0374860962b3328cb58 (diff)
Fix bug 439337
Add support for macro for QDir and QVariant operator fixes
-rw-r--r--src/checks/manuallevel/qt6-deprecated-api-fixes.cpp156
-rw-r--r--src/checks/manuallevel/qt6-deprecated-api-fixes.h5
-rw-r--r--tests/qt6-deprecated-api-fixes/main.cpp32
-rw-r--r--tests/qt6-deprecated-api-fixes/main.cpp.expected221
-rw-r--r--tests/qt6-deprecated-api-fixes/main.cpp.fixed.expected38
5 files changed, 223 insertions, 229 deletions
diff --git a/src/checks/manuallevel/qt6-deprecated-api-fixes.cpp b/src/checks/manuallevel/qt6-deprecated-api-fixes.cpp
index a890476b..1cbd69e7 100644
--- a/src/checks/manuallevel/qt6-deprecated-api-fixes.cpp
+++ b/src/checks/manuallevel/qt6-deprecated-api-fixes.cpp
@@ -53,79 +53,6 @@ Qt6DeprecatedAPIFixes::Qt6DeprecatedAPIFixes(const std::string &name, ClazyConte
enablePreProcessorCallbacks();
}
-std::string Qt6DeprecatedAPIFixes::findPathArgument(clang::Stmt *stmt, bool ancestorIsCondition, int ancestorConditionChildNumber)
-{
- std::string replacement;
- Stmt *current_stmt = stmt;
-
- int i = 0;
-
- for (auto it = current_stmt->child_begin(); it != current_stmt->child_end() ; it++) {
-
- Stmt *child = *it;
- auto parent_condOp = dyn_cast<ConditionalOperator>(current_stmt);
- auto child_condOp = dyn_cast<ConditionalOperator>(child);
-
- /*
- For cases like: dir = cond ? "path1" : "path2";
- simplified AST after the operand= look like this:
- CXXBindTemporaryExpr
- | `-CXXConstructExpr
- | `-ConditionalOperator.......................... The ancestor that is a conditional operator
- | |-ImplicitCastExpr 'bool'........................ ancestorConditionChildNumber == 0
- | | `-DeclRefExpr 'cond' 'bool'
- | |-ImplicitCastExpr 'const char *'................ ancestorConditionChildNumber == 1
- | | `-StringLiteral 'const char []' "path1" => Need to know it has ConditionalOperator has ancestor
- | | => Need to know it comes from the second children of this ancestor
- | | => to put the ':' between the two StringLiteral
- | `-ImplicitCastExpr 'const char *'................ ancestorConditionChildNumber == 2
- | `-StringLiteral 'const char []' "path2"
-
- */
- if (parent_condOp) {
- ancestorIsCondition = true;
- ancestorConditionChildNumber = i;
- if (ancestorConditionChildNumber == 2)
- replacement += ":";
- }
-
- // to handle nested condition
- if (child_condOp && ancestorIsCondition) {
- replacement += "(";
- }
-
- replacement += findPathArgument(child, ancestorIsCondition, ancestorConditionChildNumber);
-
- DeclRefExpr *child_declRefExp = dyn_cast<DeclRefExpr>(child);
- CXXBoolLiteralExpr *child_boolLitExp = dyn_cast<CXXBoolLiteralExpr>(child);
- StringLiteral *child_stringliteral = dyn_cast<StringLiteral>(child);
-
- if (child_stringliteral) {
- replacement += "\"";
- replacement += child_stringliteral->getString();
- replacement += "\"";
- } else if (child_boolLitExp) {
- replacement = child_boolLitExp->getValue() ? "true" : "false";
- replacement += " ? ";
- } else if (child_declRefExp) {
- if (ancestorIsCondition && ancestorConditionChildNumber == 0
- && child_declRefExp->getType().getAsString() == "_Bool") {
- replacement += child_declRefExp->getNameInfo().getAsString();
- replacement += " ? ";
- } else {
- //assuming that the variable is compatible with setPath function.
- // if the code was compiling with dir = variable, should be ok to write dir.setPath(variable)
- replacement += child_declRefExp->getNameInfo().getAsString();
- }
- } else if (child_condOp && ancestorIsCondition) {
- replacement += ")";
- }
-
- i++;
- }
- return replacement;
-}
-
void replacementForQWizard(string functionName, string &message, string &replacement) {
message = "call function QProcess::";
message += functionName;
@@ -458,31 +385,26 @@ void Qt6DeprecatedAPIFixes::VisitDecl(clang::Decl *decl)
return;
}
-string Qt6DeprecatedAPIFixes::buildReplacementforQDir(Stmt* stmt, DeclRefExpr* declb)
+string Qt6DeprecatedAPIFixes::buildReplacementforQDir(DeclRefExpr *decl_operator, bool isPointer, string replacement, string replacement_var2)
{
- string replacement = declb->getNameInfo().getAsString();
- QualType qualtype = declb->getType();
- if (qualtype->isPointerType())
+ if (isPointer)
replacement += "->";
else
replacement += ".";
replacement += "setPath(";
- replacement += findPathArgument(clazy::childAt(stmt, 2));
+ replacement += replacement_var2;
replacement += ")";
return replacement;
}
-string Qt6DeprecatedAPIFixes::buildReplacementForQVariant(Stmt* stmt, DeclRefExpr* decl, DeclRefExpr* declb)
+string Qt6DeprecatedAPIFixes::buildReplacementForQVariant(DeclRefExpr* decl_operator, string replacement_var1, string replacement_var2)
{
string replacement = "QVariant::compare(";
- QualType qualtype = declb->getType();
- if (qualtype->isPointerType())
- replacement += "*";
- replacement += declb->getNameInfo().getAsString();
+ replacement += replacement_var1;
replacement += ", ";
- replacement += findPathArgument(clazy::childAt(stmt, 2));
+ replacement += replacement_var2;
replacement += ") ";
- replacement += decl->getNameInfo().getAsString().substr(8,2);
+ replacement += decl_operator->getNameInfo().getAsString().substr(8,2);
replacement += " 0" ;
return replacement;
}
@@ -533,37 +455,55 @@ void Qt6DeprecatedAPIFixes::fixForDeprecatedOperator(Stmt* stmt, string classNam
if (!foundOperator)
return;
- // get the name of the QDir variable from child2 value
- child = clazy::childAt(stmt, 1);
- DeclRefExpr *declb = nullptr;
- while (child) {
- declb = dyn_cast<DeclRefExpr>(child);
- if ( !declb ) {
- child = clazy::childAt(child, 0);
- continue;
- } else {
- break;
- }
- }
- if ( !declb )
- return;
+ // Getting the two arguments of the operator to build the replacement
+ CXXOperatorCallExpr *oppCallExpr = dyn_cast<CXXOperatorCallExpr>(stmt);
+ auto * arg0Size = oppCallExpr->getArg(0);
+ auto * arg1Size = oppCallExpr->getArg(1);
+ auto charRange = Lexer::getAsCharRange(arg0Size->getSourceRange(), m_sm, lo());
+ auto replacementVar1 = Lexer::getSourceText(charRange, m_sm, lo());
+ charRange = Lexer::getAsCharRange(arg1Size->getSourceRange(), m_sm, lo());
+ auto replacementVar2 = Lexer::getSourceText(charRange, m_sm, lo());
+
+ replacementVar1 = replacementVar1.rtrim(' ');
+ replacementVar2 = replacementVar2.ltrim(' ');
if (className == "QDir") {
message = " function setPath() has to be used in Qt6";
- // need to make sure there is no macro
- for (auto macro_pos : m_listingMacroExpand) {
- if (m_sm.isPointWithin(macro_pos, clazy::getLocStart(stmt), clazy::getLocEnd(stmt))) {
- emitWarning(warningLocation, message, fixits);
- return;
+ // Get the quality type of the operator first argument.
+ // qdir_var1 = var2 => qdir_var1->setPath(var2) or qdir_var1.setPath(var2)
+ // the qdir_var1 correspond to second child of the QDir operator
+ child = clazy::childAt(stmt, 1);
+ bool isPointer = false;
+ while (child) {
+ auto *castExpr = dyn_cast<ImplicitCastExpr>(child);
+ auto *parent = dyn_cast<ParenExpr>(child);
+ if (castExpr || parent) {
+ child = clazy::childAt(child, 0);
+ continue;
}
+ clang::UnaryOperator *uni = dyn_cast<UnaryOperator>(child);
+ if (uni) {
+ if (uni->getOpcodeStr(uni->getOpcode()).equals("*"))
+ isPointer = true;
+ }
+ break;
+ }
+ if (isPointer) {
+ while(replacementVar1.consume_front("("))
+ replacementVar1.consume_back(")");
+ replacementVar1.consume_front("*");
}
- replacement = buildReplacementforQDir(stmt, declb);
+ replacement = buildReplacementforQDir(decl, isPointer, replacementVar1.str(), replacementVar2.str());
} else if (className == "QVariant") {
- message = " operator does not exist in Qt6. Using QVariant::compare() instead";
- replacement = buildReplacementForQVariant(stmt, decl, declb);
+ message = " operator does not exist in Qt6. Using QVariant::compare() instead.";
+ replacement = buildReplacementForQVariant(decl, replacementVar1.str(), replacementVar2.str());
}
- fixitRange = stmt->getSourceRange();
+ // If a macro is present in the stmt range the spelling location is used
+ // This is producing a wrong fix. So we're forcing the use of expansion location
+ FullSourceLoc endLoc(stmt->getEndLoc(), m_sm);
+ SourceRange range(stmt->getBeginLoc(), endLoc.getExpansionLoc());
+ fixitRange = range;
fixits.push_back(FixItHint::CreateReplacement(fixitRange, replacement));
emitWarning(warningLocation, message, fixits);
diff --git a/src/checks/manuallevel/qt6-deprecated-api-fixes.h b/src/checks/manuallevel/qt6-deprecated-api-fixes.h
index d7f6ccdd..78419cde 100644
--- a/src/checks/manuallevel/qt6-deprecated-api-fixes.h
+++ b/src/checks/manuallevel/qt6-deprecated-api-fixes.h
@@ -56,11 +56,10 @@ public:
void VisitMacroExpands(const clang::Token &MacroNameTok, const clang::SourceRange &range, const clang::MacroInfo *) override;
private:
- std::string findPathArgument(clang::Stmt *stmt, bool ancesterIsCondition = false, int ancestorConditionChildNumber = 0);
std::vector<clang::SourceLocation> m_listingMacroExpand;
void fixForDeprecatedOperator(clang::Stmt* stmt, std::string className);
- std::string buildReplacementforQDir(clang::Stmt* stmt, clang::DeclRefExpr* declb);
- std::string buildReplacementForQVariant(clang::Stmt* stmt, clang::DeclRefExpr* decl, clang::DeclRefExpr* declb);
+ std::string buildReplacementforQDir(clang::DeclRefExpr *decl_operator, bool isPointer, string replacement, string replacement_var2);
+ std::string buildReplacementForQVariant(clang::DeclRefExpr* decl_operator, string replacement, string replacement_var2);
};
#endif
diff --git a/tests/qt6-deprecated-api-fixes/main.cpp b/tests/qt6-deprecated-api-fixes/main.cpp
index 1f75d84d..efc217e4 100644
--- a/tests/qt6-deprecated-api-fixes/main.cpp
+++ b/tests/qt6-deprecated-api-fixes/main.cpp
@@ -21,6 +21,14 @@
#include <QtWidgets/QStyle>
#include <QtWidgets/QTextBrowser>
#include <QtWidgets/QWizard>
+
+class my_Class
+{
+public:
+ QDir m_dir;
+ QDir *m_dir_bis;
+ QVariant m_variant;
+};
#define MYSTRING "myDirPath"
void test()
@@ -28,11 +36,23 @@ void test()
QDir dir;
dir = "myStuff";
+ QDir d;
+ QFileInfo fi;
+ d = fi.absolutePath();
+
+ my_Class test_class;
+ test_class.m_dir = "name";
+
+ my_Class* test_class_bis = new my_Class;
+ test_class_bis->m_dir = ("name");
+
+ *test_class.m_dir_bis = "name";
+
QDir dir2;
dir2 = MYSTRING;
QDir dir3;
- dir3 = "my" "Stuff";
+ dir3= "my" "Stuff";
QDir dir4;
char *pathName = "myStuff";
@@ -47,6 +67,7 @@ void test()
QDir *dir7 = new QDir("apath");
*dir7 = "adir";
+ ((*dir7)) = "adir";
QDir::addResourceSearchPath("somePath1");
dir6.addResourceSearchPath("somePath2");
@@ -158,10 +179,13 @@ void test()
QVariant var1;
QVariant *var3;
QVariant var2;
- bool bool1 = (var1 > var2);
- bool bool2 = (var1 >= var2);
- bool bool3 = (*var3 < var2);
+ bool bool1 = var1 > var2;
+ bool bool2 = (var1 >= (var2));
+ bool bool3 = ((*var3) < var2);
bool bool4 = (*var3 <= var2);
+ bool bool5 = (*var3 <= test_class.m_variant);
+ bool bool6 = (test_class_bis->m_variant <= test_class.m_variant);
+
}
diff --git a/tests/qt6-deprecated-api-fixes/main.cpp.expected b/tests/qt6-deprecated-api-fixes/main.cpp.expected
index a63eb3d5..69da52d7 100644
--- a/tests/qt6-deprecated-api-fixes/main.cpp.expected
+++ b/tests/qt6-deprecated-api-fixes/main.cpp.expected
@@ -1,107 +1,114 @@
-qt6-deprecated-api-fixes/main.cpp:38:22: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
-qt6-deprecated-api-fixes/main.cpp:29:9: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:32:10: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:35:10: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:39:10: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:43:10: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:46:10: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:49:11: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:51:5: warning: call function QDir::addResourceSearchPath(). Use function QDir::addSearchPath() with prefix instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:52:10: warning: call function QDir::addResourceSearchPath(). Use function QDir::addSearchPath() with prefix instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:55:7: warning: Use QMultiMap for maps storing multiple values with the same key. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:56:30: warning: Use QMultiMap for maps storing multiple values with the same key. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:57:30: warning: Use QMultiMap for maps storing multiple values with the same key. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:59:7: warning: Use QMultiMap for maps storing multiple values with the same key. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:62:8: warning: call function QProcess::start(). Use function QProcess::startCommand() instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:67:22: warning: call function QRessource::isCompressed(). Use function QProcess::compressionAlgorithm() instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:70:23: warning: call Qt::MatchRegExp. Use Qt::MatchRegularExpression instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:74:24: warning: call function QTextStream::endl. Use function Qt::endl instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:75:12: warning: call function QTextStream::hex. Use function Qt::hex instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:75:19: warning: call function QTextStream::endl. Use function Qt::endl instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:79:48: warning: Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:80:49: warning: Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:81:5: warning: Using QString::SplitBehavior. Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:81:39: warning: Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:86:5: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:87:12: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:88:12: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:89:12: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:90:12: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:92:13: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:93:13: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:94:13: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:95:13: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:98:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:99:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:100:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:101:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:105:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:106:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:107:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:108:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:114:12: warning: call function QSignalMapper::mapped(int). Use function QSignalMapper::mappedInt(int) instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:115:12: warning: call function QSignalMapper::mapped(int). Use function QSignalMapper::mappedInt(int) instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:116:12: warning: call function QSignalMapper::mapped(const QString &). Use function QSignalMapper::mappedString(const QString &) instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:117:12: warning: call function QSignalMapper::mapped(const QString &). Use function QSignalMapper::mappedString(const QString &) instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:118:12: warning: call function QSignalMapper::mapped(QWidget *). Use function QSignalMapper::mappedObject(QWidget *) instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:119:12: warning: call function QSignalMapper::mapped(QObject *). Use function QSignalMapper::mappedObject(QObject *) instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:124:5: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:125:13: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:126:13: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:127:13: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:128:13: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:130:14: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:131:14: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:132:14: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:133:14: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:136:8: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:137:8: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:138:8: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:139:8: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:141:5: warning: Using QLinkedList. Use std::list instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:143:5: warning: use QRandomGenerator instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:144:5: warning: use QRandomGenerator instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:147:14: warning: call QTimeLine::setCurveShape. Use QTimeLine::setEasingCurve instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:148:14: warning: call QTimeLine::curveShape. Use QTimeLine::easingCurve instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:153:47: warning: replacing with function omitting the calendar. Change manually and use QLocale if you want to keep the calendar. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:155:28: warning: deprecated constructor. Use QDate::startOfDay() instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:156:18: warning: deprecated constructor. Use QDate::startOfDay() instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:161:24: warning: operator does not exist in Qt6. Using QVariant::compare() instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:162:24: warning: operator does not exist in Qt6. Using QVariant::compare() instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:163:25: warning: operator does not exist in Qt6. Using QVariant::compare() instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:164:25: warning: operator does not exist in Qt6. Using QVariant::compare() instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:168:16: warning: Using QLinkedList. Use std::list instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:169:1: warning: Using QLinkedList. Use std::list instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:174:6: warning: Using QLinkedList. Use std::list instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:175:23: warning: Using QLinkedList. Use std::list instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:181:27: warning: call Qt::MatchRegExp. Use Qt::MatchRegularExpression instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:184:28: warning: call function QTextStream::endl. Use function Qt::endl instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:185:16: warning: call function QTextStream::hex. Use function Qt::hex instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:185:45: warning: call function QTextStream::endl. Use function Qt::endl instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:189:52: warning: Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:190:9: warning: Using QString::SplitBehavior. Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:190:43: warning: Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:198:12: warning: call function QProcess::visitedPages(). Use function QProcess::visitedIds() instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:201:17: warning: call function QButtonGroup::buttonClicked(int). Use function QButtonGroupidClicked instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:202:17: warning: call function QButtonGroup::buttonPressed(int). Use function QButtonGroupidPressed instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:203:17: warning: call function QButtonGroup::buttonReleased(int). Use function QButtonGroupidReleased instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:204:17: warning: call function QButtonGroup::buttonToggled(int, bool). Use function QButtonGroupidToggled instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:207:34: warning: Use QComboBox::SizeAdjustPolicy::AdjustToContents or AdjustToContentsOnFirstShow instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:209:14: warning: Use currentIndexChanged(int) instead, and get the text using itemText(index). [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:210:14: warning: Using QComboBox::activated(const QString &). Use textActiated() instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:211:14: warning: Using QComboBox::hilighted(const QString &). Use textHighlighted() instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:213:5: warning: Using QMacCocoaViewContainer. Use QWindow::fromWinId and QWidget::createWindowContainer instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:214:5: warning: Using QMacNativeWidget. Use QWidget::winId instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:217:34: warning: Use the constructor taking a QScreen * instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:223:13: warning: Using QTextBrowser::highlighted(const QString &). Use QTextBrowser::highlighted(const QUrl &) instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:228:22: warning: Use QComboBox::DockWidgetClosable|DockWidgetMovable|DockWidgetFloatable explicitly instead. [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:230:5: warning: Using QDirModel. Use QFileSystemModel instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:233:32: warning: Using QGraphicsView::matrix. Use transform() instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:234:15: warning: Using QGraphicsView::setMatrix(const QMatrix &). Use setTransform(const QTransform &) instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:235:15: warning: Using QGraphicsView::resetMatrix(). Use resetTransform() instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:238:24: warning: this enum has been removed in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:239:24: warning: this enum has been removed in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:240:24: warning: this enum has been removed in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:241:27: warning: this enum has been removed in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:245:17: warning: Using QMacCocoaViewContainer. Use QWindow::fromWinId and QWidget::createWindowContainer instead [-Wclazy-qt6-deprecated-api-fixes]
-qt6-deprecated-api-fixes/main.cpp:246:19: warning: Using QMacNativeWidget. Use QWidget::winId instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:58:22: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
+qt6-deprecated-api-fixes/main.cpp:37:9: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:41:7: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:44:22: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:47:27: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:49:27: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:52:10: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:55:9: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:59:10: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:63:10: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:66:10: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:69:11: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:70:15: warning: function setPath() has to be used in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:72:5: warning: call function QDir::addResourceSearchPath(). Use function QDir::addSearchPath() with prefix instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:73:10: warning: call function QDir::addResourceSearchPath(). Use function QDir::addSearchPath() with prefix instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:76:7: warning: Use QMultiMap for maps storing multiple values with the same key. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:77:30: warning: Use QMultiMap for maps storing multiple values with the same key. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:78:30: warning: Use QMultiMap for maps storing multiple values with the same key. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:80:7: warning: Use QMultiMap for maps storing multiple values with the same key. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:83:8: warning: call function QProcess::start(). Use function QProcess::startCommand() instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:88:22: warning: call function QRessource::isCompressed(). Use function QProcess::compressionAlgorithm() instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:91:23: warning: call Qt::MatchRegExp. Use Qt::MatchRegularExpression instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:95:24: warning: call function QTextStream::endl. Use function Qt::endl instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:96:12: warning: call function QTextStream::hex. Use function Qt::hex instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:96:19: warning: call function QTextStream::endl. Use function Qt::endl instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:100:48: warning: Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:101:49: warning: Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:102:5: warning: Using QString::SplitBehavior. Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:102:39: warning: Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:107:5: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:108:12: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:109:12: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:110:12: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:111:12: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:113:13: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:114:13: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:115:13: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:116:13: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:119:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:120:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:121:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:122:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:126:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:127:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:128:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:129:7: warning: QSet iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:135:12: warning: call function QSignalMapper::mapped(int). Use function QSignalMapper::mappedInt(int) instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:136:12: warning: call function QSignalMapper::mapped(int). Use function QSignalMapper::mappedInt(int) instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:137:12: warning: call function QSignalMapper::mapped(const QString &). Use function QSignalMapper::mappedString(const QString &) instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:138:12: warning: call function QSignalMapper::mapped(const QString &). Use function QSignalMapper::mappedString(const QString &) instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:139:12: warning: call function QSignalMapper::mapped(QWidget *). Use function QSignalMapper::mappedObject(QWidget *) instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:140:12: warning: call function QSignalMapper::mapped(QObject *). Use function QSignalMapper::mappedObject(QObject *) instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:145:5: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:146:13: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:147:13: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:148:13: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:149:13: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:151:14: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:152:14: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:153:14: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:154:14: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:157:8: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:158:8: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:159:8: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:160:8: warning: QHash iterator categories changed from bidirectional to forward. Please port your code manually [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:162:5: warning: Using QLinkedList. Use std::list instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:164:5: warning: use QRandomGenerator instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:165:5: warning: use QRandomGenerator instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:168:14: warning: call QTimeLine::setCurveShape. Use QTimeLine::setEasingCurve instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:169:14: warning: call QTimeLine::curveShape. Use QTimeLine::easingCurve instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:174:47: warning: replacing with function omitting the calendar. Change manually and use QLocale if you want to keep the calendar. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:176:28: warning: deprecated constructor. Use QDate::startOfDay() instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:177:18: warning: deprecated constructor. Use QDate::startOfDay() instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:182:23: warning: operator does not exist in Qt6. Using QVariant::compare() instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:183:24: warning: operator does not exist in Qt6. Using QVariant::compare() instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:184:27: warning: operator does not exist in Qt6. Using QVariant::compare() instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:185:25: warning: operator does not exist in Qt6. Using QVariant::compare() instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:186:25: warning: operator does not exist in Qt6. Using QVariant::compare() instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:187:45: warning: operator does not exist in Qt6. Using QVariant::compare() instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:192:16: warning: Using QLinkedList. Use std::list instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:193:1: warning: Using QLinkedList. Use std::list instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:198:6: warning: Using QLinkedList. Use std::list instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:199:23: warning: Using QLinkedList. Use std::list instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:205:27: warning: call Qt::MatchRegExp. Use Qt::MatchRegularExpression instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:208:28: warning: call function QTextStream::endl. Use function Qt::endl instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:209:16: warning: call function QTextStream::hex. Use function Qt::hex instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:209:45: warning: call function QTextStream::endl. Use function Qt::endl instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:213:52: warning: Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:214:9: warning: Using QString::SplitBehavior. Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:214:43: warning: Use Qt::SplitBehavior variant instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:222:12: warning: call function QProcess::visitedPages(). Use function QProcess::visitedIds() instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:225:17: warning: call function QButtonGroup::buttonClicked(int). Use function QButtonGroupidClicked instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:226:17: warning: call function QButtonGroup::buttonPressed(int). Use function QButtonGroupidPressed instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:227:17: warning: call function QButtonGroup::buttonReleased(int). Use function QButtonGroupidReleased instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:228:17: warning: call function QButtonGroup::buttonToggled(int, bool). Use function QButtonGroupidToggled instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:231:34: warning: Use QComboBox::SizeAdjustPolicy::AdjustToContents or AdjustToContentsOnFirstShow instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:233:14: warning: Use currentIndexChanged(int) instead, and get the text using itemText(index). [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:234:14: warning: Using QComboBox::activated(const QString &). Use textActiated() instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:235:14: warning: Using QComboBox::hilighted(const QString &). Use textHighlighted() instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:237:5: warning: Using QMacCocoaViewContainer. Use QWindow::fromWinId and QWidget::createWindowContainer instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:238:5: warning: Using QMacNativeWidget. Use QWidget::winId instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:241:34: warning: Use the constructor taking a QScreen * instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:247:13: warning: Using QTextBrowser::highlighted(const QString &). Use QTextBrowser::highlighted(const QUrl &) instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:252:22: warning: Use QComboBox::DockWidgetClosable|DockWidgetMovable|DockWidgetFloatable explicitly instead. [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:254:5: warning: Using QDirModel. Use QFileSystemModel instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:257:32: warning: Using QGraphicsView::matrix. Use transform() instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:258:15: warning: Using QGraphicsView::setMatrix(const QMatrix &). Use setTransform(const QTransform &) instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:259:15: warning: Using QGraphicsView::resetMatrix(). Use resetTransform() instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:262:24: warning: this enum has been removed in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:263:24: warning: this enum has been removed in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:264:24: warning: this enum has been removed in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:265:27: warning: this enum has been removed in Qt6 [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:269:17: warning: Using QMacCocoaViewContainer. Use QWindow::fromWinId and QWidget::createWindowContainer instead [-Wclazy-qt6-deprecated-api-fixes]
+qt6-deprecated-api-fixes/main.cpp:270:19: warning: Using QMacNativeWidget. Use QWidget::winId instead [-Wclazy-qt6-deprecated-api-fixes]
diff --git a/tests/qt6-deprecated-api-fixes/main.cpp.fixed.expected b/tests/qt6-deprecated-api-fixes/main.cpp.fixed.expected
index bf883f84..871ea5f6 100644
--- a/tests/qt6-deprecated-api-fixes/main.cpp.fixed.expected
+++ b/tests/qt6-deprecated-api-fixes/main.cpp.fixed.expected
@@ -21,6 +21,14 @@
#include <QtWidgets/QStyle>
#include <QtWidgets/QTextBrowser>
#include <QtWidgets/QWizard>
+
+class my_Class
+{
+public:
+ QDir m_dir;
+ QDir *m_dir_bis;
+ QVariant m_variant;
+};
#define MYSTRING "myDirPath"
void test()
@@ -28,11 +36,23 @@ void test()
QDir dir;
dir.setPath("myStuff");
+ QDir d;
+ QFileInfo fi;
+ d.setPath(fi.absolutePath());
+
+ my_Class test_class;
+ test_class.m_dir.setPath("name");
+
+ my_Class* test_class_bis = new my_Class;
+ test_class_bis->m_dir.setPath(("name"));
+
+ test_class.m_dir_bis->setPath("name");
+
QDir dir2;
- dir2 = MYSTRING;
+ dir2.setPath(MYSTRING);
QDir dir3;
- dir3.setPath("myStuff");
+ dir3.setPath("my" "Stuff");
QDir dir4;
char *pathName = "myStuff";
@@ -40,13 +60,14 @@ void test()
QDir dir5;
bool cond = true;
- dir5.setPath(cond ? "mystuff":"yourStuff");
+ dir5.setPath(cond ? "mystuff" : "yourStuff");
QDir dir6;
- dir6.setPath(true ? (cond ? "path1":"path2"):(cond ? "path3":"path4"));
+ dir6.setPath(true ? (cond ? "path1" : "path2") : (cond ? "path3" : "path4"));
QDir *dir7 = new QDir("apath");
dir7->setPath("adir");
+ dir7->setPath("adir");
QDir::addResourceSearchPath("somePath1");
dir6.addResourceSearchPath("somePath2");
@@ -158,10 +179,13 @@ void test()
QVariant var1;
QVariant *var3;
QVariant var2;
- bool bool1 = (QVariant::compare(var1, var2) > 0);
- bool bool2 = (QVariant::compare(var1, var2) >= 0);
- bool bool3 = (QVariant::compare(*var3, var2) < 0);
+ bool bool1 = QVariant::compare(var1, var2) > 0;
+ bool bool2 = (QVariant::compare(var1, (var2)) >= 0);
+ bool bool3 = (QVariant::compare((*var3), var2) < 0);
bool bool4 = (QVariant::compare(*var3, var2) <= 0);
+ bool bool5 = (QVariant::compare(*var3, test_class.m_variant) <= 0);
+ bool bool6 = (QVariant::compare(test_class_bis->m_variant, test_class.m_variant) <= 0);
+
}