From 139f416237c52575b236c3b61e25796c83034567 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 13 Dec 2012 13:48:18 +0100 Subject: Remove the timestamp info in genarated files For moc, rcc and uic, then it's friendly for tools like ccache. ccache is using md5 to check file modification, but the different timestamp info will cause different md5 for same meaningful contents, it will disabled ccache. Updated the autotest for uic and rcc. Task-number: QTBUG-26589 Change-Id: I9f1dcf6cd826ad9603af6e183757bcd748c32bd1 Reviewed-by: Olivier Goffart --- src/tools/moc/moc.cpp | 6 +----- src/tools/rcc/rcc.cpp | 4 +--- src/tools/uic/uic.cpp | 3 +-- 3 files changed, 3 insertions(+), 10 deletions(-) (limited to 'src/tools') diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 96d6e9e456..5fbbd57c22 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -831,9 +831,6 @@ static void findRequiredContainers(ClassDef *cdef, QSet *requiredQtC void Moc::generate(FILE *out) { - - QDateTime dt = QDateTime::currentDateTime(); - QByteArray dstr = dt.toString().toLatin1(); QByteArray fn = filename; int i = filename.length()-1; while (i>0 && filename[i-1] != '/' && filename[i-1] != '\\') @@ -842,8 +839,7 @@ void Moc::generate(FILE *out) fn = filename.mid(i); fprintf(out, "/****************************************************************************\n" "** Meta object code from reading C++ file '%s'\n**\n" , fn.constData()); - fprintf(out, "** Created: %s\n" - "** by: The Qt Meta Object Compiler version %d (Qt %s)\n**\n" , dstr.data(), mocOutputRevision, QT_VERSION_STR); + fprintf(out, "** Created by: The Qt Meta Object Compiler version %d (Qt %s)\n**\n" , mocOutputRevision, QT_VERSION_STR); fprintf(out, "** WARNING! All changes made in this file will be lost!\n" "*****************************************************************************/\n\n"); diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp index 969b644d84..fb952e2970 100644 --- a/src/tools/rcc/rcc.cpp +++ b/src/tools/rcc/rcc.cpp @@ -793,9 +793,7 @@ bool RCCResourceLibrary::writeHeader() writeString("/****************************************************************************\n"); writeString("** Resource object code\n"); writeString("**\n"); - writeString("** Created: "); - writeByteArray(QDateTime::currentDateTime().toString().toLatin1()); - writeString("\n** by: The Resource Compiler for Qt version "); + writeString("** Created by: The Resource Compiler for Qt version "); writeByteArray(QT_VERSION_STR); writeString("\n**\n"); writeString("** WARNING! All changes made in this file will be lost!\n"); diff --git a/src/tools/uic/uic.cpp b/src/tools/uic/uic.cpp index 38b4780ec9..1188271d99 100644 --- a/src/tools/uic/uic.cpp +++ b/src/tools/uic/uic.cpp @@ -134,8 +134,7 @@ void Uic::writeCopyrightHeader(DomUI *ui) out << "/********************************************************************************\n"; out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n"; out << "**\n"; - out << "** Created: " << QDateTime::currentDateTime().toString() << "\n"; - out << "** " << QString::fromLatin1("by: Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR)); + out << "** Created by: Qt User Interface Compiler version " << QLatin1String(QT_VERSION_STR) << "\n"; out << "**\n"; out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n"; out << "********************************************************************************/\n\n"; -- cgit v1.2.3