diff options
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/utils/buildablehelperlibrary.cpp | 12 | ||||
-rw-r--r-- | src/libs/utils/buildablehelperlibrary.h | 3 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/libs/utils/buildablehelperlibrary.cpp b/src/libs/utils/buildablehelperlibrary.cpp index 3bc6b6e449..809aab9b85 100644 --- a/src/libs/utils/buildablehelperlibrary.cpp +++ b/src/libs/utils/buildablehelperlibrary.cpp @@ -322,11 +322,19 @@ bool BuildableHelperLibrary::getHelperFileInfoFor(const QStringList &validBinary return false; } -QString BuildableHelperLibrary::byInstallDataHelper(const QString &mainFilename, +QString BuildableHelperLibrary::byInstallDataHelper(const QString &sourcePath, + const QStringList &sourceFileNames, const QStringList &installDirectories, const QStringList &validBinaryFilenames) { - QDateTime sourcesModified = QFileInfo(mainFilename).lastModified(); + // find the latest change to the sources + QDateTime sourcesModified; + foreach (const QString &sourceFileName, sourceFileNames) { + const QDateTime fileModified = QFileInfo(sourcePath + sourceFileName).lastModified(); + if (fileModified.isValid() && (!sourcesModified.isValid() || fileModified > sourcesModified)) + sourcesModified = fileModified; + } + // We pretend that the lastmodified of gdbmacros.cpp is 5 minutes before what the file system says // Because afer a installation from the package the modified dates of gdbmacros.cpp // and the actual library are close to each other, but not deterministic in one direction diff --git a/src/libs/utils/buildablehelperlibrary.h b/src/libs/utils/buildablehelperlibrary.h index 5753eeccf0..1a8063541f 100644 --- a/src/libs/utils/buildablehelperlibrary.h +++ b/src/libs/utils/buildablehelperlibrary.h @@ -59,7 +59,8 @@ public: static QString qtInstallHeadersDir(const QString &qmakePath); static QString qtInstallDataDir(const QString &qmakePath); - static QString byInstallDataHelper(const QString &mainFilename, + static QString byInstallDataHelper(const QString &sourcePath, + const QStringList &sourceFileNames, const QStringList &installDirectories, const QStringList &validBinaryFilenames); |