equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the tools applications of the Qt Toolkit. |
7 ** This file is part of the tools applications of the Qt Toolkit. |
8 ** |
8 ** |
450 if (ignoreErrors) |
450 if (ignoreErrors) |
451 continue; |
451 continue; |
452 else |
452 else |
453 return false; |
453 return false; |
454 } else if (file.isFile()) { |
454 } else if (file.isFile()) { |
455 const bool arc = addFile(alias, RCCFileInfo(alias.section(slash, -1), file, language, country, |
455 const bool arc = |
456 RCCFileInfo::NoFlags, compressLevel, compressThreshold)); |
456 addFile(alias, |
|
457 RCCFileInfo(alias.section(slash, -1), |
|
458 file, |
|
459 language, |
|
460 country, |
|
461 RCCFileInfo::NoFlags, |
|
462 compressLevel, |
|
463 compressThreshold) |
|
464 ); |
457 if (!arc) |
465 if (!arc) |
458 m_failedResources.push_back(absFileName); |
466 m_failedResources.push_back(absFileName); |
459 } else { |
467 } else { |
460 QDir dir; |
468 QDir dir; |
461 if (file.isDir()) { |
469 if (file.isDir()) { |
471 QDirIterator it(dir, QDirIterator::FollowSymlinks|QDirIterator::Subdirectories); |
479 QDirIterator it(dir, QDirIterator::FollowSymlinks|QDirIterator::Subdirectories); |
472 while (it.hasNext()) { |
480 while (it.hasNext()) { |
473 it.next(); |
481 it.next(); |
474 QFileInfo child(it.fileInfo()); |
482 QFileInfo child(it.fileInfo()); |
475 if (child.fileName() != QLatin1String(".") && child.fileName() != QLatin1String("..")) { |
483 if (child.fileName() != QLatin1String(".") && child.fileName() != QLatin1String("..")) { |
476 const bool arc = addFile(alias + child.fileName(), |
484 const bool arc = |
477 RCCFileInfo(child.fileName(), child, language, country, |
485 addFile(alias + child.fileName(), |
478 RCCFileInfo::NoFlags, compressLevel, compressThreshold)); |
486 RCCFileInfo(child.fileName(), |
|
487 child, |
|
488 language, |
|
489 country, |
|
490 RCCFileInfo::NoFlags, |
|
491 compressLevel, |
|
492 compressThreshold) |
|
493 ); |
479 if (!arc) |
494 if (!arc) |
480 m_failedResources.push_back(child.fileName()); |
495 m_failedResources.push_back(child.fileName()); |
481 } |
496 } |
482 } |
497 } |
483 } |
498 } |