diff options
author | Martin Smith <msmith@trolltech.com> | 2010-01-08 11:47:14 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-01-08 11:47:14 (GMT) |
commit | 3aa77d64608f944592939c5d673f1b7dabec730f (patch) | |
tree | 05be66b2abf97e760bc2382e33f1e492b8b4901e | |
parent | 55c983e33d974d046d8deab8b68b85efdb9eb03a (diff) | |
download | Qt-3aa77d64608f944592939c5d673f1b7dabec730f.zip Qt-3aa77d64608f944592939c5d673f1b7dabec730f.tar.gz Qt-3aa77d64608f944592939c5d673f1b7dabec730f.tar.bz2 |
doc: Explained parameter value defaults where appropriate.
Task-number: QTBUG-6607
-rw-r--r-- | doc/src/development/rcc.qdoc | 50 | ||||
-rw-r--r-- | src/tools/rcc/rcc.cpp | 25 |
2 files changed, 47 insertions, 28 deletions
diff --git a/doc/src/development/rcc.qdoc b/doc/src/development/rcc.qdoc index ff82674..8c6c8fb 100644 --- a/doc/src/development/rcc.qdoc +++ b/doc/src/development/rcc.qdoc @@ -57,37 +57,41 @@ \table \header \o Option \o Argument \o Description - \row \o \c{-o} \o \o Writes output to file rather than - stdout. + \row \o \c{-o} \o \c{file} \o Writes output to \c{file} rather than + stdout. - \row \o \c{-name} \o \c name \o Creates an external initialization - function with name. + \row \o \c{-name} \o \c{name} \o Creates an external initialization + function with \c{name}. - \row \o \c{-threshold} \o \c level \o Specifies a threshold (in bytes) - to use when compressing files. If - the file is smaller than the - threshold, it will not be - compressed, independent of what - the compression level is. + \row \o \c{-threshold} \o \c{level} \o Specifies a threshold \c{level} (in + bytes) to use when deciding whether + to compress a file. If the file is + smaller than the threshold \c{level}, + it is not compressed. The default + threshold level is 70 bytes. - \row \o \c{-compress} \o \c level \o Compresses input files with the - given level. Level is an integer - from 1 to 9 - 1 being the fastest, - producing the least compression; - 9 being the slowest, producing - the most compression. + \row \o \c{-compress} \o \c{level} \o Compress input files to the given + compression \{level}, which is an + integer in the range 1 to 9. Level 1 + does the least compression but is + fastest. Level 9 does the most + compression but is slowest. To turn + off compression, use \c{-no-compress}. + The default value for \c{level} is -1, + which means use zlib's default + compression level. - \row \o \c{-root} \o \c path \o Prefixes the resource access path - with root path. + \row \o \c{-root} \o \c{path} \o Prefix the resource access path with \c{path}. + The default is no prefix. - \row \o \c{-no-compress} \o \o Disables all compression. + \row \o \c{-no-compress} \o \o Disables all compression. - \row \o \c{-binary} \o \o Outputs a binary file for use as - a dynamic resource. + \row \o \c{-binary} \o \o Outputs a binary file for use as a dynamic resource. - \row \o \c{-version} \o \o Displays version information. + \row \o \c{-version} \o \o Displays version information. + + \row \o \c{-help} \o \o Displays usage information. - \row \o \c{-help} \o \o Displays usage information. \endtable See also \l{The Qt Resource System} for more information about embedding diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp index 33653d6..e41cd55 100644 --- a/src/tools/rcc/rcc.cpp +++ b/src/tools/rcc/rcc.cpp @@ -452,8 +452,16 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice, else return false; } else if (file.isFile()) { - const bool arc = addFile(alias, RCCFileInfo(alias.section(slash, -1), file, language, country, - RCCFileInfo::NoFlags, compressLevel, compressThreshold)); + const bool arc = + addFile(alias, + RCCFileInfo(alias.section(slash, -1), + file, + language, + country, + RCCFileInfo::NoFlags, + compressLevel, + compressThreshold) + ); if (!arc) m_failedResources.push_back(absFileName); } else { @@ -473,9 +481,16 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice, it.next(); QFileInfo child(it.fileInfo()); if (child.fileName() != QLatin1String(".") && child.fileName() != QLatin1String("..")) { - const bool arc = addFile(alias + child.fileName(), - RCCFileInfo(child.fileName(), child, language, country, - RCCFileInfo::NoFlags, compressLevel, compressThreshold)); + const bool arc = + addFile(alias + child.fileName(), + RCCFileInfo(child.fileName(), + child, + language, + country, + RCCFileInfo::NoFlags, + compressLevel, + compressThreshold) + ); if (!arc) m_failedResources.push_back(child.fileName()); } |