LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File make-qdbusxml2cpp-output-reproducible.patch of Package libqt5-qtbase (Project home:jmairboeck)

--- src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp.old	2014-12-05 17:24:31.000000000 +0100
+++ src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp	2015-02-03 16:11:26.574739176 +0100
@@ -32,7 +32,6 @@
 ****************************************************************************/
 
 #include <qbytearray.h>
-#include <qdatetime.h>
 #include <qdebug.h>
 #include <qfile.h>
 #include <qfileinfo.h>
@@ -58,7 +57,6 @@ static QString parentClassName;
 static QString proxyFile;
 static QString adaptorFile;
 static QString inputFile;
-static QDateTime classCreationTime;
 static bool skipNamespaces;
 static bool verbose;
 static bool includeMocs;
@@ -212,10 +210,8 @@ static QDBusIntrospection::Interfaces re
     QFile input(inputFile);
     if (inputFile.isEmpty() || inputFile == QLatin1String("-")) {
         input.open(stdin, QIODevice::ReadOnly);
-        classCreationTime = QDateTime::currentDateTime();
     } else {
         input.open(QIODevice::ReadOnly);
-        classCreationTime = QFileInfo(input).lastModified();
     }
 
     QByteArray data = input.readAll();
@@ -551,9 +547,8 @@ static void writeProxy(const QString &fi
     } else {
         includeGuard = QLatin1String("QDBUSXML2CPP_PROXY");
     }
-    includeGuard = QString(QLatin1String("%1_%2"))
-                   .arg(includeGuard)
-                   .arg(classCreationTime.toTime_t());
+    includeGuard = QString(QLatin1String("%1"))
+                   .arg(includeGuard);
     hs << "#ifndef " << includeGuard << endl
        << "#define " << includeGuard << endl
        << endl;
@@ -859,9 +854,8 @@ static void writeAdaptor(const QString &
     } else {
         includeGuard = QLatin1String("QDBUSXML2CPP_ADAPTOR");
     }
-    includeGuard = QString(QLatin1String("%1_%2"))
-                   .arg(includeGuard)
-                   .arg(QDateTime::currentDateTime().toTime_t());
+    includeGuard = QString(QLatin1String("%1"))
+                   .arg(includeGuard);
     hs << "#ifndef " << includeGuard << endl
        << "#define " << includeGuard << endl
        << endl;