~ubuntu-branches/ubuntu/natty/pyside/natty

« back to all changes in this revision

Viewing changes to doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Didier Raboud
  • Date: 2011-02-18 18:01:00 UTC
  • mfrom: (1.2.3 upstream) (6.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20110218180100-vaczjij7g08fzfme
Tags: 1.0.0~rc1-1
* New 1.0.0~rc1 upstream release
  - Bump the B-D chain versions:
    + apiextractor to 0.10.0-2~
    + generatorrunner to 0.6.6
    + shiboken to 1.0.0~rc1
* Update patches to ~rc1.
* debian/watch: update to handle Release Candidates too.
* Bump XS-Python-Version to >= 2.6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
info1.symLinkTarget()       # returns "/opt/pretty++/bin/untabify"
12
12
 
13
13
info2 = QFileInfo(info1.symLinkTarget())
14
 
info1.isSymLink()           # returns false
 
14
info1.isSymLink()           # returns False
15
15
info1.absoluteFilePath()    # returns "/opt/pretty++/bin/untabify"
16
16
info1.size()                # returns 56201
17
17
 
20
20
 
21
21
//! [1]
22
22
info1 = QFileInfo("C:\\Documents and Settings\\Bob\\untabify.lnk")
23
 
info1.isSymLink()           # returns true
 
23
info1.isSymLink()           # returns True
24
24
info1.absoluteFilePath()    # returns "C:/Documents and Settings/Bob/untabify.lnk"
25
25
info1.size()                # returns 743
26
26
info1.symLinkTarget()       # returns "C:/Pretty++/untabify"
27
27
 
28
28
info2 = QFileInfo(info1.symLinkTarget())
29
 
info1.isSymLink()           # returns false
 
29
info1.isSymLink()           # returns False
30
30
info1.absoluteFilePath()    # returns "C:/Pretty++/untabify"
31
31
info1.size()                # returns 63942
32
32
//! [1]
33
33
 
34
34
 
35
35
//! [2]
36
 
absolute = QString("/local/bin")
37
 
relative = QString("local/bin")
 
36
absolute = "/local/bin"
 
37
relative = "local/bin"
38
38
absFile = QFileInfo(absolute)
39
39
relFile = QFileInfo(relative)
40
40
 
41
 
QDir.setCurrent(QDir::rootPath())
 
41
QDir.setCurrent(QDir.rootPath())
42
42
# absFile and relFile now point to the same file
43
43
 
44
44
QDir.setCurrent("/tmp")