Fraxinus  18.10
An IGT application
cxOrderedQDomDocument.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef ORDEREDQDOMDOCUMENT_H
12 #define ORDEREDQDOMDOCUMENT_H
13 
14 #include <QDomDocument>
15 #include <QHash>
16 
17 
25 {
26 public:
28  {
29 #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
30  // set fixed hash seed
31  qSetGlobalQHashSeed(42);
32 #endif
33  mDoc = QDomDocument();
34  }
36  {
37 #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
38  // reset hash seed with new random value.
39  qSetGlobalQHashSeed(-1);
40 #endif
41  }
42 
43  QDomDocument& doc() {return mDoc; }
44 private:
45  QDomDocument mDoc;
46 };
47 
48 #endif // ORDEREDQDOMDOCUMENT_H