diff --git a/src/app/valentina/dialogs/dialogpatternproperties.cpp b/src/app/valentina/dialogs/dialogpatternproperties.cpp index b4c0c7d3e..29abd4796 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.cpp +++ b/src/app/valentina/dialogs/dialogpatternproperties.cpp @@ -170,7 +170,7 @@ DialogPatternProperties::DialogPatternProperties(const QString &filePath, VPatte ui->lineEditPatternNumber->setText(doc->GetPatternNumber()); ui->lineEditCompanyName->setText(doc->GetCompanyName()); ui->lineEditCustomerName->setText(doc->GetCustomerName()); - ui->labelCreationDate->setText(doc->GetCreationDate().toString(Qt::SystemLocaleLongDate)); + ui->labelCreationDate->setText(QDate::currentDate().toString(Qt::SystemLocaleLongDate)); ui->lineEditSize->setText(doc->GetPatternSize()); ui->checkBoxShowDate->setChecked(doc->IsDateVisible()); diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index 71e77ccc3..a1b4d8e53 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -486,7 +486,7 @@ void MainWindowsNoGUI::PrepareDetailsForLayout(const QHash *de QDate date; if (pDoc->IsDateVisible() == true) { - date = pDoc->GetCreationDate(); + date = QDate::currentDate(); } det.SetPatternInfo(pDoc->GetPatternName(), pDoc->GetPatternNumber(), pDoc->GetPatternSize(), pDoc->GetCompanyName(), pDoc->GetCustomerName(), date, geom, qApp->font()); diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 29f1fb9d3..901a8045a 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -83,11 +83,6 @@ void VPattern::CreateEmptyFile() version.appendChild(newNodeText); patternElement.appendChild(version); - QDomElement domCreated = createElement(TagCreationDate); - QDomText domCreatedText = createTextNode(QDate::currentDate().toString("d.M.yyyy")); - domCreated.appendChild(domCreatedText); - patternElement.appendChild(domCreated); - QDomElement unit = createElement(TagUnit); newNodeText = createTextNode(UnitsToStr(qApp->patternUnit())); unit.appendChild(newNodeText); @@ -139,7 +134,7 @@ void VPattern::Parse(const Document &parse) QStringList tags = QStringList() << TagDraw << TagIncrements << TagAuthor << TagDescription << TagNotes << TagMeasurements << TagVersion << TagGradation << TagImage << TagUnit << TagPatternName << TagPatternNum << TagCompanyName << TagCustomerName - << TagCreationDate << TagSize << TagShowDate; + << TagSize << TagShowDate; PrepareForParse(parse); QDomNode domNode = documentElement().firstChild(); while (domNode.isNull() == false) @@ -211,13 +206,10 @@ void VPattern::Parse(const Document &parse) case 13: // TagCustomerName qCDebug(vXML, "Customer name."); break; - case 14: // TagCreationDate - qCDebug(vXML, "Creation date."); - break; - case 15: // TagSize + case 14: // TagSize qCDebug(vXML, "Size"); break; - case 16: + case 15: qCDebug(vXML, "Show creation date"); break; default: diff --git a/src/libs/ifc/schema/pattern/v0.3.3.xsd b/src/libs/ifc/schema/pattern/v0.3.3.xsd index 0f24bcc0c..26f4b412f 100644 --- a/src/libs/ifc/schema/pattern/v0.3.3.xsd +++ b/src/libs/ifc/schema/pattern/v0.3.3.xsd @@ -22,7 +22,6 @@ - diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index ab85684cd..1dedb2bb1 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -67,7 +67,6 @@ const QString VAbstractPattern::TagPatternName = QStringLiteral("patternName"); const QString VAbstractPattern::TagPatternNum = QStringLiteral("patternNumber"); const QString VAbstractPattern::TagCustomerName = QStringLiteral("customer"); const QString VAbstractPattern::TagCompanyName = QStringLiteral("company"); -const QString VAbstractPattern::TagCreationDate = QStringLiteral("created"); const QString VAbstractPattern::TagSize = QStringLiteral("size"); const QString VAbstractPattern::TagShowDate = QStringLiteral("showDate"); @@ -1056,29 +1055,6 @@ void VAbstractPattern::SetCustomerName(QString qsName) emit patternChanged(false); } -//--------------------------------------------------------------------------------------------------------------------- -QDate VAbstractPattern::GetCreationDate() const -{ - QStringList qsl = UniqueTagText(TagCreationDate).split("."); - if (qsl.count() == 3) - { - bool bDay; - bool bMonth; - bool bYear; - int iDay = qsl[0].toInt(&bDay); - int iMonth = qsl[1].toInt(&bMonth); - int iYear = qsl[2].toInt(&bYear); - - if (bDay == true && bMonth == true && bYear == true) - { - QDate date; - date.setDate(iYear, iMonth, iDay); - return date; - } - } - return QDate::currentDate(); -} - //--------------------------------------------------------------------------------------------------------------------- QString VAbstractPattern::GetPatternSize() const { @@ -1211,7 +1187,7 @@ QDomElement VAbstractPattern::CheckTagExists(const QString &tag) { const QStringList tags = QStringList() << TagUnit << TagImage << TagAuthor << TagDescription << TagNotes << TagGradation << TagPatternName << TagPatternNum << TagCompanyName - << TagCustomerName << TagCreationDate << TagSize << TagShowDate; + << TagCustomerName << TagSize << TagShowDate; switch (tags.indexOf(tag)) { case 0: //TagUnit @@ -1272,17 +1248,12 @@ QDomElement VAbstractPattern::CheckTagExists(const QString &tag) element = createElement(TagCustomerName); break; } - case 10: // TagPatternName - { - element = createElement(TagCreationDate); - break; - } - case 11: // TagSize + case 10: // TagSize { element = createElement(TagSize); break; } - case 12: // TagShowDate + case 11: // TagShowDate { element = createElement(TagShowDate); break; diff --git a/src/libs/ifc/xml/vabstractpattern.h b/src/libs/ifc/xml/vabstractpattern.h index c9e8d9380..7c8cfad3f 100644 --- a/src/libs/ifc/xml/vabstractpattern.h +++ b/src/libs/ifc/xml/vabstractpattern.h @@ -116,7 +116,6 @@ public: void SetPatternNumber(QString qsNum); QString GetCustomerName() const; void SetCustomerName(QString qsName); - QDate GetCreationDate() const; QString GetPatternSize() const; void SetPatternSize(QString qsSize); bool IsDateVisible() const; @@ -177,8 +176,7 @@ public: static const QString TagPatternNum; static const QString TagCompanyName; static const QString TagCustomerName; - static const QString TagCreationDate; - static const QString TagSize; + static const QString TagSize; static const QString TagShowDate; static const QString AttrName; diff --git a/src/libs/vtools/tools/vtooldetail.cpp b/src/libs/vtools/tools/vtooldetail.cpp index 3b77db5a3..5d5429acf 100644 --- a/src/libs/vtools/tools/vtooldetail.cpp +++ b/src/libs/vtools/tools/vtooldetail.cpp @@ -833,7 +833,7 @@ void VToolDetail::UpdatePatternInfo() tl.m_eFontWeight = QFont::Normal; tl.m_eStyle = QFont::StyleNormal; tl.m_iFontSize = 0; - QStringList qslDate = doc->GetCreationDate().toString(Qt::SystemLocaleLongDate).split(", "); + QStringList qslDate = QDate::currentDate().toString(Qt::SystemLocaleLongDate).split(", "); tl.m_qsText = qslDate.last(); patternInfo->AddLine(tl); }