Doc: Replace "C:\Documents and Settings" paths
"C:\Documents and Settings" isn't a real path anymore since Windows Vista. Replace it by C:\Users, or - in the snippet for QDesktopServices that is for demoing a path with space - with C:\Program Files. Pick-to: 6.2 6.3 5.15 Change-Id: I1bef97b6482180a6467fffcd1d62d6c168bcb389 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
23ffc22072
commit
623200643c
|
|
@ -54,7 +54,7 @@ void wrapInFunction()
|
|||
|
||||
//! [0]
|
||||
QDir("/home/user/Documents")
|
||||
QDir("C:/Documents and Settings")
|
||||
QDir("C:/Users")
|
||||
//! [0]
|
||||
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ if (d1 != d2)
|
|||
|
||||
|
||||
//! [12]
|
||||
C:/Documents and Settings/Username
|
||||
C:/Users/Username
|
||||
//! [12]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -74,9 +74,9 @@ info2.size(); // returns 56201
|
|||
//! [1]
|
||||
#ifdef Q_OS_WIN
|
||||
|
||||
QFileInfo info1("C:\\Documents and Settings\\Bob\\untabify.lnk");
|
||||
QFileInfo info1("C:\\Users\\Bob\\untabify.lnk");
|
||||
info1.isSymLink(); // returns true
|
||||
info1.absoluteFilePath(); // returns "C:/Documents and Settings/Bob/untabify.lnk"
|
||||
info1.absoluteFilePath(); // returns "C:/Users/Bob/untabify.lnk"
|
||||
info1.size(); // returns 743
|
||||
info1.symLinkTarget(); // returns "C:/Pretty++/untabify"
|
||||
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ inline void QDirPrivate::initFileEngine()
|
|||
\snippet code/src_corelib_io_qdir.cpp 0
|
||||
|
||||
On Windows, the second example above will be translated to
|
||||
\c{C:\Documents and Settings} when used to access files.
|
||||
\c{C:\Users} when used to access files.
|
||||
|
||||
Examples of relative paths:
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ mailto:user@foo.com?subject=Test&body=Just a test
|
|||
|
||||
void wrapper1() {
|
||||
//! [2]
|
||||
QDesktopServices::openUrl(QUrl("file:///C:/Documents and Settings/All Users/Desktop", QUrl::TolerantMode));
|
||||
QDesktopServices::openUrl(QUrl("file:///C:/Program Files", QUrl::TolerantMode));
|
||||
//! [2]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue