From 6a7405b4d45149f91b2c72d008ce9db2e776839e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 14 Mar 2018 16:01:24 +0200 Subject: [PATCH] Refactoring. Use QString default constructor instead of empty string. --HG-- branch : develop --- src/app/tape/tmainwindow.cpp | 18 ++++++------- .../core/vtooloptionspropertybrowser.cpp | 2 +- src/app/valentina/dialogs/dialoghistory.cpp | 2 +- src/app/valentina/mainwindow.cpp | 16 ++++++------ src/app/valentina/mainwindowsnogui.cpp | 4 +-- src/app/valentina/xml/vpattern.cpp | 26 +++++++++---------- src/libs/ifc/xml/vpatternconverter.cpp | 6 ++--- src/libs/ifc/xml/vvitconverter.cpp | 4 +-- src/libs/ifc/xml/vvstconverter.cpp | 4 +-- src/libs/qmuparser/qmuformulabase.cpp | 4 +-- src/libs/qmuparser/qmuparsertest.cpp | 2 +- src/libs/vdxf/vdxfengine.cpp | 2 +- src/libs/vformat/vmeasurements.cpp | 6 ++--- src/libs/vlayout/vtextmanager.cpp | 18 ++++++------- src/libs/vmisc/qxtcsvmodel.cpp | 4 +-- src/libs/vpatterndb/vtranslatevars.cpp | 2 +- .../plugins/vlinetypeproperty.cpp | 2 +- .../dialogs/support/dialogeditlabel.cpp | 18 ++++++------- .../support/dialogeditwrongformula.cpp | 8 +++--- .../vtools/dialogs/tools/dialogalongline.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogarc.cpp | 2 +- .../dialogs/tools/dialogarcwithlength.cpp | 2 +- .../vtools/dialogs/tools/dialogbisector.cpp | 2 +- .../dialogs/tools/dialogcubicbezier.cpp | 2 +- .../dialogs/tools/dialogcubicbezierpath.cpp | 2 +- .../tools/dialogcurveintersectaxis.cpp | 4 +-- .../vtools/dialogs/tools/dialogcutarc.cpp | 2 +- .../vtools/dialogs/tools/dialogcutspline.cpp | 2 +- .../dialogs/tools/dialogcutsplinepath.cpp | 2 +- .../dialogs/tools/dialogellipticalarc.cpp | 2 +- .../vtools/dialogs/tools/dialogendline.cpp | 4 +-- .../dialogs/tools/dialogflippingbyaxis.cpp | 4 +-- .../dialogs/tools/dialogflippingbyline.cpp | 4 +-- src/libs/vtools/dialogs/tools/dialoggroup.cpp | 2 +- .../vtools/dialogs/tools/dialogheight.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogline.cpp | 2 +- .../dialogs/tools/dialoglineintersect.cpp | 2 +- .../dialogs/tools/dialoglineintersectaxis.cpp | 4 +-- src/libs/vtools/dialogs/tools/dialogmove.cpp | 6 ++--- .../vtools/dialogs/tools/dialognormal.cpp | 2 +- .../tools/dialogpointfromarcandtangent.cpp | 2 +- .../tools/dialogpointfromcircleandtangent.cpp | 2 +- .../dialogs/tools/dialogpointofcontact.cpp | 2 +- .../tools/dialogpointofintersection.cpp | 2 +- .../tools/dialogpointofintersectionarcs.cpp | 2 +- .../dialogpointofintersectioncircles.cpp | 2 +- .../tools/dialogpointofintersectioncurves.cpp | 2 +- .../vtools/dialogs/tools/dialogrotation.cpp | 4 +-- .../dialogs/tools/dialogshoulderpoint.cpp | 2 +- .../vtools/dialogs/tools/dialogspline.cpp | 2 +- .../vtools/dialogs/tools/dialogsplinepath.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogtool.cpp | 6 ++--- .../vtools/dialogs/tools/dialogtriangle.cpp | 2 +- .../vtools/dialogs/tools/dialogtruedarts.cpp | 2 +- .../dialogs/tools/dialoguniondetails.cpp | 2 +- .../tools/piece/dialogduplicatedetail.cpp | 2 +- .../dialogs/tools/piece/dialogpiecepath.cpp | 10 +++---- .../vtools/dialogs/tools/piece/dialogpin.cpp | 2 +- .../dialogs/tools/piece/dialogplacelabel.cpp | 2 +- .../tools/piece/dialogseamallowance.cpp | 2 +- .../toolsinglepoint/toolcut/vtoolcutarc.cpp | 2 +- .../toolcut/vtoolcutspline.cpp | 2 +- .../toolcut/vtoolcutsplinepath.cpp | 2 +- .../toollinepoint/vtoolalongline.cpp | 2 +- .../toollinepoint/vtoolbisector.cpp | 2 +- .../toollinepoint/vtoolcurveintersectaxis.cpp | 2 +- .../toollinepoint/vtoolendline.cpp | 4 +-- .../toollinepoint/vtoollineintersectaxis.cpp | 2 +- .../toollinepoint/vtoolnormal.cpp | 2 +- .../toollinepoint/vtoolshoulderpoint.cpp | 2 +- .../toolsinglepoint/vtoolpointofcontact.cpp | 2 +- src/libs/vtools/tools/drawTools/vdrawtool.h | 2 +- .../undocommands/deletepatternpiece.cpp | 2 +- .../path/vistoolcubicbezierpath.cpp | 2 +- .../visualization/path/vistoolspline.cpp | 2 +- .../visualization/path/vistoolsplinepath.cpp | 2 +- src/test/ValentinaTest/tst_misc.cpp | 24 ++++++++--------- src/test/ValentinaTest/tst_qmutokenparser.cpp | 4 +-- src/test/ValentinaTest/tst_vspline.cpp | 4 +-- src/test/ValentinaTest/tst_vtranslatevars.cpp | 2 +- 80 files changed, 163 insertions(+), 163 deletions(-) diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index 037d31d1a..ab49b7ef7 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -385,7 +385,7 @@ void TMainWindow::FileNew() mIsReadOnly = m->IsReadOnly(); UpdatePadlock(mIsReadOnly); - SetCurrentFile(""); + SetCurrentFile(QString()); MeasurementsWasSaved(false); InitWindow(); @@ -449,7 +449,7 @@ void TMainWindow::OpenTemplate() if (m != nullptr) {// The file was opened. - SetCurrentFile(""); // Force user to to save new file + SetCurrentFile(QString()); // Force user to to save new file lock.reset();// remove lock from template } } @@ -1134,15 +1134,15 @@ void TMainWindow::Remove() ui->actionExportToCSV->setEnabled(false); ui->lineEditName->blockSignals(true); - ui->lineEditName->setText(""); + ui->lineEditName->setText(QString()); ui->lineEditName->blockSignals(false); ui->plainTextEditDescription->blockSignals(true); - ui->plainTextEditDescription->setPlainText(""); + ui->plainTextEditDescription->setPlainText(QString()); ui->plainTextEditDescription->blockSignals(false); ui->lineEditFullName->blockSignals(true); - ui->lineEditFullName->setText(""); + ui->lineEditFullName->setText(QString()); ui->lineEditFullName->blockSignals(false); if (mType == MeasurementsType::Multisize) @@ -1152,7 +1152,7 @@ void TMainWindow::Remove() ui->doubleSpinBoxInSizes->blockSignals(true); ui->doubleSpinBoxInHeights->blockSignals(true); - ui->labelCalculatedValue->setText(""); + ui->labelCalculatedValue->setText(QString()); ui->doubleSpinBoxBaseValue->setValue(0); ui->doubleSpinBoxInSizes->setValue(0); ui->doubleSpinBoxInHeights->setValue(0); @@ -1165,11 +1165,11 @@ void TMainWindow::Remove() else { ui->labelCalculatedValue->blockSignals(true); - ui->labelCalculatedValue->setText(""); + ui->labelCalculatedValue->setText(QString()); ui->labelCalculatedValue->blockSignals(false); ui->plainTextEditFormula->blockSignals(true); - ui->plainTextEditFormula->setPlainText(""); + ui->plainTextEditFormula->setPlainText(QString()); ui->plainTextEditFormula->blockSignals(false); } } @@ -2994,7 +2994,7 @@ void TMainWindow::CreateWindowMenu(QMenu *menu) const int index = title.lastIndexOf("[*]"); if (index != -1) { - window->isWindowModified() ? title.replace(index, 3, "*") : title.replace(index, 3, ""); + window->isWindowModified() ? title.replace(index, 3, "*") : title.replace(index, 3, QString()); } QAction *action = menu->addAction(title, this, SLOT(ShowWindow())); diff --git a/src/app/valentina/core/vtooloptionspropertybrowser.cpp b/src/app/valentina/core/vtooloptionspropertybrowser.cpp index 4f376721b..2030fd2a2 100644 --- a/src/app/valentina/core/vtooloptionspropertybrowser.cpp +++ b/src/app/valentina/core/vtooloptionspropertybrowser.cpp @@ -496,7 +496,7 @@ void VToolOptionsPropertyBrowser::itemClicked(QGraphicsItem *item) currentItem = item; if (currentItem == nullptr) { - formView->setTitle(""); + formView->setTitle(QString()); return; } diff --git a/src/app/valentina/dialogs/dialoghistory.cpp b/src/app/valentina/dialogs/dialoghistory.cpp index d2ad7f409..2e3117eac 100644 --- a/src/app/valentina/dialogs/dialoghistory.cpp +++ b/src/app/valentina/dialogs/dialoghistory.cpp @@ -498,7 +498,7 @@ void DialogHistory::RetranslateUi() QTableWidgetItem *item = ui->tableWidget->item(cursorRow, 0); SCASSERT(item != nullptr) - item->setIcon(QIcon("")); + item->setIcon(QIcon(QString())); cursorRow = currentRow; cellClicked(cursorRow, 0); diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 793a96910..6fdf87025 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -202,7 +202,7 @@ MainWindow::MainWindow(QWidget *parent) ReadSettings(); - setCurrentFile(""); + setCurrentFile(QString()); WindowsLocale(); connect(ui->listWidget, &QListWidget::currentRowChanged, this, &MainWindow::ShowPaper); @@ -324,7 +324,7 @@ void MainWindow::AddPP(const QString &PPName) QApplication::postEvent(this, new FitBestCurrentEvent()); ui->actionNewDraw->setEnabled(true); - m_statusLabel->setText(""); + m_statusLabel->setText(QString()); } //--------------------------------------------------------------------------------------------------------------------- @@ -2170,7 +2170,7 @@ void MainWindow::CancelTool() { pointer->setChecked(false); } - m_statusLabel->setText(""); + m_statusLabel->setText(QString()); // Crash: using CRTL+Z while using line tool. // related bug report: @@ -2381,7 +2381,7 @@ void MainWindow::ArrowTool(bool checked) ui->view->viewport()->unsetCursor(); ui->view->viewport()->setCursor(QCursor(Qt::ArrowCursor)); ui->view->setCurrentCursorShape(); // Hack to fix problem with a cursor - m_statusLabel->setText(""); + m_statusLabel->setText(QString()); ui->view->setShowToolOptions(true); qCDebug(vMainWindow, "Enabled arrow tool."); } @@ -2575,7 +2575,7 @@ void MainWindow::ActionDetails(bool checked) ui->dockWidgetGroups->setVisible(isDockGroupsVisible); ui->dockWidgetGroups->setToolTip(tr("Show which details will go in layout")); - m_statusLabel->setText(""); + m_statusLabel->setText(QString()); } else { @@ -2676,7 +2676,7 @@ void MainWindow::ActionLayout(bool checked) SetEnableWidgets(true); ui->toolBox->setCurrentIndex(ui->toolBox->indexOf(ui->layoutPage)); - mouseCoordinate->setText(""); + mouseCoordinate->setText(QString()); if (qApp->patternType() == MeasurementsType::Multisize) { @@ -2700,7 +2700,7 @@ void MainWindow::ActionLayout(bool checked) ui->toolButtonLayoutSettings->click(); } - m_statusLabel->setText(""); + m_statusLabel->setText(QString()); } else { @@ -5442,7 +5442,7 @@ QString MainWindow::GetMeasurementFileName() { if(doc->MPath().isEmpty()) { - return ""; + return QString(); } else { diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index 5dc3cfac1..2448470ad 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -1229,7 +1229,7 @@ void MainWindowsNoGUI::RestoreTextAfterDXF(const QString &placeholder, if(QGraphicsSimpleTextItem *textItem = qgraphicsitem_cast(item)) { QString text = textItem->text(); - text.replace(placeholder, ""); + text.replace(placeholder, QString()); textItem->setText(text); } } @@ -1412,7 +1412,7 @@ void MainWindowsNoGUI::SetPrinterSettings(QPrinter *printer, const PrintType &pr break; } case PrintType::PrintNative: - printer->setOutputFileName("");//Disable printing to file if was enabled. + printer->setOutputFileName(QString());//Disable printing to file if was enabled. printer->setOutputFormat(QPrinter::NativeFormat); break; case PrintType::PrintPreview: /*do nothing*/ diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 462ec046e..4eb280ce0 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -383,7 +383,7 @@ quint32 VPattern::SPointActiveDraw() const QDomElement domElement = domNode.toElement(); if (domElement.isNull() == false) { - if (domElement.tagName() == TagPoint && domElement.attribute(AttrType, "") == VToolBasePoint::ToolType) + if (domElement.tagName() == TagPoint && domElement.attribute(AttrType, QString()) == VToolBasePoint::ToolType) { return GetParametrId(domElement); } @@ -797,7 +797,7 @@ void VPattern::ParseDrawMode(const QDomNode &node, const Document &parse, const { case 0: // TagPoint qCDebug(vXML, "Tag point."); - ParsePointElement(scene, domElement, parse, domElement.attribute(AttrType, "")); + ParsePointElement(scene, domElement, parse, domElement.attribute(AttrType, QString())); break; case 1: // TagLine qCDebug(vXML, "Tag line."); @@ -805,23 +805,23 @@ void VPattern::ParseDrawMode(const QDomNode &node, const Document &parse, const break; case 2: // TagSpline qCDebug(vXML, "Tag spline."); - ParseSplineElement(scene, domElement, parse, domElement.attribute(AttrType, "")); + ParseSplineElement(scene, domElement, parse, domElement.attribute(AttrType, QString())); break; case 3: // TagArc qCDebug(vXML, "Tag arc."); - ParseArcElement(scene, domElement, parse, domElement.attribute(AttrType, "")); + ParseArcElement(scene, domElement, parse, domElement.attribute(AttrType, QString())); break; case 4: // TagTools qCDebug(vXML, "Tag tools."); - ParseToolsElement(scene, domElement, parse, domElement.attribute(AttrType, "")); + ParseToolsElement(scene, domElement, parse, domElement.attribute(AttrType, QString())); break; case 5: // TagOperation qCDebug(vXML, "Tag operation."); - ParseOperationElement(scene, domElement, parse, domElement.attribute(AttrType, "")); + ParseOperationElement(scene, domElement, parse, domElement.attribute(AttrType, QString())); break; case 6: // TagElArc qCDebug(vXML, "Tag elliptical arc."); - ParseEllipticalArcElement(scene, domElement, parse, domElement.attribute(AttrType, "")); + ParseEllipticalArcElement(scene, domElement, parse, domElement.attribute(AttrType, QString())); break; case 7: // TagPath qCDebug(vXML, "Tag path."); @@ -3140,7 +3140,7 @@ void VPattern::ParseToolRotation(VMainGraphicsScene *scene, QDomElement &domElem initData.origin = GetParametrUInt(domElement, AttrCenter, NULL_ID_STR); initData.angle = GetParametrString(domElement, AttrAngle, "10"); const QString a = initData.angle;//need for saving fixed formula; - initData.suffix = GetParametrString(domElement, AttrSuffix, ""); + initData.suffix = GetParametrString(domElement, AttrSuffix, QString()); VAbstractOperation::ExtractData(domElement, initData); @@ -3185,7 +3185,7 @@ void VPattern::ParseToolFlippingByLine(VMainGraphicsScene *scene, QDomElement &d ToolsCommonAttributes(domElement, initData.id); initData.firstLinePointId = GetParametrUInt(domElement, AttrP1Line, NULL_ID_STR); initData.secondLinePointId = GetParametrUInt(domElement, AttrP2Line, NULL_ID_STR); - initData.suffix = GetParametrString(domElement, AttrSuffix, ""); + initData.suffix = GetParametrString(domElement, AttrSuffix, QString()); VAbstractOperation::ExtractData(domElement, initData); @@ -3217,7 +3217,7 @@ void VPattern::ParseToolFlippingByAxis(VMainGraphicsScene *scene, QDomElement &d ToolsCommonAttributes(domElement, initData.id); initData.originPointId = GetParametrUInt(domElement, AttrCenter, NULL_ID_STR); initData.axisType = static_cast(GetParametrUInt(domElement, AttrAxisType, "1")); - initData.suffix = GetParametrString(domElement, AttrSuffix, ""); + initData.suffix = GetParametrString(domElement, AttrSuffix, QString()); VAbstractOperation::ExtractData(domElement, initData); @@ -3253,7 +3253,7 @@ void VPattern::ParseToolMove(VMainGraphicsScene *scene, QDomElement &domElement, const QString r = initData.formulaRotationAngle;//need for saving fixed formula; initData.formulaLength = GetParametrString(domElement, AttrLength, "0"); const QString len = initData.formulaLength;//need for saving fixed formula; - initData.suffix = GetParametrString(domElement, AttrSuffix, ""); + initData.suffix = GetParametrString(domElement, AttrSuffix, QString()); initData.rotationOrigin = GetParametrUInt(domElement, AttrCenter, NULL_ID_STR); VAbstractOperation::ExtractData(domElement, initData); @@ -3316,7 +3316,7 @@ QDomElement VPattern::MakeEmptyIncrement(const QString &name) QDomElement element = createElement(TagIncrement); SetAttribute(element, AttrName, name); SetAttribute(element, AttrFormula, QString("0")); - SetAttribute(element, AttrDescription, QString("")); + SetAttribute(element, AttrDescription, QString(QString())); return element; } @@ -3764,7 +3764,7 @@ void VPattern::ParseIncrementsElement(const QDomNode &node, const Document &pars { if (domElement.tagName() == TagIncrement) { - const QString name = GetParametrString(domElement, AttrName, ""); + const QString name = GetParametrString(domElement, AttrName, QString()); const QString desc = GetParametrEmptyString(domElement, AttrDescription); const QString formula = GetParametrString(domElement, AttrFormula, "0"); bool ok = false; diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index d95c14f15..010f5d28c 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -2134,7 +2134,7 @@ void VPatternConverter::TagDetailToV0_4_0() tagNode.setAttribute(*strMy, element.attribute(*strMy, "0")); } - tagNode.setAttribute(*strType, element.attribute(*strType, "")); + tagNode.setAttribute(*strType, element.attribute(*strType, QString())); tagNodes.appendChild(tagNode); @@ -2187,7 +2187,7 @@ QDomElement VPatternConverter::GetUnionDetailNodesV0_4_0(const QDomElement &deta tagNode.setAttribute(*strReverse, node.attribute(*strReverse, "0")); } - tagNode.setAttribute(*strType, node.attribute(*strType, "")); + tagNode.setAttribute(*strType, node.attribute(*strType, QString())); tagNodes.appendChild(tagNode); } @@ -2395,7 +2395,7 @@ void VPatternConverter::PortPieceLabelstoV0_6_0() const int count = nodeListMCP.count(); try { - if (not GetParametrString(dataTag, *strLetter, "").isEmpty()) + if (not GetParametrString(dataTag, *strLetter, QString()).isEmpty()) { AddLabelTemplateLineV0_6_0(dataTag, "%pLetter%", true, false, Qt::AlignHCenter, 6); } diff --git a/src/libs/ifc/xml/vvitconverter.cpp b/src/libs/ifc/xml/vvitconverter.cpp index 41eba13bb..7dc32b396 100644 --- a/src/libs/ifc/xml/vvitconverter.cpp +++ b/src/libs/ifc/xml/vvitconverter.cpp @@ -242,8 +242,8 @@ QDomElement VVITConverter::AddMV0_3_0(const QString &name, qreal value) SetAttribute(element, QStringLiteral("name"), name); SetAttribute(element, QStringLiteral("value"), QString().setNum(value)); - SetAttribute(element, QStringLiteral("description"), QString("")); - SetAttribute(element, QStringLiteral("full_name"), QString("")); + SetAttribute(element, QStringLiteral("description"), QString()); + SetAttribute(element, QStringLiteral("full_name"), QString()); return element; } diff --git a/src/libs/ifc/xml/vvstconverter.cpp b/src/libs/ifc/xml/vvstconverter.cpp index 9bc570858..0859a7581 100644 --- a/src/libs/ifc/xml/vvstconverter.cpp +++ b/src/libs/ifc/xml/vvstconverter.cpp @@ -264,8 +264,8 @@ QDomElement VVSTConverter::AddMV0_4_0(const QString &name, qreal value, qreal si SetAttribute(element, QStringLiteral("base"), QString().setNum(value)); SetAttribute(element, QStringLiteral("size_increase"), QString().setNum(sizeIncrease)); SetAttribute(element, QStringLiteral("height_increase"), QString().setNum(heightIncrease)); - SetAttribute(element, QStringLiteral("description"), QString("")); - SetAttribute(element, QStringLiteral("full_name"), QString("")); + SetAttribute(element, QStringLiteral("description"),QString()); + SetAttribute(element, QStringLiteral("full_name"), QString()); return element; } diff --git a/src/libs/qmuparser/qmuformulabase.cpp b/src/libs/qmuparser/qmuformulabase.cpp index 05cf994f1..8d8019fa4 100644 --- a/src/libs/qmuparser/qmuformulabase.cpp +++ b/src/libs/qmuparser/qmuformulabase.cpp @@ -76,10 +76,10 @@ void QmuFormulaBase::InitCharSets() // Defining identifier character sets const QString nameChars = QString() + sign0 + sign1 + sign2 + sign3 + sign4 + sign5 + sign6 + sign7 + sign8 + - sign9 + QLatin1String("\\_@#'") + symbols.join(""); + sign9 + QLatin1String("\\_@#'") + symbols.join(QString()); DefineNameChars(nameChars); - const QString oprtChars = symbols.join("") + positiveSign + negativeSign + QLatin1String("*^/?<>=!$%&|~'_"); + const QString oprtChars = symbols.join(QString()) + positiveSign + negativeSign + QLatin1String("*^/?<>=!$%&|~'_"); DefineOprtChars(oprtChars); const QString infixOprtChars = QString() + positiveSign + negativeSign + QLatin1String("*^/?<>=!$%&|~'_"); diff --git a/src/libs/qmuparser/qmuparsertest.cpp b/src/libs/qmuparser/qmuparsertest.cpp index ff63ccfdd..9778616b3 100644 --- a/src/libs/qmuparser/qmuparsertest.cpp +++ b/src/libs/qmuparser/qmuparsertest.cpp @@ -721,7 +721,7 @@ int QmuParserTester::TestInfixOprt() iStat += EqnTest ( "(-3)^2", 9, true ); iStat += EqnTest ( "-(-2^2)", 4, true ); iStat += EqnTest ( "3+-3^2", -6, true ); - // The following assumes use of sqr as postfix operator ("") together + // The following assumes use of sqr as postfix operator (QString()) together // with a sign operator of low priority: iStat += EqnTest ( "-2'", -4, true ); iStat += EqnTest ( "-(1+1)'", -4, true ); diff --git a/src/libs/vdxf/vdxfengine.cpp b/src/libs/vdxf/vdxfengine.cpp index 759748eb9..41b6b5e52 100644 --- a/src/libs/vdxf/vdxfengine.cpp +++ b/src/libs/vdxf/vdxfengine.cpp @@ -373,7 +373,7 @@ void VDxfEngine::drawTextItem(const QPointF & p, const QTextItem & textItem) if (foundEndOfString) { - t.replace(endStringPlaceholder, ""); + t.replace(endStringPlaceholder, QString()); } textBuffer->text += t.toStdString(); diff --git a/src/libs/vformat/vmeasurements.cpp b/src/libs/vformat/vmeasurements.cpp index dfa4dc4ab..c1c4a49a2 100644 --- a/src/libs/vformat/vmeasurements.cpp +++ b/src/libs/vformat/vmeasurements.cpp @@ -371,7 +371,7 @@ int VMeasurements::BaseHeight() const //--------------------------------------------------------------------------------------------------------------------- QString VMeasurements::Notes() const { - return UniqueTagText(TagNotes, ""); + return UniqueTagText(TagNotes, QString()); } //--------------------------------------------------------------------------------------------------------------------- @@ -386,7 +386,7 @@ void VMeasurements::SetNotes(const QString &text) //--------------------------------------------------------------------------------------------------------------------- QString VMeasurements::Customer() const { - return UniqueTagText(TagCustomer, ""); + return UniqueTagText(TagCustomer, QString()); } //--------------------------------------------------------------------------------------------------------------------- @@ -446,7 +446,7 @@ void VMeasurements::SetPMSystem(const QString &system) //--------------------------------------------------------------------------------------------------------------------- QString VMeasurements::Email() const { - return UniqueTagText(TagEmail, ""); + return UniqueTagText(TagEmail, QString()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vlayout/vtextmanager.cpp b/src/libs/vlayout/vtextmanager.cpp index 93b0ab718..8fadf1fcf 100644 --- a/src/libs/vlayout/vtextmanager.cpp +++ b/src/libs/vlayout/vtextmanager.cpp @@ -126,15 +126,15 @@ QMap PreparePlaceholders(const VAbstractPattern *doc) } // Piece tags - placeholders.insert(pl_pLetter, ""); - placeholders.insert(pl_pAnnotation, ""); - placeholders.insert(pl_pOrientation, ""); - placeholders.insert(pl_pRotation, ""); - placeholders.insert(pl_pTilt, ""); - placeholders.insert(pl_pFoldPosition, ""); - placeholders.insert(pl_pName, ""); - placeholders.insert(pl_pQuantity, ""); - placeholders.insert(pl_wOnFold, ""); + placeholders.insert(pl_pLetter, QString()); + placeholders.insert(pl_pAnnotation, QString()); + placeholders.insert(pl_pOrientation, QString()); + placeholders.insert(pl_pRotation, QString()); + placeholders.insert(pl_pTilt, QString()); + placeholders.insert(pl_pFoldPosition, QString()); + placeholders.insert(pl_pName, QString()); + placeholders.insert(pl_pQuantity, QString()); + placeholders.insert(pl_wOnFold, QString()); placeholders.insert(pl_mFabric, QObject::tr("Fabric")); placeholders.insert(pl_mLining, QObject::tr("Lining")); placeholders.insert(pl_mInterfacing, QObject::tr("Interfacing")); diff --git a/src/libs/vmisc/qxtcsvmodel.cpp b/src/libs/vmisc/qxtcsvmodel.cpp index a0cc9ffa5..7a1a01354 100644 --- a/src/libs/vmisc/qxtcsvmodel.cpp +++ b/src/libs/vmisc/qxtcsvmodel.cpp @@ -606,7 +606,7 @@ bool QxtCsvModel::toCSV(QIODevice* dest, QString &error, bool withHeader, QChar } if (withHeader) { - data = ""; + data = QString(); for (col = 0; col < cols; ++col) { if (col > 0) @@ -620,7 +620,7 @@ bool QxtCsvModel::toCSV(QIODevice* dest, QString &error, bool withHeader, QChar for (row = 0; row < rows; ++row) { const QStringList& rowData = d_ptr.csvData[row]; - data = ""; + data = QString(); for (col = 0; col < cols; ++col) { if (col > 0) diff --git a/src/libs/vpatterndb/vtranslatevars.cpp b/src/libs/vpatterndb/vtranslatevars.cpp index e80a63be9..27e58fea7 100644 --- a/src/libs/vpatterndb/vtranslatevars.cpp +++ b/src/libs/vpatterndb/vtranslatevars.cpp @@ -1005,7 +1005,7 @@ QString VTranslateVars::FormulaToUser(const QString &formula, bool osSeparator) QString dStr = loc.toString(d);// Number string in user locale if (loc.groupSeparator().isSpace()) { - dStr.replace(loc.groupSeparator(), ""); + dStr.replace(loc.groupSeparator(), QString()); } newFormula.replace(nKeys.at(i), nValues.at(i).length(), dStr); const int bias = nValues.at(i).length() - dStr.length(); diff --git a/src/libs/vpropertyexplorer/plugins/vlinetypeproperty.cpp b/src/libs/vpropertyexplorer/plugins/vlinetypeproperty.cpp index c4b4a451e..effdc2c78 100644 --- a/src/libs/vpropertyexplorer/plugins/vlinetypeproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vlinetypeproperty.cpp @@ -89,7 +89,7 @@ QWidget *VPE::VLineTypeProperty::createEditor(QWidget *parent, const QStyleOptio QMap::const_iterator i = styles.constBegin(); while (i != styles.constEnd()) { - tmpEditor->addItem(i.value(), "", QVariant(i.key())); + tmpEditor->addItem(i.value(), QString(), QVariant(i.key())); ++i; } diff --git a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp index 97a7aa90b..f7d948e39 100644 --- a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp @@ -512,20 +512,20 @@ void DialogEditLabel::InitPlaceholders() } // Piece tags - m_placeholders.insert(pl_pLetter, qMakePair(tr("Piece letter"), QString(""))); - m_placeholders.insert(pl_pAnnotation, qMakePair(tr("Piece annotation"), QString(""))); - m_placeholders.insert(pl_pOrientation, qMakePair(tr("Piece orientation"), QString(""))); - m_placeholders.insert(pl_pRotation, qMakePair(tr("Piece rotation"), QString(""))); - m_placeholders.insert(pl_pTilt, qMakePair(tr("Piece tilt"), QString(""))); - m_placeholders.insert(pl_pFoldPosition, qMakePair(tr("Piece fold position"), QString(""))); - m_placeholders.insert(pl_pName, qMakePair(tr("Piece name"), QString(""))); - m_placeholders.insert(pl_pQuantity, qMakePair(tr("Quantity"), QString(""))); + m_placeholders.insert(pl_pLetter, qMakePair(tr("Piece letter"), QString(QString()))); + m_placeholders.insert(pl_pAnnotation, qMakePair(tr("Piece annotation"), QString(QString()))); + m_placeholders.insert(pl_pOrientation, qMakePair(tr("Piece orientation"), QString(QString()))); + m_placeholders.insert(pl_pRotation, qMakePair(tr("Piece rotation"), QString(QString()))); + m_placeholders.insert(pl_pTilt, qMakePair(tr("Piece tilt"), QString(QString()))); + m_placeholders.insert(pl_pFoldPosition, qMakePair(tr("Piece fold position"), QString(QString()))); + m_placeholders.insert(pl_pName, qMakePair(tr("Piece name"), QString(QString()))); + m_placeholders.insert(pl_pQuantity, qMakePair(tr("Quantity"), QString(QString()))); m_placeholders.insert(pl_mFabric, qMakePair(tr("Material: Fabric"), tr("Fabric"))); m_placeholders.insert(pl_mLining, qMakePair(tr("Material: Lining"), tr("Lining"))); m_placeholders.insert(pl_mInterfacing, qMakePair(tr("Material: Interfacing"), tr("Interfacing"))); m_placeholders.insert(pl_mInterlining, qMakePair(tr("Material: Interlining"), tr("Interlining"))); m_placeholders.insert(pl_wCut, qMakePair(tr("Word: Cut"), tr("Cut"))); - m_placeholders.insert(pl_wOnFold, qMakePair(tr("Word: on fold"), QString("")));// By default should be empty + m_placeholders.insert(pl_wOnFold, qMakePair(tr("Word: on fold"), QString(QString())));// By default should be empty } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp index 4f227c6ef..183fee2e2 100644 --- a/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp @@ -162,7 +162,7 @@ void DialogEditWrongFormula::ValChanged(int row) { if (ui->tableWidget->rowCount() == 0) { - ui->labelDescription->setText(""); + ui->labelDescription->setText(QString()); return; } QTableWidgetItem *item = ui->tableWidget->item( row, ColumnName ); @@ -508,7 +508,7 @@ void DialogEditWrongFormula::ShowVariable(const QMap &var) ui->tableWidget->clearContents(); ui->tableWidget->setRowCount(0); ui->tableWidget->setColumnHidden(ColumnFullName, true); - ui->labelDescription->setText(""); + ui->labelDescription->setText(QString()); QMapIterator iMap(var); while (iMap.hasNext()) @@ -542,7 +542,7 @@ void DialogEditWrongFormula::ShowMeasurements(const QMaptableWidget->clearContents(); ui->tableWidget->setRowCount(0); ui->tableWidget->setColumnHidden(ColumnFullName, false); - ui->labelDescription->setText(""); + ui->labelDescription->setText(QString()); QMapIterator> iMap(var); while (iMap.hasNext()) @@ -590,7 +590,7 @@ void DialogEditWrongFormula::ShowFunctions() ui->tableWidget->clearContents(); ui->tableWidget->setRowCount(0); ui->tableWidget->setColumnHidden(ColumnFullName, true); - ui->labelDescription->setText(""); + ui->labelDescription->setText(QString()); const QMap functions = qApp->TrVars()->GetFunctions(); QMap::const_iterator i = functions.constBegin(); diff --git a/src/libs/vtools/dialogs/tools/dialogalongline.cpp b/src/libs/vtools/dialogs/tools/dialogalongline.cpp index 947552fca..5c0d86404 100644 --- a/src/libs/vtools/dialogs/tools/dialogalongline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogalongline.cpp @@ -184,7 +184,7 @@ void DialogAlongLine::ChosenObject(quint32 id, const SceneObject &type) } break; case 1: - if (SetObject(id, ui->comboBoxSecondPoint, "")) + if (SetObject(id, ui->comboBoxSecondPoint, QString())) { if (flagError) { diff --git a/src/libs/vtools/dialogs/tools/dialogarc.cpp b/src/libs/vtools/dialogs/tools/dialogarc.cpp index 3a7efcb94..91da37713 100644 --- a/src/libs/vtools/dialogs/tools/dialogarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogarc.cpp @@ -256,7 +256,7 @@ void DialogArc::ChosenObject(quint32 id, const SceneObject &type) { if (type == SceneObject::Point) { - if (SetObject(id, ui->comboBoxBasePoint, "")) + if (SetObject(id, ui->comboBoxBasePoint, QString())) { vis->VisualMode(id); prepare = true; diff --git a/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp b/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp index 6343d4f03..9ca2df938 100644 --- a/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp +++ b/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp @@ -235,7 +235,7 @@ void DialogArcWithLength::ChosenObject(quint32 id, const SceneObject &type) { if (type == SceneObject::Point) { - if (SetObject(id, ui->comboBoxCenter, "")) + if (SetObject(id, ui->comboBoxCenter, QString())) { vis->VisualMode(id); prepare = true; diff --git a/src/libs/vtools/dialogs/tools/dialogbisector.cpp b/src/libs/vtools/dialogs/tools/dialogbisector.cpp index 59cbfe281..6d5f1fdc7 100644 --- a/src/libs/vtools/dialogs/tools/dialogbisector.cpp +++ b/src/libs/vtools/dialogs/tools/dialogbisector.cpp @@ -199,7 +199,7 @@ void DialogBisector::ChosenObject(quint32 id, const SceneObject &type) if (set.size() == 3) { - if (SetObject(id, ui->comboBoxThirdPoint, "")) + if (SetObject(id, ui->comboBoxThirdPoint, QString())) { line->setObject3Id(id); line->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp b/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp index 54d8e7509..92ba0574a 100644 --- a/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp @@ -153,7 +153,7 @@ void DialogCubicBezier::ChosenObject(quint32 id, const SceneObject &type) case 3: if (getCurrentObjectId(ui->comboBoxP1) != id) { - if (SetObject(id, ui->comboBoxP4, "")) + if (SetObject(id, ui->comboBoxP4, QString())) { ++number; diff --git a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp index 560f87428..280dd1771 100644 --- a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp @@ -165,7 +165,7 @@ void DialogCubicBezierPath::ShowDialog(bool click) { if (size - VCubicBezierPath::SubSplPointsCount(path.CountSubSpl()) == 0) {// Accept only if all subpaths are completed - emit ToolTip(""); + emit ToolTip(QString()); if (not data->IsUnique(path.name())) { diff --git a/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp index 223370030..cc5b9665c 100644 --- a/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp @@ -216,7 +216,7 @@ void DialogCurveIntersectAxis::ShowDialog(bool click) SCASSERT(line != nullptr) this->SetAngle(line->Angle());//Show in dialog angle what user choose - emit ToolTip(""); + emit ToolTip(QString()); DialogAccepted();// Just set default values and don't show dialog } @@ -252,7 +252,7 @@ void DialogCurveIntersectAxis::ChosenObject(quint32 id, const SceneObject &type) case (1): if (type == SceneObject::Point) { - if (SetObject(id, ui->comboBoxAxisPoint, "")) + if (SetObject(id, ui->comboBoxAxisPoint, QString())) { line->setAxisPointId(id); line->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialogcutarc.cpp b/src/libs/vtools/dialogs/tools/dialogcutarc.cpp index 35e24464d..c187c5810 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutarc.cpp @@ -128,7 +128,7 @@ void DialogCutArc::ChosenObject(quint32 id, const SceneObject &type) { if (type == SceneObject::Arc) { - if (SetObject(id, ui->comboBoxArc, "")) + if (SetObject(id, ui->comboBoxArc, QString())) { vis->VisualMode(id); prepare = true; diff --git a/src/libs/vtools/dialogs/tools/dialogcutspline.cpp b/src/libs/vtools/dialogs/tools/dialogcutspline.cpp index 509b0b219..43fa3295b 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutspline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutspline.cpp @@ -144,7 +144,7 @@ void DialogCutSpline::ChosenObject(quint32 id, const SceneObject &type) { if (type == SceneObject::Spline) { - if (SetObject(id, ui->comboBoxSpline, "")) + if (SetObject(id, ui->comboBoxSpline, QString())) { vis->VisualMode(id); prepare = true; diff --git a/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp index a54526d9d..1981ef0b2 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp @@ -144,7 +144,7 @@ void DialogCutSplinePath::ChosenObject(quint32 id, const SceneObject &type) { if (type == SceneObject::SplinePath) { - if (SetObject(id, ui->comboBoxSplinePath, "")) + if (SetObject(id, ui->comboBoxSplinePath, QString())) { vis->VisualMode(id); prepare = true; diff --git a/src/libs/vtools/dialogs/tools/dialogellipticalarc.cpp b/src/libs/vtools/dialogs/tools/dialogellipticalarc.cpp index 5ecd35db2..35de3abb1 100644 --- a/src/libs/vtools/dialogs/tools/dialogellipticalarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogellipticalarc.cpp @@ -579,7 +579,7 @@ void DialogEllipticalArc::ChosenObject(quint32 id, const SceneObject &type) { if (type == SceneObject::Point) { - if (SetObject(id, ui->comboBoxBasePoint, "")) + if (SetObject(id, ui->comboBoxBasePoint, QString())) { vis->VisualMode(id); prepare = true; diff --git a/src/libs/vtools/dialogs/tools/dialogendline.cpp b/src/libs/vtools/dialogs/tools/dialogendline.cpp index 40b05d151..cc81496fb 100644 --- a/src/libs/vtools/dialogs/tools/dialogendline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogendline.cpp @@ -184,7 +184,7 @@ void DialogEndLine::ChosenObject(quint32 id, const SceneObject &type) { if (type == SceneObject::Point) { - if (SetObject(id, ui->comboBoxBasePoint, "")) + if (SetObject(id, ui->comboBoxBasePoint, QString())) { vis->VisualMode(id); VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); @@ -328,7 +328,7 @@ void DialogEndLine::ShowDialog(bool click) this->SetAngle(line->Angle());//Show in dialog angle what user choose this->SetFormula(line->Length()); - emit ToolTip(""); + emit ToolTip(QString()); timerFormula->start(); this->show(); } diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp index 4919875fc..8b2790822 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp @@ -183,7 +183,7 @@ void DialogFlippingByAxis::ShowDialog(bool click) else if (not stage1 && prepare && click) { setModal(true); - emit ToolTip(""); + emit ToolTip(QString()); show(); } } @@ -201,7 +201,7 @@ void DialogFlippingByAxis::ChosenObject(quint32 id, const SceneObject &type) return; } - if (SetObject(id, ui->comboBoxOriginPoint, "")) + if (SetObject(id, ui->comboBoxOriginPoint, QString())) { VisToolFlippingByAxis *operation = qobject_cast(vis); SCASSERT(operation != nullptr) diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp b/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp index afdf0fe60..e2dcef62e 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp @@ -180,7 +180,7 @@ void DialogFlippingByLine::ShowDialog(bool click) else if (not stage1 && prepare && click) { setModal(true); - emit ToolTip(""); + emit ToolTip(QString()); show(); } } @@ -219,7 +219,7 @@ void DialogFlippingByLine::ChosenObject(quint32 id, const SceneObject &type) if (getCurrentObjectId(ui->comboBoxFirstLinePoint) != id) { - if (SetObject(id, ui->comboBoxSecondLinePoint, "")) + if (SetObject(id, ui->comboBoxSecondLinePoint, QString())) { if (flagError) { diff --git a/src/libs/vtools/dialogs/tools/dialoggroup.cpp b/src/libs/vtools/dialogs/tools/dialoggroup.cpp index 893175b88..f8af05761 100644 --- a/src/libs/vtools/dialogs/tools/dialoggroup.cpp +++ b/src/libs/vtools/dialogs/tools/dialoggroup.cpp @@ -76,7 +76,7 @@ void DialogGroup::ShowDialog(bool click) SetName(tr("New group")); setModal(true); - emit ToolTip(""); + emit ToolTip(QString()); show(); } } diff --git a/src/libs/vtools/dialogs/tools/dialogheight.cpp b/src/libs/vtools/dialogs/tools/dialogheight.cpp index 73cba4626..efdff1411 100644 --- a/src/libs/vtools/dialogs/tools/dialogheight.cpp +++ b/src/libs/vtools/dialogs/tools/dialogheight.cpp @@ -212,7 +212,7 @@ void DialogHeight::ChosenObject(quint32 id, const SceneObject &type) if (set.size() == 3) { - if (SetObject(id, ui->comboBoxP2Line, "")) + if (SetObject(id, ui->comboBoxP2Line, QString())) { line->setLineP2Id(id); line->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialogline.cpp b/src/libs/vtools/dialogs/tools/dialogline.cpp index 82625aee0..b4baea835 100644 --- a/src/libs/vtools/dialogs/tools/dialogline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogline.cpp @@ -190,7 +190,7 @@ void DialogLine::ChosenObject(quint32 id, const SceneObject &type) case 1: if (getCurrentObjectId(ui->comboBoxFirstPoint) != id) { - if (SetObject(id, ui->comboBoxSecondPoint, "")) + if (SetObject(id, ui->comboBoxSecondPoint, QString())) { if (flagError) { diff --git a/src/libs/vtools/dialogs/tools/dialoglineintersect.cpp b/src/libs/vtools/dialogs/tools/dialoglineintersect.cpp index 3a2b3df84..06c1330e9 100644 --- a/src/libs/vtools/dialogs/tools/dialoglineintersect.cpp +++ b/src/libs/vtools/dialogs/tools/dialoglineintersect.cpp @@ -145,7 +145,7 @@ void DialogLineIntersect::ChosenObject(quint32 id, const SceneObject &type) if (set.size() >= 3) { - if (SetObject(id, ui->comboBoxP2Line2, "")) + if (SetObject(id, ui->comboBoxP2Line2, QString())) { line->setLine2P2Id(id); line->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp index 85da3e08c..4534de50d 100644 --- a/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp @@ -244,7 +244,7 @@ void DialogLineIntersectAxis::ShowDialog(bool click) SCASSERT(line != nullptr) this->SetAngle(line->Angle());//Show in dialog angle what user choose - emit ToolTip(""); + emit ToolTip(QString()); DialogAccepted();// Just set default values and don't show dialog } @@ -292,7 +292,7 @@ void DialogLineIntersectAxis::ChosenObject(quint32 id, const SceneObject &type) if (set.size() == 3) { - if (SetObject(id, ui->comboBoxAxisPoint, "")) + if (SetObject(id, ui->comboBoxAxisPoint, QString())) { line->setAxisPointId(id); line->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialogmove.cpp b/src/libs/vtools/dialogs/tools/dialogmove.cpp index 4560bb43d..984f71293 100644 --- a/src/libs/vtools/dialogs/tools/dialogmove.cpp +++ b/src/libs/vtools/dialogs/tools/dialogmove.cpp @@ -310,7 +310,7 @@ void DialogMove::ShowDialog(bool click) if (not optionalRotationOrigin) { operation->SetRotationOriginPointId(NULL_ID); - SetObject(NULL_ID, ui->comboBoxRotationOriginPoint, ""); + SetObject(NULL_ID, ui->comboBoxRotationOriginPoint, QString()); operation->RefreshGeometry(); } optionalRotationOrigin = false; // Handled, next click on empty filed will disable selection @@ -321,7 +321,7 @@ void DialogMove::ShowDialog(bool click) SetLength(qApp->TrVars()->FormulaFromUser(formulaLength, qApp->Settings()->GetOsSeparator())); SetRotationAngle(operation->RotationAngle()); setModal(true); - emit ToolTip(""); + emit ToolTip(QString()); timerAngle->start(); timerRotationAngle->start(); timerLength->start(); @@ -337,7 +337,7 @@ void DialogMove::ChosenObject(quint32 id, const SceneObject &type) { if (type == SceneObject::Point && QGuiApplication::keyboardModifiers() == Qt::ControlModifier) { - if (SetObject(id, ui->comboBoxRotationOriginPoint, "")) + if (SetObject(id, ui->comboBoxRotationOriginPoint, QString())) { VisToolMove *operation = qobject_cast(vis); SCASSERT(operation != nullptr) diff --git a/src/libs/vtools/dialogs/tools/dialognormal.cpp b/src/libs/vtools/dialogs/tools/dialognormal.cpp index 8037117c1..14bcf0f5b 100644 --- a/src/libs/vtools/dialogs/tools/dialognormal.cpp +++ b/src/libs/vtools/dialogs/tools/dialognormal.cpp @@ -176,7 +176,7 @@ void DialogNormal::ChosenObject(quint32 id, const SceneObject &type) case 1: if (getCurrentObjectId(ui->comboBoxFirstPoint) != id) { - if (SetObject(id, ui->comboBoxSecondPoint, "")) + if (SetObject(id, ui->comboBoxSecondPoint, QString())) { line->setObject2Id(id); line->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialogpointfromarcandtangent.cpp b/src/libs/vtools/dialogs/tools/dialogpointfromarcandtangent.cpp index ae594dfef..0288c2abc 100644 --- a/src/libs/vtools/dialogs/tools/dialogpointfromarcandtangent.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointfromarcandtangent.cpp @@ -152,7 +152,7 @@ void DialogPointFromArcAndTangent::ChosenObject(quint32 id, const SceneObject &t case 1: if (type == SceneObject::Arc) { - if (SetObject(id, ui->comboBoxArc, "")) + if (SetObject(id, ui->comboBoxArc, QString())) { number = 0; point->setArcId(id); diff --git a/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.cpp b/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.cpp index a9d5b617a..003067653 100644 --- a/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.cpp @@ -206,7 +206,7 @@ void DialogPointFromCircleAndTangent::ChosenObject(quint32 id, const SceneObject case 1: if (getCurrentObjectId(ui->comboBoxTangentPoint) != id) { - if (SetObject(id, ui->comboBoxCircleCenter, "")) + if (SetObject(id, ui->comboBoxCircleCenter, QString())) { number = 0; point->setObject2Id(id); diff --git a/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp b/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp index 123274e94..c48f75373 100644 --- a/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp @@ -197,7 +197,7 @@ void DialogPointOfContact::ChosenObject(quint32 id, const SceneObject &type) if (set.size() == 3) { - if (SetObject(id, ui->comboBoxCenter, "")) + if (SetObject(id, ui->comboBoxCenter, QString())) { line->setRadiusId(id); line->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialogpointofintersection.cpp b/src/libs/vtools/dialogs/tools/dialogpointofintersection.cpp index 054cfed02..585d6c64e 100644 --- a/src/libs/vtools/dialogs/tools/dialogpointofintersection.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointofintersection.cpp @@ -122,7 +122,7 @@ void DialogPointOfIntersection::ChosenObject(quint32 id, const SceneObject &type case 1: if (getCurrentObjectId(ui->comboBoxFirstPoint) != id) { - if (SetObject(id, ui->comboBoxSecondPoint, "")) + if (SetObject(id, ui->comboBoxSecondPoint, QString())) { line->setPoint2Id(id); line->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialogpointofintersectionarcs.cpp b/src/libs/vtools/dialogs/tools/dialogpointofintersectionarcs.cpp index 7058f1851..c7f067fc9 100644 --- a/src/libs/vtools/dialogs/tools/dialogpointofintersectionarcs.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointofintersectionarcs.cpp @@ -155,7 +155,7 @@ void DialogPointOfIntersectionArcs::ChosenObject(quint32 id, const SceneObject & case 1: if (getCurrentObjectId(ui->comboBoxArc1) != id) { - if (SetObject(id, ui->comboBoxArc2, "")) + if (SetObject(id, ui->comboBoxArc2, QString())) { number = 0; point->setArc2Id(id); diff --git a/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.cpp b/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.cpp index b06a9354d..d04f06a4a 100644 --- a/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.cpp @@ -245,7 +245,7 @@ void DialogPointOfIntersectionCircles::ChosenObject(quint32 id, const SceneObjec case 1: if (getCurrentObjectId(ui->comboBoxCircle1Center) != id) { - if (SetObject(id, ui->comboBoxCircle2Center, "")) + if (SetObject(id, ui->comboBoxCircle2Center, QString())) { number = 0; point->setObject2Id(id); diff --git a/src/libs/vtools/dialogs/tools/dialogpointofintersectioncurves.cpp b/src/libs/vtools/dialogs/tools/dialogpointofintersectioncurves.cpp index f8af8f572..f3f400cac 100644 --- a/src/libs/vtools/dialogs/tools/dialogpointofintersectioncurves.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointofintersectioncurves.cpp @@ -181,7 +181,7 @@ void DialogPointOfIntersectionCurves::ChosenObject(quint32 id, const SceneObject case 1: if (getCurrentObjectId(ui->comboBoxCurve1) != id) { - if (SetObject(id, ui->comboBoxCurve2, "")) + if (SetObject(id, ui->comboBoxCurve2, QString())) { number = 0; point->setObject2Id(id); diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.cpp b/src/libs/vtools/dialogs/tools/dialogrotation.cpp index 579a06aca..c0525f9b5 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.cpp +++ b/src/libs/vtools/dialogs/tools/dialogrotation.cpp @@ -229,7 +229,7 @@ void DialogRotation::ShowDialog(bool click) SetAngle(operation->Angle());//Show in dialog angle that a user choose setModal(true); - emit ToolTip(""); + emit ToolTip(QString()); timerAngle->start(); show(); } @@ -253,7 +253,7 @@ void DialogRotation::ChosenObject(quint32 id, const SceneObject &type) operation->SetObjects(objects.toVector()); } - if (SetObject(id, ui->comboBoxOriginPoint, "")) + if (SetObject(id, ui->comboBoxOriginPoint, QString())) { VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); SCASSERT(window != nullptr) diff --git a/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp index 783cdc8a4..448240dbe 100644 --- a/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp +++ b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp @@ -201,7 +201,7 @@ void DialogShoulderPoint::ChosenObject(quint32 id, const SceneObject &type) if (set.size() == 3) { - if (SetObject(id, ui->comboBoxP2Line, "")) + if (SetObject(id, ui->comboBoxP2Line, QString())) { line->setLineP2Id(id); line->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialogspline.cpp b/src/libs/vtools/dialogs/tools/dialogspline.cpp index 62ec79b67..5eb435993 100644 --- a/src/libs/vtools/dialogs/tools/dialogspline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogspline.cpp @@ -175,7 +175,7 @@ void DialogSpline::ChosenObject(quint32 id, const SceneObject &type) { if (getCurrentObjectId(ui->comboBoxP1) != id) { - if (SetObject(id, ui->comboBoxP4, "")) + if (SetObject(id, ui->comboBoxP4, QString())) { ++number; diff --git a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp index 888be4212..9f1b070f4 100644 --- a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp @@ -687,7 +687,7 @@ void DialogSplinePath::ShowDialog(bool click) { if (path.CountPoints() >= 3) { - emit ToolTip(""); + emit ToolTip(QString()); if (not data->IsUnique(path.name())) { diff --git a/src/libs/vtools/dialogs/tools/dialogtool.cpp b/src/libs/vtools/dialogs/tools/dialogtool.cpp index 309376244..83d1c9042 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtool.cpp @@ -168,7 +168,7 @@ DialogTool::DialogTool(const VContainer *data, const quint32 &toolId, QWidget *p //--------------------------------------------------------------------------------------------------------------------- DialogTool::~DialogTool() { - emit ToolTip(""); + emit ToolTip(QString()); if (not vis.isNull()) { @@ -327,7 +327,7 @@ void DialogTool::FillComboBoxTypeLine(QComboBox *box, const QMap QMap::const_iterator i = stylesPics.constBegin(); while (i != stylesPics.constEnd()) { - box->addItem(i.value(), "", QVariant(i.key())); + box->addItem(i.value(), QString(), QVariant(i.key())); ++i; } @@ -845,7 +845,7 @@ qreal DialogTool::Eval(const QString &text, bool &flag, QLabel *label, const QSt flag = true; ChangeColor(labelEditFormula, okColor); label->setToolTip(tr("Value")); - emit ToolTip(""); + emit ToolTip(QString()); } } } diff --git a/src/libs/vtools/dialogs/tools/dialogtriangle.cpp b/src/libs/vtools/dialogs/tools/dialogtriangle.cpp index 6621411a2..f047bad44 100644 --- a/src/libs/vtools/dialogs/tools/dialogtriangle.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtriangle.cpp @@ -148,7 +148,7 @@ void DialogTriangle::ChosenObject(quint32 id, const SceneObject &type) if (set.size() == 4) { - if (SetObject(id, ui->comboBoxSecondPoint, "")) + if (SetObject(id, ui->comboBoxSecondPoint, QString())) { line->setHypotenuseP2Id(id); line->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialogtruedarts.cpp b/src/libs/vtools/dialogs/tools/dialogtruedarts.cpp index 7782c5a5c..d04c70a92 100644 --- a/src/libs/vtools/dialogs/tools/dialogtruedarts.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtruedarts.cpp @@ -290,7 +290,7 @@ void DialogTrueDarts::ChosenObject(quint32 id, const SceneObject &type) if (set.size() == 5) { - if (SetObject(id, ui->comboBoxThirdDartPoint, "")) + if (SetObject(id, ui->comboBoxThirdDartPoint, QString())) { points->setD3PointId(id); points->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialoguniondetails.cpp b/src/libs/vtools/dialogs/tools/dialoguniondetails.cpp index f67f61a33..ee10f103e 100644 --- a/src/libs/vtools/dialogs/tools/dialoguniondetails.cpp +++ b/src/libs/vtools/dialogs/tools/dialoguniondetails.cpp @@ -174,7 +174,7 @@ void DialogUnionDetails::ChoosedDetail(const quint32 &id, const SceneObject &typ if (numberD > 1) { ++numberP; - emit ToolTip(""); + emit ToolTip(QString()); this->setModal(true); this->show(); } diff --git a/src/libs/vtools/dialogs/tools/piece/dialogduplicatedetail.cpp b/src/libs/vtools/dialogs/tools/piece/dialogduplicatedetail.cpp index 9a75421cb..e5283aea2 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogduplicatedetail.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogduplicatedetail.cpp @@ -71,7 +71,7 @@ void DialogDuplicateDetail::ShowDialog(bool click) m_mx = piece->Mx(); m_my = piece->My(); - emit ToolTip(""); + emit ToolTip(QString()); DialogAccepted(); } } diff --git a/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.cpp b/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.cpp index 0862f85d2..4802a29c7 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.cpp @@ -184,7 +184,7 @@ void DialogPiecePath::ShowDialog(bool click) { if (CreatePath().CountNodes() > 0) { - emit ToolTip(""); + emit ToolTip(QString()); prepare = true; if (not m_showMode) @@ -432,8 +432,8 @@ void DialogPiecePath::NodeChanged(int index) } else { - ui->plainTextEditFormulaWidthBefore->setPlainText(""); - ui->plainTextEditFormulaWidthAfter->setPlainText(""); + ui->plainTextEditFormulaWidthBefore->setPlainText(QString()); + ui->plainTextEditFormulaWidthAfter->setPlainText(QString()); ui->comboBoxAngle->setCurrentIndex(-1); } @@ -717,7 +717,7 @@ void DialogPiecePath::EvalVisible() { labelEditFormula = ui->labelEditVisible; QString formula = ui->plainTextEditFormulaVisible->toPlainText(); - Eval(formula, m_flagFormulaVisible, ui->labelResultVisible, "", false, true); + Eval(formula, m_flagFormulaVisible, ui->labelResultVisible, QString(), false, true); } //--------------------------------------------------------------------------------------------------------------------- @@ -806,7 +806,7 @@ void DialogPiecePath::VisibleChanged() { labelEditFormula = ui->labelEditVisible; labelResultCalculation = ui->labelResultVisible; - ValFormulaChanged(m_flagFormulaVisible, ui->plainTextEditFormulaVisible, m_timerVisible, ""); + ValFormulaChanged(m_flagFormulaVisible, ui->plainTextEditFormulaVisible, m_timerVisible, QString()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/piece/dialogpin.cpp b/src/libs/vtools/dialogs/tools/piece/dialogpin.cpp index 88267eb14..35c445ce5 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogpin.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogpin.cpp @@ -125,7 +125,7 @@ void DialogPin::ChosenObject(quint32 id, const SceneObject &type) { if (type == SceneObject::Point) { - if (SetObject(id, ui->comboBoxPoint, "")) + if (SetObject(id, ui->comboBoxPoint, QString())) { vis->VisualMode(id); CheckPoint(); diff --git a/src/libs/vtools/dialogs/tools/piece/dialogplacelabel.cpp b/src/libs/vtools/dialogs/tools/piece/dialogplacelabel.cpp index 23fca1019..63ddeb9ce 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogplacelabel.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogplacelabel.cpp @@ -266,7 +266,7 @@ void DialogPlaceLabel::ChosenObject(quint32 id, const SceneObject &type) { if (type == SceneObject::Point) { - if (SetObject(id, ui->comboBoxPoint, "")) + if (SetObject(id, ui->comboBoxPoint, QString())) { vis->VisualMode(id); CheckPoint(); diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp index 53ebd6238..4f79728d3 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp @@ -452,7 +452,7 @@ void DialogSeamAllowance::ShowDialog(bool click) { if (click == false && uiTabPaths->listWidgetMainPath->count() > 0) { - emit ToolTip(""); + emit ToolTip(QString()); prepare = true; if (not applyAllowed) diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp index 5e28b5b48..457c96577 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp @@ -223,7 +223,7 @@ void VToolCutArc::SaveOptions(QDomElement &tag, QSharedPointer &obj) //--------------------------------------------------------------------------------------------------------------------- void VToolCutArc::ReadToolAttributes(const QDomElement &domElement) { - formula = doc->GetParametrString(domElement, AttrLength, ""); + formula = doc->GetParametrString(domElement, AttrLength, QString()); curveCutId = doc->GetParametrUInt(domElement, AttrArc, NULL_ID_STR); } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp index 4b08a94f4..d3992901a 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp @@ -222,7 +222,7 @@ void VToolCutSpline::SaveOptions(QDomElement &tag, QSharedPointer &obj //--------------------------------------------------------------------------------------------------------------------- void VToolCutSpline::ReadToolAttributes(const QDomElement &domElement) { - formula = doc->GetParametrString(domElement, AttrLength, ""); + formula = doc->GetParametrString(domElement, AttrLength, QString()); curveCutId = doc->GetParametrUInt(domElement, AttrSpline, NULL_ID_STR); } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp index 5e0c0db1b..fa1aed7c3 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp @@ -313,7 +313,7 @@ void VToolCutSplinePath::SaveOptions(QDomElement &tag, QSharedPointer //--------------------------------------------------------------------------------------------------------------------- void VToolCutSplinePath::ReadToolAttributes(const QDomElement &domElement) { - formula = doc->GetParametrString(domElement, AttrLength, ""); + formula = doc->GetParametrString(domElement, AttrLength, QString()); curveCutId = doc->GetParametrUInt(domElement, AttrSplinePath, NULL_ID_STR); } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp index bf9e6d9ff..9dce8e7c3 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp @@ -123,7 +123,7 @@ void VToolAlongLine::ReadToolAttributes(const QDomElement &domElement) { m_lineType = doc->GetParametrString(domElement, AttrTypeLine, TypeLineLine); lineColor = doc->GetParametrString(domElement, AttrLineColor, ColorBlack); - formulaLength = doc->GetParametrString(domElement, AttrLength, ""); + formulaLength = doc->GetParametrString(domElement, AttrLength, QString()); basePointId = doc->GetParametrUInt(domElement, AttrFirstPoint, NULL_ID_STR); secondPointId = doc->GetParametrUInt(domElement, AttrSecondPoint, NULL_ID_STR); } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp index aefa8e91f..6eeabdca6 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp @@ -280,7 +280,7 @@ void VToolBisector::ReadToolAttributes(const QDomElement &domElement) { m_lineType = doc->GetParametrString(domElement, AttrTypeLine, TypeLineLine); lineColor = doc->GetParametrString(domElement, AttrLineColor, ColorBlack); - formulaLength = doc->GetParametrString(domElement, AttrLength, ""); + formulaLength = doc->GetParametrString(domElement, AttrLength, QString()); firstPointId = doc->GetParametrUInt(domElement, AttrFirstPoint, NULL_ID_STR); basePointId = doc->GetParametrUInt(domElement, AttrSecondPoint, NULL_ID_STR); thirdPointId = doc->GetParametrUInt(domElement, AttrThirdPoint, NULL_ID_STR); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp index b1b4e3cbe..e5a2498b0 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp @@ -315,7 +315,7 @@ void VToolCurveIntersectAxis::ReadToolAttributes(const QDomElement &domElement) lineColor = doc->GetParametrString(domElement, AttrLineColor, ColorBlack); basePointId = doc->GetParametrUInt(domElement, AttrBasePoint, NULL_ID_STR); curveId = doc->GetParametrUInt(domElement, AttrCurve, NULL_ID_STR); - formulaAngle = doc->GetParametrString(domElement, AttrAngle, ""); + formulaAngle = doc->GetParametrString(domElement, AttrAngle, QString()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp index 795a30c55..0a9abd5e9 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp @@ -208,9 +208,9 @@ void VToolEndLine::ReadToolAttributes(const QDomElement &domElement) { m_lineType = doc->GetParametrString(domElement, AttrTypeLine, TypeLineLine); lineColor = doc->GetParametrString(domElement, AttrLineColor, ColorBlack); - formulaLength = doc->GetParametrString(domElement, AttrLength, ""); + formulaLength = doc->GetParametrString(domElement, AttrLength, QString()); basePointId = doc->GetParametrUInt(domElement, AttrBasePoint, NULL_ID_STR); - formulaAngle = doc->GetParametrString(domElement, AttrAngle, ""); + formulaAngle = doc->GetParametrString(domElement, AttrAngle, QString()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp index 3176e4c2d..9ab07f906 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp @@ -285,7 +285,7 @@ void VToolLineIntersectAxis::ReadToolAttributes(const QDomElement &domElement) basePointId = doc->GetParametrUInt(domElement, AttrBasePoint, NULL_ID_STR); firstPointId = doc->GetParametrUInt(domElement, AttrP1Line, NULL_ID_STR); secondPointId = doc->GetParametrUInt(domElement, AttrP2Line, NULL_ID_STR); - formulaAngle = doc->GetParametrString(domElement, AttrAngle, ""); + formulaAngle = doc->GetParametrString(domElement, AttrAngle, QString()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp index 2c948afb2..209605ae3 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp @@ -251,7 +251,7 @@ void VToolNormal::ReadToolAttributes(const QDomElement &domElement) { m_lineType = doc->GetParametrString(domElement, AttrTypeLine, TypeLineLine); lineColor = doc->GetParametrString(domElement, AttrLineColor, ColorBlack); - formulaLength = doc->GetParametrString(domElement, AttrLength, ""); + formulaLength = doc->GetParametrString(domElement, AttrLength, QString()); basePointId = doc->GetParametrUInt(domElement, AttrFirstPoint, NULL_ID_STR); secondPointId = doc->GetParametrUInt(domElement, AttrSecondPoint, NULL_ID_STR); angle = doc->GetParametrDouble(domElement, AttrAngle, "0"); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp index 9c1db3fab..884b3a0c7 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp @@ -298,7 +298,7 @@ void VToolShoulderPoint::ReadToolAttributes(const QDomElement &domElement) { m_lineType = doc->GetParametrString(domElement, AttrTypeLine, TypeLineLine); lineColor = doc->GetParametrString(domElement, AttrLineColor, ColorBlack); - formulaLength = doc->GetParametrString(domElement, AttrLength, ""); + formulaLength = doc->GetParametrString(domElement, AttrLength, QString()); basePointId = doc->GetParametrUInt(domElement, AttrP1Line, NULL_ID_STR); p2Line = doc->GetParametrUInt(domElement, AttrP2Line, NULL_ID_STR); pShoulder = doc->GetParametrUInt(domElement, AttrPShoulder, NULL_ID_STR); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp index 6ce5a4423..525a6355f 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp @@ -310,7 +310,7 @@ void VToolPointOfContact::SaveOptions(QDomElement &tag, QSharedPointer //--------------------------------------------------------------------------------------------------------------------- void VToolPointOfContact::ReadToolAttributes(const QDomElement &domElement) { - arcRadius = doc->GetParametrString(domElement, AttrRadius, ""); + arcRadius = doc->GetParametrString(domElement, AttrRadius, QString()); center = doc->GetParametrUInt(domElement, AttrCenter, NULL_ID_STR); firstPointId = doc->GetParametrUInt(domElement, AttrFirstPoint, NULL_ID_STR); secondPointId = doc->GetParametrUInt(domElement, AttrSecondPoint, NULL_ID_STR); diff --git a/src/libs/vtools/tools/drawTools/vdrawtool.h b/src/libs/vtools/tools/drawTools/vdrawtool.h index 6614393dd..6bc8877e8 100644 --- a/src/libs/vtools/tools/drawTools/vdrawtool.h +++ b/src/libs/vtools/tools/drawTools/vdrawtool.h @@ -250,7 +250,7 @@ QString VDrawTool::ObjectName(quint32 id) const qCDebug(vTool, "Error! Couldn't get object name by id = %s. %s %s", qUtf8Printable(QString().setNum(id)), qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation())); - return QString("");// Return empty string for property browser + return QString(QString());// Return empty string for property browser } } diff --git a/src/libs/vtools/undocommands/deletepatternpiece.cpp b/src/libs/vtools/undocommands/deletepatternpiece.cpp index 13672df62..e575fce7d 100644 --- a/src/libs/vtools/undocommands/deletepatternpiece.cpp +++ b/src/libs/vtools/undocommands/deletepatternpiece.cpp @@ -47,7 +47,7 @@ DeletePatternPiece::DeletePatternPiece(VAbstractPattern *doc, const QString &nam const QDomElement previousPP = patternP.previousSibling().toElement();//find previous pattern piece if (not previousPP.isNull() && previousPP.tagName() == VAbstractPattern::TagDraw) { - previousPPName = doc->GetParametrString(previousPP, VAbstractPattern::AttrName, ""); + previousPPName = doc->GetParametrString(previousPP, VAbstractPattern::AttrName, QString()); } } diff --git a/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp b/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp index 512555351..275117b1b 100644 --- a/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp +++ b/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp @@ -295,7 +295,7 @@ void VisToolCubicBezierPath::RefreshToolTip() if (mode == Mode::Show) { - Visualization::toolTip = ""; + Visualization::toolTip = QString(); } emit ToolTip(Visualization::toolTip); } diff --git a/src/libs/vtools/visualization/path/vistoolspline.cpp b/src/libs/vtools/visualization/path/vistoolspline.cpp index 8dee321d9..714085a09 100644 --- a/src/libs/vtools/visualization/path/vistoolspline.cpp +++ b/src/libs/vtools/visualization/path/vistoolspline.cpp @@ -80,7 +80,7 @@ VisToolSpline::VisToolSpline(const VContainer *data, QGraphicsItem *parent) //--------------------------------------------------------------------------------------------------------------------- VisToolSpline::~VisToolSpline() { - emit ToolTip(""); + emit ToolTip(QString()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/visualization/path/vistoolsplinepath.cpp b/src/libs/vtools/visualization/path/vistoolsplinepath.cpp index 4cc311a92..126e9dcbd 100644 --- a/src/libs/vtools/visualization/path/vistoolsplinepath.cpp +++ b/src/libs/vtools/visualization/path/vistoolsplinepath.cpp @@ -63,7 +63,7 @@ VisToolSplinePath::VisToolSplinePath(const VContainer *data, QGraphicsItem *pare //--------------------------------------------------------------------------------------------------------------------- VisToolSplinePath::~VisToolSplinePath() { - emit ToolTip(""); + emit ToolTip(QString()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/test/ValentinaTest/tst_misc.cpp b/src/test/ValentinaTest/tst_misc.cpp index 1502e0d17..33b17ba09 100644 --- a/src/test/ValentinaTest/tst_misc.cpp +++ b/src/test/ValentinaTest/tst_misc.cpp @@ -55,18 +55,18 @@ void TST_Misc::TestRelativeFilePath_data() << "/home/user/patterns/pattern.val" << "/home/user/patterns/m.vit" << "m.vit"; QTest::newRow("Path to measurements is empty") - << "/home/user/patterns/pattern.val" << "" << ""; + << "/home/user/patterns/pattern.val" << QString() << QString(); QTest::newRow("Path to a pattern file is empty. Ablosute measurements path.") - << "" << "/home/user/patterns/m.vit" << "/home/user/patterns/m.vit"; + << QString() << "/home/user/patterns/m.vit" << "/home/user/patterns/m.vit"; QTest::newRow("Path to a pattern file is empty. Relative measurements path.") - << "" << "measurements/m.vit" << "measurements/m.vit"; + << QString() << "measurements/m.vit" << "measurements/m.vit"; QTest::newRow("Relative measurements path.") << "/home/user/patterns/pattern.val" << "../measurements/m.vit" << "../measurements/m.vit"; - QTest::newRow("Both paths are empty") << "" << "" << ""; + QTest::newRow("Both paths are empty") << QString() << QString() << QString(); QTest::newRow("Path to measurements is relative") << "/home/user/patterns/pattern.val" << "m.vit" << "m.vit"; @@ -114,15 +114,15 @@ void TST_Misc::TestAbsoluteFilePath_data() QTest::newRow("Path to measurements is empty") << QCoreApplication::applicationDirPath() + QStringLiteral("/home/user/patterns/pattern.val") - << "" << ""; + << QString() << QString(); QTest::newRow("Path to a pattern file is empty. Ablosute measurements path.") - << "" + << QString() << QCoreApplication::applicationDirPath() + QStringLiteral("/home/user/patterns/m.vit") << QCoreApplication::applicationDirPath() + QStringLiteral("/home/user/patterns/m.vit"); QTest::newRow("Path to a pattern file is empty. Relative measurements path.") - << "" + << QString() << "measurements/m.vit" << "measurements/m.vit"; @@ -131,7 +131,7 @@ void TST_Misc::TestAbsoluteFilePath_data() << "../measurements/m.vit" << QCoreApplication::applicationDirPath() + QStringLiteral("/home/user/measurements/m.vit"); - QTest::newRow("Both paths are empty") << "" << "" << ""; + QTest::newRow("Both paths are empty") << QString() << QString() << QString(); QTest::newRow("Path to measurements is relative") << QCoreApplication::applicationDirPath() + QStringLiteral("/home/user/patterns/pattern.val") @@ -153,18 +153,18 @@ void TST_Misc::TestAbsoluteFilePath_data() << "/home/user/patterns/pattern.val" << "m.vit" << "/home/user/patterns/m.vit"; QTest::newRow("Path to measurements is empty") - << "/home/user/patterns/pattern.val" << "" << ""; + << "/home/user/patterns/pattern.val" << QString() << QString(); QTest::newRow("Path to a pattern file is empty. Ablosute measurements path.") - << "" << "/home/user/patterns/m.vit" << "/home/user/patterns/m.vit"; + << QString() << "/home/user/patterns/m.vit" << "/home/user/patterns/m.vit"; QTest::newRow("Path to a pattern file is empty. Relative measurements path.") - << "" << "measurements/m.vit" << "measurements/m.vit"; + << QString() << "measurements/m.vit" << "measurements/m.vit"; QTest::newRow("Relative measurements path.") << "/home/user/patterns/pattern.val" << "../measurements/m.vit" << "/home/user/measurements/m.vit"; - QTest::newRow("Both paths are empty") << "" << "" << ""; + QTest::newRow("Both paths are empty") << QString() << QString() << QString(); QTest::newRow("Path to measurements is relative") << "/home/user/patterns/pattern.val" << "m.vit" << "/home/user/patterns/m.vit"; diff --git a/src/test/ValentinaTest/tst_qmutokenparser.cpp b/src/test/ValentinaTest/tst_qmutokenparser.cpp index 64c3513bc..8650b571d 100644 --- a/src/test/ValentinaTest/tst_qmutokenparser.cpp +++ b/src/test/ValentinaTest/tst_qmutokenparser.cpp @@ -45,7 +45,7 @@ void TST_QmuTokenParser::IsSingle_data() QTest::addColumn("formula"); QTest::addColumn("result"); - QTest::newRow("Empty string") << "" << false; + QTest::newRow("Empty string") << QString() << false; QTest::newRow("Single value") << "15.5" << true; QTest::newRow("Two digits") << "2+2" << false; QTest::newRow("Two digits") << "2-2" << false; @@ -53,7 +53,7 @@ void TST_QmuTokenParser::IsSingle_data() QTest::newRow("Digit and variable") << "2+a" << false; QTest::newRow("One variable twice") << "a+a" << false; QTest::newRow("Two variables") << "a+b" << false; - QTest::newRow("Empty string") << "" << false; + QTest::newRow("Empty string") << QString() << false; QTest::newRow("Several spaces") << " " << false; QTest::newRow("Invalid formula") << "2*)))" << false; QTest::newRow("Invalid formula") << "2*" << false; diff --git a/src/test/ValentinaTest/tst_vspline.cpp b/src/test/ValentinaTest/tst_vspline.cpp index 04a0e63d1..a00f92896 100644 --- a/src/test/ValentinaTest/tst_vspline.cpp +++ b/src/test/ValentinaTest/tst_vspline.cpp @@ -704,8 +704,8 @@ void TST_VSpline::CompareThreeWays() VSpline spl2(spl1.GetP1(), static_cast(spl1.GetP2()), static_cast(spl1.GetP3()), spl1.GetP4(), 1); spl2.SetApproximationScale(10); - VSpline spl3(spl1.GetP1(), spl1.GetP4(), spl1.GetStartAngle(), "", spl2.GetEndAngle(), "", spl2.GetC1Length(), "", - spl2.GetC2Length(), "", 1); + VSpline spl3(spl1.GetP1(), spl1.GetP4(), spl1.GetStartAngle(), QString(), spl2.GetEndAngle(), QString(), spl2.GetC1Length(), QString(), + spl2.GetC2Length(), QString(), 1); spl3.SetApproximationScale(10); QWARN("Comparing first and second splines."); diff --git a/src/test/ValentinaTest/tst_vtranslatevars.cpp b/src/test/ValentinaTest/tst_vtranslatevars.cpp index bbb630ca5..ad0d15a5a 100644 --- a/src/test/ValentinaTest/tst_vtranslatevars.cpp +++ b/src/test/ValentinaTest/tst_vtranslatevars.cpp @@ -132,7 +132,7 @@ void TST_VTranslateVars::PrepareValToUser(double d, const QLocale &locale) QString formulaToUser = locale.toString(d); if (locale.groupSeparator().isSpace()) { - formulaToUser.replace(locale.groupSeparator(), ""); + formulaToUser.replace(locale.groupSeparator(), QString()); } PrepareVal(formulaFromSystem, formulaToUser, locale);