diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-07-06 13:14:58 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-08-18 17:09:23 +0000 |
commit | 81f54e5dd8b460f5896153a5045e77f68218dd1b (patch) | |
tree | 159186b7d7a33d5750a06cd005dd46917c773c8d /tools/configure/environment.cpp | |
parent | 0b93d1a10a0d52ea7f5598508b7bf9a20f1d16ec (diff) |
Remove some dead code from the configures
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: If725ae0abee4d636ac8775c53e34ab138d360905
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'tools/configure/environment.cpp')
-rw-r--r-- | tools/configure/environment.cpp | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 5189883901..dfcc322065 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -431,69 +431,6 @@ QString Environment::execute(const QString &command, int *returnCode) return output; } -/*! - Copies the \a srcDir contents into \a destDir. - - Returns true if copying was successful. -*/ -bool Environment::cpdir(const QString &srcDir, const QString &destDir) -{ - QString cleanSrcName = QDir::cleanPath(srcDir); - QString cleanDstName = QDir::cleanPath(destDir); - -#ifdef CONFIGURE_DEBUG_CP_DIR - qDebug() << "Attempt to cpdir " << cleanSrcName << "->" << cleanDstName; -#endif - if(!QFile::exists(cleanDstName) && !QDir().mkpath(cleanDstName)) { - qDebug() << "cpdir: Failure to create " << cleanDstName; - return false; - } - - bool result = true; - QDir dir = QDir(cleanSrcName); - QFileInfoList allEntries = dir.entryInfoList(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot); - for (int i = 0; result && (i < allEntries.count()); ++i) { - QFileInfo entry = allEntries.at(i); - bool intermediate = true; - if (entry.isDir()) { - intermediate = cpdir(QString("%1/%2").arg(cleanSrcName).arg(entry.fileName()), - QString("%1/%2").arg(cleanDstName).arg(entry.fileName())); - } else { - QString destFile = QString("%1/%2").arg(cleanDstName).arg(entry.fileName()); -#ifdef CONFIGURE_DEBUG_CP_DIR - qDebug() << "About to cp (file)" << entry.absoluteFilePath() << "->" << destFile; -#endif - QFile::remove(destFile); - intermediate = QFile::copy(entry.absoluteFilePath(), destFile); - SetFileAttributes((wchar_t*)destFile.utf16(), FILE_ATTRIBUTE_NORMAL); - } - if (!intermediate) { - qDebug() << "cpdir: Failure for " << entry.fileName() << entry.isDir(); - result = false; - } - } - return result; -} - -bool Environment::rmdir(const QString &name) -{ - bool result = true; - QString cleanName = QDir::cleanPath(name); - - QDir dir = QDir(cleanName); - QFileInfoList allEntries = dir.entryInfoList(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot); - for (int i = 0; result && (i < allEntries.count()); ++i) { - QFileInfo entry = allEntries.at(i); - if (entry.isDir()) { - result &= rmdir(entry.absoluteFilePath()); - } else { - result &= QFile::remove(entry.absoluteFilePath()); - } - } - result &= dir.rmdir(cleanName); - return result; -} - static QStringList splitPathList(const QString &path) { #if defined(Q_OS_WIN) |