diff options
author | David Boddie <dboddie@trolltech.com> | 2009-08-11 14:55:15 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-08-11 14:55:15 (GMT) |
commit | 71fd7e60c43392f2c21598a0c9d28b7aa5204cda (patch) | |
tree | f87b381c3660f43cd1dfba50c7e604b620684db6 /doc | |
parent | 557b8c58023ad0bdbd79bf25b770dc873a57cad1 (diff) | |
download | Qt-71fd7e60c43392f2c21598a0c9d28b7aa5204cda.zip Qt-71fd7e60c43392f2c21598a0c9d28b7aa5204cda.tar.gz Qt-71fd7e60c43392f2c21598a0c9d28b7aa5204cda.tar.bz2 |
Doc: Added information about quoting of path strings.
Task-number: None
Reviewed-by: Andy Shaw
Review-was: Tentative
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/qmake-manual.qdoc | 19 | ||||
-rw-r--r-- | doc/src/snippets/qmake/spaces.pro | 8 |
2 files changed, 17 insertions, 10 deletions
diff --git a/doc/src/qmake-manual.qdoc b/doc/src/qmake-manual.qdoc index 3363881..1463da7 100644 --- a/doc/src/qmake-manual.qdoc +++ b/doc/src/qmake-manual.qdoc @@ -262,15 +262,20 @@ Normally, variables are used to contain whitespace-separated lists of values. However, it is sometimes necessary to specify values containing - spaces. These must be quoted in the following way: + spaces. These must be quoted by using the + \l{qmake Function Reference#quote-string}{quote()} function in the following way: \snippet doc/src/snippets/qmake/quoting.pro 0 The quoted text is treated as a single item in the list of values held by - the variable. This approach is used to deal with paths that contain spaces, - particularly on the Windows platform. See the documentation for the + the variable. A similar approach is used to deal with paths that contain + spaces, particularly when defining the \l{qmake Variable Reference#INCLUDEPATH}{INCLUDEPATH} and - \l{qmake Variable Reference#LIBS}{LIBS} variables for examples. + \l{qmake Variable Reference#LIBS}{LIBS} variables for the Windows platform. + In cases like these, the \l{qmake Function Reference#quote(string)}{quote()} + function can be used in the following way: + + \snippet doc/src/snippets/qmake/spaces.pro quoting include paths with spaces \section2 Comments @@ -1377,7 +1382,8 @@ To specify a path containing spaces, quote the path using the technique mentioned in the \l{qmake Project Files#Whitespace}{qmake Project Files} document. For example, paths with spaces can be specified on Windows - and Unix platforms in the following way: + and Unix platforms by using the \l{qmake Function Reference#quote-string}{quote()} + function in the following way: \snippet doc/src/snippets/qmake/spaces.pro quoting include paths with spaces @@ -1437,7 +1443,8 @@ To specify a path containing spaces, quote the path using the technique mentioned in the \l{qmake Project Files#Whitespace}{qmake Project Files} document. For example, paths with spaces can be specified on Windows - and Unix platforms in the following way: + and Unix platforms by using the \l{qmake Function Reference#quote-string}{quote()} + function in the following way: \snippet doc/src/snippets/qmake/spaces.pro quoting library paths with spaces diff --git a/doc/src/snippets/qmake/spaces.pro b/doc/src/snippets/qmake/spaces.pro index c78e984..544ef05 100644 --- a/doc/src/snippets/qmake/spaces.pro +++ b/doc/src/snippets/qmake/spaces.pro @@ -1,9 +1,9 @@ #! [quoting library paths with spaces] -win32:LIBS += "C:/mylibs/extra libs/extra.lib" -unix:LIBS += -L"/home/user/extra libs" -lextra +win32:LIBS += $$quote(C:/mylibs/extra libs/extra.lib) +unix:LIBS += $$quote(-L/home/user/extra libs) -lextra #! [quoting library paths with spaces] #! [quoting include paths with spaces] -win32:INCLUDEPATH += "C:/mylibs/extra headers" -unix:INCLUDEPATH += "/home/user/extra headers" +win32:INCLUDEPATH += $$quote(C:/mylibs/extra headers) +unix:INCLUDEPATH += $$quote(/home/user/extra headers) #! [quoting include paths with spaces] |