Hi QGIS-Devs,

I set up a cronjob to track changes in one QGIS projectfile which is used
as template for a bunch of users.

Apart from knowing which parts of the project file changed it would be nice
to know who saved these changes.

So i inserted the following snippet in the "writeProjectFile"- function of
my qgsproject.cpp:

  QDomElement userNode = doc->createElement(QStringLiteral("lastUser"));
  QDomText lastUser = doc->createTextNode(QgsApplication::userFullName());
  userNode.appendChild(lastUser);
  qgisNode.appendChild(userNode);

which works so I get one XML tag with the username who saved the project
file:

...
    </spatialrefsys>
  </projectCrs>
  <lastUser>Baumann Thomas</lastUser>
  <layer-tree-group>
...

This was as first try. Perhaps it would make more sense to put this
information somewhere into the metadata node.

What do you think about the idea of adding this functionality into QGIS?

regards,
Thomas
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to