diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index a0b5e2d67..ca3e7feb5 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -2002,7 +2002,7 @@ void TMainWindow::ShowHeaderUnits(QTableWidget *table, int column, const QString SCASSERT(table != nullptr); QString header = table->horizontalHeaderItem(column)->text(); - const int index = header.indexOf(QLatin1Literal("(")); + const int index = header.indexOf(QLatin1String("(")); if (index != -1) { header.remove(index-1, 100); @@ -2026,7 +2026,7 @@ void TMainWindow::SetCurrentFile(const QString &fileName) if (curFile.isEmpty()) { shownName = tr("untitled"); - mType == MeasurementsType::Standard ? shownName += QLatin1Literal(".vst") : shownName += QLatin1Literal(".vit"); + mType == MeasurementsType::Standard ? shownName += QLatin1String(".vst") : shownName += QLatin1String(".vit"); ui->lineEditPathToFile->setText(tr("")); ui->lineEditPathToFile->setToolTip(tr("File was not saved yet.")); ui->lineEditPathToFile->setCursorPosition(0); @@ -2055,7 +2055,7 @@ void TMainWindow::SetCurrentFile(const QString &fileName) #if defined(Q_OS_MAC) static QIcon fileIcon = QIcon(QApplication::applicationDirPath() + - QLatin1Literal("/../Resources/measurements.icns")); + QLatin1String("/../Resources/measurements.icns")); QIcon icon; if (not curFile.isEmpty()) { diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.cpp b/src/app/valentina/dialogs/dialoglayoutsettings.cpp index b786d92b7..99e9ba304 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.cpp +++ b/src/app/valentina/dialogs/dialoglayoutsettings.cpp @@ -43,11 +43,11 @@ //must be the same order as PaperSizeTemplate constants const DialogLayoutSettings::FormatsVector DialogLayoutSettings::pageFormatNames = - DialogLayoutSettings::FormatsVector () << QLatin1Literal("A0") - << QLatin1Literal("A1") - << QLatin1Literal("A2") - << QLatin1Literal("A3") - << QLatin1Literal("A4") + DialogLayoutSettings::FormatsVector () << QLatin1String("A0") + << QLatin1String("A1") + << QLatin1String("A2") + << QLatin1String("A3") + << QLatin1String("A4") << QApplication::translate("DialogLayoutSettings", "Letter") << QApplication::translate("DialogLayoutSettings", "Legal") << QApplication::translate("DialogLayoutSettings", "Roll 24in") diff --git a/src/app/valentina/dialogs/dialogsavelayout.cpp b/src/app/valentina/dialogs/dialogsavelayout.cpp index 380067988..3e6415850 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.cpp +++ b/src/app/valentina/dialogs/dialogsavelayout.cpp @@ -67,7 +67,7 @@ DialogSaveLayout::DialogSaveLayout(int count, const QString &fileName, QWidget * ui->lineEditFileName->setValidator( new QRegExpValidator(QRegExp(baseFilenameRegExp), this)); #endif - const QString mask = fileName+QLatin1Literal("_"); + const QString mask = fileName+QLatin1String("_"); if (VApplication::IsGUIMode()) { ui->lineEditFileName->setText(mask); @@ -299,15 +299,15 @@ bool DialogSaveLayout::TestPdf() QVector> DialogSaveLayout::InitAvailFormats() { QVector> list; - list.append(std::make_pair(tr("Svg files (*.svg)"), QLatin1Literal(".svg"))); - list.append(std::make_pair(tr("PDF files (*.pdf)"), QLatin1Literal(".pdf"))); - list.append(std::make_pair(tr("Images (*.png)"), QLatin1Literal(".png"))); - list.append(std::make_pair(tr("Wavefront OBJ (*.obj)"), QLatin1Literal(".obj"))); + list.append(std::make_pair(tr("Svg files (*.svg)"), QLatin1String(".svg"))); + list.append(std::make_pair(tr("PDF files (*.pdf)"), QLatin1String(".pdf"))); + list.append(std::make_pair(tr("Images (*.png)"), QLatin1String(".png"))); + list.append(std::make_pair(tr("Wavefront OBJ (*.obj)"), QLatin1String(".obj"))); if (SupportPSTest()) { - list.append(std::make_pair(tr("PS files (*.ps)"), QLatin1Literal(".ps"))); - list.append(std::make_pair(tr("EPS files (*.eps)"), QLatin1Literal(".eps"))); + list.append(std::make_pair(tr("PS files (*.ps)"), QLatin1String(".ps"))); + list.append(std::make_pair(tr("EPS files (*.eps)"), QLatin1String(".eps"))); } - list.append(std::make_pair(tr("DXF files (*.dxf)"), QLatin1Literal(".dxf"))); + list.append(std::make_pair(tr("DXF files (*.dxf)"), QLatin1String(".dxf"))); return list; } diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index cb16125a6..03e8cbb00 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -3020,7 +3020,7 @@ bool MainWindow::SavePattern(const QString &fileName, QString &error) const bool result = doc->SaveDocument(fileName, error); if (result) { - if (tempInfo.suffix() != QLatin1Literal("autosave")) + if (tempInfo.suffix() != QLatin1String("autosave")) { setCurrentFile(fileName); helpLabel->setText(tr("File saved")); @@ -4419,7 +4419,7 @@ QString MainWindow::GetPatternFileName() { shownName = StrippedName(curFile); } - shownName += QLatin1Literal("[*]"); + shownName += QLatin1String("[*]"); return shownName; } @@ -4437,10 +4437,10 @@ QString MainWindow::GetMeasurementFileName() if(mChanges) { - shownName += QLatin1Literal("*"); + shownName += QLatin1String("*"); } - shownName += QLatin1Literal("]"); + shownName += QLatin1String("]"); return shownName; } } @@ -4460,7 +4460,7 @@ void MainWindow::UpdateWindowTitle() #if defined(Q_OS_MAC) static QIcon fileIcon = QIcon(QApplication::applicationDirPath() + - QLatin1Literal("/../Resources/Valentina.icns")); + QLatin1String("/../Resources/Valentina.icns")); QIcon icon; if (not curFile.isEmpty()) { diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index adbba5f1e..7a437b7a7 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -958,7 +958,7 @@ void MainWindowsNoGUI::SetPrinterSettings(QPrinter *printer, const PrintType &pr #ifdef Q_OS_WIN printer->setOutputFileName(outputFileName); #else - printer->setOutputFileName(outputFileName + QLatin1Literal(".pdf")); + printer->setOutputFileName(outputFileName + QLatin1String(".pdf")); #endif #ifdef Q_OS_MAC diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 8202161e1..36c49a46f 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -333,7 +333,7 @@ bool VPattern::SaveDocument(const QString &fileName, QString &error) const } const bool saved = VAbstractPattern::SaveDocument(fileName, error); - if (saved && QFileInfo(fileName).suffix() != QLatin1Literal("autosave")) + if (saved && QFileInfo(fileName).suffix() != QLatin1String("autosave")) { modified = false; } diff --git a/src/libs/fervor/fvupdater.cpp b/src/libs/fervor/fvupdater.cpp index 946412ab0..b8646397b 100644 --- a/src/libs/fervor/fvupdater.cpp +++ b/src/libs/fervor/fvupdater.cpp @@ -339,13 +339,13 @@ bool FvUpdater::xmlParseFeed() if (m_xml.isStartElement()) { - if (m_xml.name() == QLatin1Literal("item")) + if (m_xml.name() == QLatin1String("item")) { xmlEnclosureUrl.clear(); xmlEnclosureVersion.clear(); xmlEnclosurePlatform.clear(); } - else if (m_xml.name() == QLatin1Literal("enclosure")) + else if (m_xml.name() == QLatin1String("enclosure")) { const QXmlStreamAttributes attribs = m_xml.attributes(); const QString fervorPlatform = QStringLiteral("fervor:platform"); @@ -381,7 +381,7 @@ bool FvUpdater::xmlParseFeed() } else if (m_xml.isEndElement()) { - if (m_xml.name() == QLatin1Literal("item")) + if (m_xml.name() == QLatin1String("item")) { // That's it - we have analyzed a single and we'll stop // here (because the topmost is the most recent one, and thus diff --git a/src/libs/ifc/xml/vabstractconverter.cpp b/src/libs/ifc/xml/vabstractconverter.cpp index 079da3610..3f057de70 100644 --- a/src/libs/ifc/xml/vabstractconverter.cpp +++ b/src/libs/ifc/xml/vabstractconverter.cpp @@ -57,7 +57,7 @@ void VAbstractConverter::Convert() } QString error; - const QString backupFileName = fileName + QLatin1Literal(".backup"); + const QString backupFileName = fileName + QLatin1String(".backup"); if (SafeCopy(fileName, backupFileName, error) == false) { const QString errorMsg(tr("Error creating a backup file: %1.").arg(error)); diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 465ec7716..015f57b62 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -149,7 +149,7 @@ QStringList VAbstractPattern::ListMeasurements() const const QList tValues = tokens.values(); for (int j = 0; j < tValues.size(); ++j) { - if (tValues.at(j) == QLatin1Literal("-")) + if (tValues.at(j) == QLatin1String("-")) { continue; } @@ -1126,11 +1126,11 @@ QDomElement VAbstractPattern::CheckTagExists(const QString &tag) element = createElement(TagGradation); QDomElement heights = createElement(TagHeights); - heights.setAttribute(AttrAll, QLatin1Literal("true")); + heights.setAttribute(AttrAll, QLatin1String("true")); element.appendChild(heights); QDomElement sizes = createElement(TagSizes); - sizes.setAttribute(AttrAll, QLatin1Literal("true")); + sizes.setAttribute(AttrAll, QLatin1String("true")); element.appendChild(sizes); break; } diff --git a/src/libs/ifc/xml/vdomdocument.cpp b/src/libs/ifc/xml/vdomdocument.cpp index 0a44f9841..11eaef7cc 100644 --- a/src/libs/ifc/xml/vdomdocument.cpp +++ b/src/libs/ifc/xml/vdomdocument.cpp @@ -771,7 +771,7 @@ bool VDomDocument::SafeCopy(const QString &source, const QString &destination, Q qt_ntfs_permission_lookup++; // turn checking on #endif /*Q_OS_WIN32*/ - QTemporaryFile destFile(destination + QLatin1Literal(".XXXXXX")); + QTemporaryFile destFile(destination + QLatin1String(".XXXXXX")); destFile.setAutoRemove(false); if (not destFile.open()) { diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index dd72da2b6..f9170188c 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -179,7 +179,7 @@ void VPatternConverter::ApplyPatches() catch (VException &e) { QString error; - const QString backupFileName = fileName + QLatin1Literal(".backup"); + const QString backupFileName = fileName + QLatin1String(".backup"); if (SafeCopy(backupFileName, fileName, error) == false) { const QString errorMsg(tr("Error restoring backup file: %1.").arg(error)); @@ -894,7 +894,7 @@ void VPatternConverter::ParseModelingToV0_2_4(const QDomElement &modeling) QDomElement node = modeling.firstChild().toElement(); while (not node.isNull()) { - if (node.tagName() == QLatin1Literal("tools")) + if (node.tagName() == QLatin1String("tools")) { const quint32 toolId = node.attribute(QStringLiteral("id")).toUInt(); QVector children; diff --git a/src/libs/ifc/xml/vvitconverter.cpp b/src/libs/ifc/xml/vvitconverter.cpp index adbc1a058..94c317b49 100644 --- a/src/libs/ifc/xml/vvitconverter.cpp +++ b/src/libs/ifc/xml/vvitconverter.cpp @@ -110,7 +110,7 @@ void VVITConverter::ApplyPatches() catch (VException &e) { QString error; - const QString backupFileName = fileName + QLatin1Literal(".backup"); + const QString backupFileName = fileName + QLatin1String(".backup"); if (SafeCopy(backupFileName, fileName, error) == false) { const QString errorMsg(tr("Error restoring backup file: %1.").arg(error)); diff --git a/src/libs/ifc/xml/vvstconverter.cpp b/src/libs/ifc/xml/vvstconverter.cpp index 56b428588..37136c3f9 100644 --- a/src/libs/ifc/xml/vvstconverter.cpp +++ b/src/libs/ifc/xml/vvstconverter.cpp @@ -104,7 +104,7 @@ void VVSTConverter::ApplyPatches() catch (VException &e) { QString error; - const QString backupFileName = fileName + QLatin1Literal(".backup"); + const QString backupFileName = fileName + QLatin1String(".backup"); if (SafeCopy(backupFileName, fileName, error) == false) { const QString errorMsg(tr("Error restoring backup file: %1.").arg(error)); diff --git a/src/libs/vmisc/projectversion.cpp b/src/libs/vmisc/projectversion.cpp index 89d73c2cd..ab620ce3f 100644 --- a/src/libs/vmisc/projectversion.cpp +++ b/src/libs/vmisc/projectversion.cpp @@ -44,13 +44,13 @@ QString compilerString() #if defined(Q_CC_INTEL) // must be before GNU, Clang and MSVC because ICC/ICL claim to be them QString iccCompact; #ifdef __INTEL_CLANG_COMPILER - iccCompact = QLatin1Literal("Clang"); + iccCompact = QLatin1String("Clang"); #elif defined(__INTEL_MS_COMPAT_LEVEL) - iccCompact = QLatin1Literal("Microsoft"); + iccCompact = QLatin1String("Microsoft"); #elif defined(__GNUC__) - iccCompact = QLatin1Literal("GCC"); + iccCompact = QLatin1String("GCC"); #else - iccCompact = QLatin1Literal("no"); + iccCompact = QLatin1String("no"); #endif QString iccVersion; if (__INTEL_COMPILER >= 1300) diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index 14f52abb0..4304f7761 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -102,12 +102,12 @@ QString VAbstractApplication::translationsPath(const QString &locale) const QString mainPath; if (locale.isEmpty()) { - mainPath = QApplication::applicationDirPath() + QLatin1Literal("/../Resources") + trPath; + mainPath = QApplication::applicationDirPath() + QLatin1String("/../Resources") + trPath; } else { - mainPath = QApplication::applicationDirPath() + QLatin1Literal("/../Resources") + trPath + QLatin1Literal("/") - + locale + QLatin1Literal(".lproj"); + mainPath = QApplication::applicationDirPath() + QLatin1String("/../Resources") + trPath + QLatin1String("/") + + locale + QLatin1String(".lproj"); } QDir dirBundle(mainPath); if (dirBundle.exists()) diff --git a/src/libs/vmisc/vlockguard.h b/src/libs/vmisc/vlockguard.h index bb87e26aa..a266ff2a4 100644 --- a/src/libs/vmisc/vlockguard.h +++ b/src/libs/vmisc/vlockguard.h @@ -156,10 +156,10 @@ bool VLockGuard::TryLock(const QString &lockName, int stale, int timeou #if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) - lockFile = lockName + QLatin1Literal(".lock"); + lockFile = lockName + QLatin1String(".lock"); #if defined(Q_OS_UNIX) QFileInfo info(lockFile); - lockFile = info.absolutePath() + QLatin1Literal("/.") + info.fileName(); + lockFile = info.absolutePath() + QLatin1String("/.") + info.fileName(); #endif lock.reset(new QLockFile(lockFile)); diff --git a/src/libs/vtools/dialogs/tools/dialogalongline.cpp b/src/libs/vtools/dialogs/tools/dialogalongline.cpp index 117e03e1a..3b0f14df4 100644 --- a/src/libs/vtools/dialogs/tools/dialogalongline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogalongline.cpp @@ -179,7 +179,7 @@ void DialogAlongLine::ChosenObject(quint32 id, const SceneObject &type) line->RefreshGeometry(); if (buildMidpoint) { - SetFormula(currentLength + QLatin1Literal("/2")); + SetFormula(currentLength + QLatin1String("/2")); } prepare = true; this->setModal(true); diff --git a/src/libs/vtools/dialogs/tools/dialogdetail.cpp b/src/libs/vtools/dialogs/tools/dialogdetail.cpp index e79102c4e..7119afdaa 100644 --- a/src/libs/vtools/dialogs/tools/dialogdetail.cpp +++ b/src/libs/vtools/dialogs/tools/dialogdetail.cpp @@ -508,7 +508,7 @@ bool DialogDetail::DetailIsValid() const QByteArray byteArray; QBuffer buffer(&byteArray); pixmap.save(&buffer, "PNG"); - QString url = QString(" "); + QString url = QString(" "); if(CreateDetail().ContourPoints(data).count() < 3) { diff --git a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp index d025c97d3..9355f8ca7 100644 --- a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp @@ -934,6 +934,6 @@ void DialogSplinePath::ShowPointIssue(const QString &pName) } else { - item->setText(pName + QLatin1Literal("(!)")); + item->setText(pName + QLatin1String("(!)")); } } diff --git a/src/test/ValentinaTest/abstracttest.cpp b/src/test/ValentinaTest/abstracttest.cpp index a54d1b1b2..aca37f533 100644 --- a/src/test/ValentinaTest/abstracttest.cpp +++ b/src/test/ValentinaTest/abstracttest.cpp @@ -55,7 +55,7 @@ QString AbstractTest::ValentinaPath() const { const QString path = QStringLiteral("/../../../app/valentina/bin/valentina"); #ifdef Q_OS_WIN - return QApplication::applicationDirPath() + path + QLatin1Literal(".exe"); + return QApplication::applicationDirPath() + path + QLatin1String(".exe"); #else return QApplication::applicationDirPath() + path; #endif @@ -66,7 +66,7 @@ QString AbstractTest::TapePath() const { const QString path = QStringLiteral("/../../../app/tape/bin/tape"); #ifdef Q_OS_WIN - return QApplication::applicationDirPath() + path + QLatin1Literal(".exe"); + return QApplication::applicationDirPath() + path + QLatin1String(".exe"); #else return QApplication::applicationDirPath() + path; #endif diff --git a/src/test/ValentinaTest/tst_measurementregexp.cpp b/src/test/ValentinaTest/tst_measurementregexp.cpp index f71d54a91..0cafa210c 100644 --- a/src/test/ValentinaTest/tst_measurementregexp.cpp +++ b/src/test/ValentinaTest/tst_measurementregexp.cpp @@ -431,7 +431,7 @@ int TST_MeasurementRegExp::LoadMeasurements(const QString &checkedSystem, const const QString path = TranslationsPath(); const QString file = QString("measurements_%1_%2.qm").arg(checkedSystem).arg(checkedLocale); - if (QFileInfo(path+QLatin1Literal("/")+file).size() <= 34) + if (QFileInfo(path+QLatin1String("/")+file).size() <= 34) { const QString message = QString("Translation for system = %1 and locale = %2 is empty. \nFull path: %3/%4") .arg(checkedSystem) @@ -482,7 +482,7 @@ int TST_MeasurementRegExp::LoadVariables(const QString &checkedLocale) const QString path = TranslationsPath(); const QString file = QString("valentina_%1.qm").arg(checkedLocale); - if (QFileInfo(path+QLatin1Literal("/")+file).size() <= 34) + if (QFileInfo(path+QLatin1String("/")+file).size() <= 34) { const QString message = QString("Translation variables for locale = %1 is empty. \nFull path: %2/%3") .arg(checkedLocale) @@ -660,7 +660,7 @@ void TST_MeasurementRegExp::CheckUnderlineExists() const while (i != data.constEnd()) { const QString translated = trMs->InternalVarToUser(i.key()); - if ((translated.right(1) == QLatin1Literal("_")) != i.value()) + if ((translated.right(1) == QLatin1String("_")) != i.value()) { const QString message = QString("String '%1' doesn't contain underline. Original string is '%2'") .arg(translated).arg(i.key()); @@ -676,11 +676,11 @@ void TST_MeasurementRegExp::CheckInternalVaribleRegExp() const const QString regex = QStringLiteral("(.){1,}_(.){1,}$"); foreach(const QString &var, builInVariables) { - const QString sourceRegex = QLatin1Literal("^") + var + regex; + const QString sourceRegex = QLatin1String("^") + var + regex; const QRegularExpression sourceRe(sourceRegex); const QString translated = trMs->InternalVarToUser(var); - const QString translationRegex = QLatin1Literal("^") + translated + regex; + const QString translationRegex = QLatin1String("^") + translated + regex; const QRegularExpression translationRe(translationRegex); const QStringList originalNames = AllGroupNames() + builInFunctions + builInVariables; diff --git a/src/test/ValentinaTest/tst_qmuparsererrormsg.cpp b/src/test/ValentinaTest/tst_qmuparsererrormsg.cpp index b2dbcaffe..89fe8ce07 100644 --- a/src/test/ValentinaTest/tst_qmuparsererrormsg.cpp +++ b/src/test/ValentinaTest/tst_qmuparsererrormsg.cpp @@ -212,6 +212,6 @@ void TST_QmuParserErrorMsg::CheckStrings(int code, bool tok, bool pos) const QString translated = (*msg)[code]; const QString message = QString("String: '%1'.").arg(translated); - QVERIFY2((translated.indexOf(QLatin1Literal("$TOK$")) != -1) == tok, qUtf8Printable(message)); - QVERIFY2((translated.indexOf(QLatin1Literal("$POS$")) != -1) == pos, qUtf8Printable(message)); + QVERIFY2((translated.indexOf(QLatin1String("$TOK$")) != -1) == tok, qUtf8Printable(message)); + QVERIFY2((translated.indexOf(QLatin1String("$POS$")) != -1) == pos, qUtf8Printable(message)); } diff --git a/src/test/ValentinaTest/tst_tstranslation.cpp b/src/test/ValentinaTest/tst_tstranslation.cpp index 8015a8b2a..1e789e98f 100644 --- a/src/test/ValentinaTest/tst_tstranslation.cpp +++ b/src/test/ValentinaTest/tst_tstranslation.cpp @@ -116,7 +116,7 @@ void TST_TSTranslation::CheckEmptyToolButton() continue; } - if (source == QLatin1Literal("...")) + if (source == QLatin1String("...")) { const QDomElement translationTag = message.firstChildElement(TagTranslation); if (translationTag.hasAttribute(AttrType)) @@ -210,7 +210,7 @@ void TST_TSTranslation::CheckPlaceMarkerExist() for (int i = 1; i <= 99; ++i) { - const QString marker = QLatin1Literal("%") + QString().setNum(i); + const QString marker = QLatin1String("%") + QString().setNum(i); const bool sourceMark = source.indexOf(marker) != -1; if (sourceMark) { @@ -218,8 +218,8 @@ void TST_TSTranslation::CheckPlaceMarkerExist() if (sourceMarkCount != i) { const QString message = QString("In source string '%1' was missed place marker ") - .arg(source) + QLatin1Literal("'%") + QString().setNum(sourceMarkCount) + - QLatin1Literal("'."); + .arg(source) + QLatin1String("'%") + QString().setNum(sourceMarkCount) + + QLatin1String("'."); QFAIL(qUtf8Printable(message)); } } @@ -231,8 +231,8 @@ void TST_TSTranslation::CheckPlaceMarkerExist() if (translationMarkCount != i) { const QString message = QString("In translation string '%1' was missed place marker ") - .arg(translation) + QLatin1Literal("'%") + QString().setNum(translationMarkCount) + - QLatin1Literal("'."); + .arg(translation) + QLatin1String("'%") + QString().setNum(translationMarkCount) + + QLatin1String("'."); QFAIL(qUtf8Printable(message)); } } @@ -241,8 +241,8 @@ void TST_TSTranslation::CheckPlaceMarkerExist() { const QString message = QString("Compare to source string in the translation string '%1' was missed place marker ") - .arg(translation) + QLatin1Literal("'%") + QString().setNum(sourceMarkCount) + - QLatin1Literal("'."); + .arg(translation) + QLatin1String("'%") + QString().setNum(sourceMarkCount) + + QLatin1String("'."); QFAIL(qUtf8Printable(message)); } } diff --git a/src/test/ValentinaTest/tst_valentinacommandline.cpp b/src/test/ValentinaTest/tst_valentinacommandline.cpp index a9c7283f7..b1885dd11 100644 --- a/src/test/ValentinaTest/tst_valentinacommandline.cpp +++ b/src/test/ValentinaTest/tst_valentinacommandline.cpp @@ -51,7 +51,7 @@ void TST_ValentinaCommandLine::init() } if (not CopyRecursively(QApplication::applicationDirPath() + QDir::separator() + - QLatin1Literal("tst_valentina"), + QLatin1String("tst_valentina"), QApplication::applicationDirPath() + QDir::separator() + tmpTestFolder)) { QFAIL("Fail to prepare test files for testing."); @@ -66,7 +66,7 @@ void TST_ValentinaCommandLine::init() } if (not CopyRecursively(QApplication::applicationDirPath() + QDir::separator() + - QLatin1Literal("tst_valentina_collection"), + QLatin1String("tst_valentina_collection"), QApplication::applicationDirPath() + QDir::separator() + tmpTestCollectionFolder)) { QFAIL("Fail to prepare collection files for testing."); @@ -199,25 +199,25 @@ void TST_ValentinaCommandLine::TestMode_data() const QTest::newRow("Issue #256. Correct individual measurements.")<< "issue_256.val" << QString("--test;;-m;;%1").arg(tmp + QDir::separator() + - QLatin1Literal("issue_256_correct.vit")) + QLatin1String("issue_256_correct.vit")) << true << V_EX_OK; QTest::newRow("Issue #256. Wrong individual measurements.")<< "issue_256.val" << QString("--test;;-m;;%1").arg(tmp + QDir::separator() + - QLatin1Literal("issue_256_wrong.vit")) + QLatin1String("issue_256_wrong.vit")) << false << V_EX_NOINPUT; QTest::newRow("Issue #256. Correct standard measurements.")<< "issue_256.val" << QString("--test;;-m;;%1").arg(tmp + QDir::separator() + - QLatin1Literal("issue_256_correct.vst")) + QLatin1String("issue_256_correct.vst")) << true << V_EX_OK; QTest::newRow("Issue #256. Wrong standard measurements.")<< "issue_256.val" << QString("--test;;-m;;%1").arg(tmp + QDir::separator() + - QLatin1Literal("issue_256_wrong.vst")) + QLatin1String("issue_256_wrong.vst")) << false << V_EX_NOINPUT; @@ -254,7 +254,7 @@ void TST_ValentinaCommandLine::TestOpenCollection_data() const QTest::addColumn("exitCode"); const QString tmp = QApplication::applicationDirPath() + QDir::separator() + tmpTestCollectionFolder; - const QString testGOST = QString("--test;;-m;;%1").arg(tmp + QDir::separator() + QLatin1Literal("GOST_man_ru.vst")); + const QString testGOST = QString("--test;;-m;;%1").arg(tmp + QDir::separator() + QLatin1String("GOST_man_ru.vst")); const QString keyTest = QStringLiteral("--test"); QTest::newRow("bra") << "bra.val" << keyTest << true << V_EX_OK;