aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp4
-rw-r--r--sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp4
-rw-r--r--sources/shiboken6/tests/qtxmltosphinxtest/qtxmltosphinxtest.cpp18
3 files changed, 6 insertions, 20 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
index 9b9e036f4..2e342fefb 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
@@ -132,9 +132,7 @@ static void filterHomebrewHeaderPaths(HeaderPaths &headerPaths)
static HeaderPaths gppInternalIncludePaths(const QString &compiler)
{
HeaderPaths result;
- QStringList arguments;
- arguments << QStringLiteral("-E") << QStringLiteral("-x") << QStringLiteral("c++")
- << QStringLiteral("-") << QStringLiteral("-v");
+ QStringList arguments{u"-E"_s, u"-x"_s, u"c++"_s, u"-"_s, u"-v"_s};
QByteArray stdOut;
QByteArray stdErr;
if (!runProcess(compiler, arguments, &stdOut, &stdErr))
diff --git a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
index 9e31b9366..1deaa234b 100644
--- a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
@@ -459,12 +459,10 @@ void QtDocGenerator::writeDocSnips(TextStream &s,
TypeSystem::Language language)
{
Indentation indentation(s);
- QStringList invalidStrings;
+ static const QStringList invalidStrings{u"*"_s, u"//"_s, u"/*"_s, u"*/"_s};
const static QString startMarkup = u"[sphinx-begin]"_s;
const static QString endMarkup = u"[sphinx-end]"_s;
- invalidStrings << u"*"_s << u"//"_s << u"/*"_s << u"*/"_s;
-
for (const CodeSnip &snip : codeSnips) {
if ((snip.position != position) ||
!(snip.language & language))
diff --git a/sources/shiboken6/tests/qtxmltosphinxtest/qtxmltosphinxtest.cpp b/sources/shiboken6/tests/qtxmltosphinxtest/qtxmltosphinxtest.cpp
index 963a74da7..e30033ae7 100644
--- a/sources/shiboken6/tests/qtxmltosphinxtest/qtxmltosphinxtest.cpp
+++ b/sources/shiboken6/tests/qtxmltosphinxtest/qtxmltosphinxtest.cpp
@@ -350,20 +350,14 @@ Q_DECLARE_METATYPE(TablePtr);
void QtXmlToSphinxTest::testTableFormatting_data()
{
- using TableRow = QtXmlToSphinx::TableRow;
using TableCell = QtXmlToSphinx::TableCell;
QTest::addColumn<TablePtr>("table");
QTest::addColumn<QString>("expected");
TablePtr table(new QtXmlToSphinx::Table);
- TableRow row;
- row << TableCell("item11") << TableCell("item12");
- table->appendRow(row);
- row.clear();
- row << TableCell("") << TableCell("item22");
- table->appendRow(row);
- row.clear();
+ table->appendRow({TableCell("item11"), TableCell("item12")});
+ table->appendRow({TableCell(""), TableCell("item22")});
table->normalize();
const char *expected = R"(+------+------+
@@ -377,12 +371,8 @@ void QtXmlToSphinxTest::testTableFormatting_data()
QTest::newRow("normal") << table << QString::fromLatin1(expected);
table.reset(new QtXmlToSphinx::Table);
- row << TableCell("item11") << TableCell("item12\nline2");
- table->appendRow(row);
- row.clear();
- row << TableCell("") << TableCell("item22\nline2\nline3");
- table->appendRow(row);
- row.clear();
+ table->appendRow({TableCell("item11"), TableCell("item12\nline2")});
+ table->appendRow({TableCell(""), TableCell("item22\nline2\nline3")});
table->normalize();
expected = R"(+------+------+