diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-07-15 16:46:28 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-15 19:45:49 +0200 |
commit | 922df2c2339288299fe8d9d5c781397f18532ba3 (patch) | |
tree | 69e12bceb4e64f2c74c23ce4ce793fa401fbca65 /tools/configure | |
parent | ca645afdc4f51a4002d715ae02c4c38520257774 (diff) |
don't change timestamp of unchanged files
Change-Id: Ifa5c15a37d072c6c8edb50f8a4343d99ee0dccf9
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/configureapp.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 50b31bbb95..5b62e8f106 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -4235,6 +4235,12 @@ FileWriter::FileWriter(const QString &name) bool FileWriter::flush() { QTextStream::flush(); + QFile oldFile(m_name); + if (oldFile.open(QIODevice::ReadOnly | QIODevice::Text)) { + if (oldFile.readAll() == m_buffer.data()) + return true; + oldFile.close(); + } QString dir = QFileInfo(m_name).absolutePath(); if (!QDir().mkpath(dir)) { cout << "Cannot create directory " << qPrintable(QDir::toNativeSeparators(dir)) << ".\n"; |