Commit 16a37c8e authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

https://mail.kde.org/pipermail/umbrello-devel/2020-October/022723.html

> I propose extending the <XMI.exporter> tag to contain the
> UMBRELLO_VERSION_STRING, for example:
>    <XMI.exporter>umbrello uml modeller 2.31.70-a9d91d68
>                                 http://umbrello.kde.org</XMI.exporter>

umbrello/version.h
- In function umbrelloVersion() add " (experimental)" to the version
  string if the preprocesor symbols ENABLE_WIDGET_SHOW_DOC or
  ENABLE_XMIRESOLUTION are defined.
- On defining XMI_FILE_VERSION remove the #ifdef tests.

umbrello/umldoc.cpp
- In function saveToXMI1(QIODevice&) on creating the <XMI.exporter> tag
  append umbrelloVersion() onto the content.
parent 57a1b817
......@@ -2110,7 +2110,10 @@ void UMLDoc::saveToXMI1(QIODevice& file)
// documentation.appendChild(contact);
QDomElement exporter = doc.createElement(QLatin1String("XMI.exporter"));
exporter.appendChild(doc.createTextNode(QLatin1String("umbrello uml modeller http://umbrello.kde.org")));
QString expoText(QLatin1String("umbrello uml modeller "));
expoText += QLatin1String(umbrelloVersion());
expoText += QLatin1String(" http://umbrello.kde.org");
exporter.appendChild(doc.createTextNode(expoText));
documentation.appendChild(exporter);
QDomElement exporterVersion = doc.createElement(QLatin1String("XMI.exporterVersion"));
......
......@@ -24,15 +24,14 @@ inline QByteArray umbrelloVersion()
.arg(KDE::versionMajor()-2)
.arg(KDE::versionMinor())
.arg(KDE::versionRelease());
#endif
#if defined(ENABLE_WIDGET_SHOW_DOC) || defined(ENABLE_XMIRESOLUTION)
versionStr.append(QLatin1String(" (experimental)"));
#endif
return versionStr.toLatin1();
}
// Update this version and dtd's in doc/xml when changing the XMI file format
#if defined(ENABLE_WIDGET_SHOW_DOC) || defined(ENABLE_XMIRESOLUTION)
#define XMI_FILE_VERSION "1.6.19"
#else
#define XMI_FILE_VERSION "1.6.18"
#endif
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment