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
Kai Köhne 2022-01-06 12:58:27 +01:00
parent 23ffc22072
commit 623200643c
4 changed files with 6 additions and 6 deletions

View File

@ -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]

View File

@ -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"

View File

@ -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:

View File

@ -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]
}