diff options
author | Martin Smith <msmith@trolltech.com> | 2010-01-08 11:47:14 (GMT) |
---|---|---|
committer | Jesper Thomschutz <jesper.thomschutz@nokia.com> | 2010-01-13 09:43:14 (GMT) |
commit | 57e5efffc994509c0c92b2f6a466889127c14b98 (patch) | |
tree | c98b77c545e7af556dbd7523369104059fc6a15f | |
parent | d718754c22d1b5a6aa218f48d4b4aae57f5654df (diff) | |
download | Qt-57e5efffc994509c0c92b2f6a466889127c14b98.zip Qt-57e5efffc994509c0c92b2f6a466889127c14b98.tar.gz Qt-57e5efffc994509c0c92b2f6a466889127c14b98.tar.bz2 |
doc: Explained parameter value defaults where appropriate.
Task-number: QTBUG-6607
(cherry picked from commit 3aa77d64608f944592939c5d673f1b7dabec730f)
-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 b479915..162e65b 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 2dd0582..954c4ad 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()); } |