Commit fa39d314 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

optimize GdbMacrosBuildStep: don't copy files which are already current

parent aef3e59c
......@@ -37,6 +37,8 @@
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
#include <QFileInfo>
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
......@@ -72,10 +74,15 @@ void GdbMacrosBuildStep::run(QFutureInterface<bool> & fi)
QDir dir;
dir.mkpath(destDir);
foreach (const QString &file, files) {
QFile destination(destDir + file);
if (destination.exists())
destination.remove();
QFile::copy(dumperPath + file, destDir + file);
QString source = dumperPath + file;
QString dest = destDir + file;
QFileInfo destInfo(dest);
if (destInfo.exists()) {
if (destInfo.lastModified() >= QFileInfo(source).lastModified())
continue;
QFile::remove(dest);
}
QFile::copy(source, dest);
}
Qt4Project *qt4Project = static_cast<Qt4Project *>(project());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment