summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2012-03-20 19:37:07 +0100
committerQt by Nokia <qt-info@nokia.com>2012-04-19 07:34:53 +0200
commit0bc02fd0d61d1e4aed9b39890d28975dff30e822 (patch)
treee967ab719c7f8df24c35b088bd48e0f5b0942148 /src/corelib/io
parent7f0c130be963de90d1baeb037820b17a4f298700 (diff)
Doc: Prepare for building modular QtCore docs.
This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qabstractfileengine.cpp20
-rw-r--r--src/corelib/io/qbuffer.cpp10
-rw-r--r--src/corelib/io/qdatastream.cpp26
-rw-r--r--src/corelib/io/qdebug.cpp6
-rw-r--r--src/corelib/io/qdir.cpp62
-rw-r--r--src/corelib/io/qdiriterator.cpp2
-rw-r--r--src/corelib/io/qfile.cpp22
-rw-r--r--src/corelib/io/qfileinfo.cpp34
-rw-r--r--src/corelib/io/qiodevice.cpp56
-rw-r--r--src/corelib/io/qprocess.cpp30
-rw-r--r--src/corelib/io/qresource.cpp2
-rw-r--r--src/corelib/io/qsettings.cpp104
-rw-r--r--src/corelib/io/qstandardpaths.cpp2
-rw-r--r--src/corelib/io/qtemporarydir.cpp2
-rw-r--r--src/corelib/io/qtemporaryfile.cpp2
-rw-r--r--src/corelib/io/qtextstream.cpp38
-rw-r--r--src/corelib/io/qurl.cpp28
17 files changed, 223 insertions, 223 deletions
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp
index 021698115c..6c10c6cb00 100644
--- a/src/corelib/io/qabstractfileengine.cpp
+++ b/src/corelib/io/qabstractfileengine.cpp
@@ -87,7 +87,7 @@ QT_BEGIN_NAMESPACE
For example:
- \snippet doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp 0
+ \snippet code/src_corelib_io_qabstractfileengine.cpp 0
When the handler is destroyed, it is automatically removed from Qt.
@@ -184,7 +184,7 @@ QAbstractFileEngine *qt_custom_file_engine_handler_create(const QString &path)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp 1
+ \snippet code/src_corelib_io_qabstractfileengine.cpp 1
\sa QAbstractFileEngine::create()
*/
@@ -461,7 +461,7 @@ bool QAbstractFileEngine::isSequential() const
This virtual function must be reimplemented by all subclasses.
- \sa setFileName() rmdir()
+ \sa setFileName(), rmdir()
*/
bool QAbstractFileEngine::remove()
{
@@ -515,7 +515,7 @@ bool QAbstractFileEngine::link(const QString &newName)
This virtual function must be reimplemented by all subclasses.
- \sa setFileName() rmdir() isRelativePath()
+ \sa setFileName(), rmdir(), isRelativePath()
*/
bool QAbstractFileEngine::mkdir(const QString &dirName, bool createParentDirectories) const
{
@@ -535,7 +535,7 @@ bool QAbstractFileEngine::mkdir(const QString &dirName, bool createParentDirecto
This virtual function must be reimplemented by all subclasses.
- \sa setFileName() remove() mkdir() isRelativePath()
+ \sa setFileName(), remove(), mkdir(), isRelativePath()
*/
bool QAbstractFileEngine::rmdir(const QString &dirName, bool recurseParentDirectories) const
{
@@ -671,7 +671,7 @@ QString QAbstractFileEngine::fileName(FileName file) const
This virtual function must be reimplemented by all subclasses.
- \sa owner() setFileName(), FileOwner
+ \sa owner(), setFileName(), FileOwner
*/
uint QAbstractFileEngine::ownerId(FileOwner owner) const
{
@@ -687,7 +687,7 @@ uint QAbstractFileEngine::ownerId(FileOwner owner) const
This virtual function must be reimplemented by all subclasses.
- \sa ownerId() setFileName(), FileOwner
+ \sa ownerId(), setFileName(), FileOwner
*/
QString QAbstractFileEngine::owner(FileOwner owner) const
{
@@ -821,7 +821,7 @@ bool QAbstractFileEngine::unmap(uchar *address)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp 2
+ \snippet code/src_corelib_io_qabstractfileengine.cpp 2
QAbstractFileEngineIterator is associated with a path, name filters, and
entry filters. The path is the directory that the iterator lists entries
@@ -846,7 +846,7 @@ bool QAbstractFileEngine::unmap(uchar *address)
Here is an example of how to implement an iterator that returns each of
three fixed entries in sequence.
- \snippet doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp 3
+ \snippet code/src_corelib_io_qabstractfileengine.cpp 3
Note: QAbstractFileEngineIterator does not deal with QDir::IteratorFlags;
it simply returns entries for a single directory.
@@ -1080,7 +1080,7 @@ qint64 QAbstractFileEngine::write(const char *data, qint64 len)
}
/*!
- This function reads one line, terminated by a '\n' character, from the
+ This function reads one line, terminated by a '\\n' character, from the
file info \a data. At most \a maxlen characters will be read. The
end-of-line character is included.
*/
diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp
index dfc85a434d..af71af1fc4 100644
--- a/src/corelib/io/qbuffer.cpp
+++ b/src/corelib/io/qbuffer.cpp
@@ -112,7 +112,7 @@ QByteArray QBufferPrivate::peek(qint64 maxSize)
interface. The QByteArray is treated just as a standard random-accessed
file. Example:
- \snippet doc/src/snippets/buffer/buffer.cpp 0
+ \snippet buffer/buffer.cpp 0
By default, an internal QByteArray buffer is created for you when
you create a QBuffer. You can access this buffer directly by
@@ -130,12 +130,12 @@ QByteArray QBufferPrivate::peek(qint64 maxSize)
The following code snippet shows how to write data to a
QByteArray using QDataStream and QBuffer:
- \snippet doc/src/snippets/buffer/buffer.cpp 1
+ \snippet buffer/buffer.cpp 1
Effectively, we convert the application's QPalette into a byte
array. Here's how to read the data from the QByteArray:
- \snippet doc/src/snippets/buffer/buffer.cpp 2
+ \snippet buffer/buffer.cpp 2
QTextStream and QDataStream also provide convenience constructors
that take a QByteArray and that create a QBuffer behind the
@@ -194,7 +194,7 @@ QBuffer::QBuffer(QObject *parent)
Example:
- \snippet doc/src/snippets/buffer/buffer.cpp 3
+ \snippet buffer/buffer.cpp 3
\sa open(), setBuffer(), setData()
*/
@@ -230,7 +230,7 @@ QBuffer::~QBuffer()
Example:
- \snippet doc/src/snippets/buffer/buffer.cpp 4
+ \snippet buffer/buffer.cpp 4
If \a byteArray is 0, the buffer creates its own internal
QByteArray to work on. This byte array is initially empty.
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp
index 1fe2a793a6..559c5a0743 100644
--- a/src/corelib/io/qdatastream.cpp
+++ b/src/corelib/io/qdatastream.cpp
@@ -81,11 +81,11 @@ QT_BEGIN_NAMESPACE
Example (write binary data to a stream):
- \snippet doc/src/snippets/code/src_corelib_io_qdatastream.cpp 0
+ \snippet code/src_corelib_io_qdatastream.cpp 0
Example (read binary data from a stream):
- \snippet doc/src/snippets/code/src_corelib_io_qdatastream.cpp 1
+ \snippet code/src_corelib_io_qdatastream.cpp 1
Each item written to the stream is written in a predefined binary
format that varies depending on the item's type. Supported Qt
@@ -119,7 +119,7 @@ QT_BEGIN_NAMESPACE
compatibility, you can hardcode the version number in the
application:
- \snippet doc/src/snippets/code/src_corelib_io_qdatastream.cpp 2
+ \snippet code/src_corelib_io_qdatastream.cpp 2
If you are producing a new binary data format, such as a file
format for documents created by your application, you could use a
@@ -127,11 +127,11 @@ QT_BEGIN_NAMESPACE
would write a brief header containing a magic string and a version
number to give yourself room for future expansion. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qdatastream.cpp 3
+ \snippet code/src_corelib_io_qdatastream.cpp 3
Then read it in with:
- \snippet doc/src/snippets/code/src_corelib_io_qdatastream.cpp 4
+ \snippet code/src_corelib_io_qdatastream.cpp 4
You can select which byte order to use when serializing data. The
default setting is big endian (MSB first). Changing it to little
@@ -187,7 +187,7 @@ QT_BEGIN_NAMESPACE
defined, check the \b {Related Non-Members} section of the
class's documentation page.
- \sa QTextStream QVariant
+ \sa QTextStream, QVariant
*/
/*!
@@ -421,7 +421,7 @@ bool QDataStream::atEnd() const
\since 4.6
- \sa FloatingPointPrecision setFloatingPointPrecision()
+ \sa FloatingPointPrecision, setFloatingPointPrecision()
*/
QDataStream::FloatingPointPrecision QDataStream::floatingPointPrecision() const
{
@@ -455,7 +455,7 @@ void QDataStream::setFloatingPointPrecision(QDataStream::FloatingPointPrecision
/*!
Returns the status of the data stream.
- \sa Status setStatus() resetStatus()
+ \sa Status, setStatus(), resetStatus()
*/
QDataStream::Status QDataStream::status() const
@@ -466,7 +466,7 @@ QDataStream::Status QDataStream::status() const
/*!
Resets the status of the data stream.
- \sa Status status() setStatus()
+ \sa Status, status(), setStatus()
*/
void QDataStream::resetStatus()
{
@@ -479,7 +479,7 @@ void QDataStream::resetStatus()
Subsequent calls to setStatus() are ignored until resetStatus()
is called.
- \sa Status status() resetStatus()
+ \sa Status, status(), resetStatus()
*/
void QDataStream::setStatus(Status status)
{
@@ -589,7 +589,7 @@ void QDataStream::setByteOrder(ByteOrder bo)
The \l Version enum provides symbolic constants for the different
versions of Qt. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qdatastream.cpp 5
+ \snippet code/src_corelib_io_qdatastream.cpp 5
\sa version(), Version
*/
@@ -813,7 +813,7 @@ QDataStream &QDataStream::operator>>(double &f)
/*!
\overload
- Reads the '\0'-terminated string \a s from the stream and returns
+ Reads the '\\0'-terminated string \a s from the stream and returns
a reference to the stream.
Space for the string is allocated using \c new -- the caller must
@@ -1094,7 +1094,7 @@ QDataStream &QDataStream::operator<<(double f)
/*!
\overload
- Writes the '\0'-terminated string \a s to the stream and returns a
+ Writes the '\\0'-terminated string \a s to the stream and returns a
reference to the stream.
The string is serialized using writeBytes().
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp
index 6726537842..a9d0fd4b3f 100644
--- a/src/corelib/io/qdebug.cpp
+++ b/src/corelib/io/qdebug.cpp
@@ -63,7 +63,7 @@
In the common case, it is useful to call the qDebug() function to obtain a
default QDebug object to use for writing debugging information.
- \snippet doc/src/snippets/qdebug/qdebugsnippet.cpp 1
+ \snippet qdebug/qdebugsnippet.cpp 1
This constructs a QDebug object using the constructor that accepts a QtMsgType
value of QtDebugMsg. Similarly, the qWarning(), qCritical() and qFatal()
@@ -80,7 +80,7 @@
most Qt value types. To add support for custom types, you need to implement a
streaming operator, as in the following example:
- \snippet doc/src/snippets/qdebug/qdebugsnippet.cpp 0
+ \snippet qdebug/qdebugsnippet.cpp 0
This is described in the \l{Debugging Techniques} and
\l{Creating Custom Qt Types#Making the Type Printable}{Creating Custom Qt Types}
@@ -251,7 +251,7 @@
/*!
\fn QDebug &QDebug::operator<<(const char *s)
- Writes the '\0'-terminated string, \a s, to the stream and returns a
+ Writes the '\\0'-terminated string, \a s, to the stream and returns a
reference to the stream.
*/
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 23bf3c5f4b..222192b11c 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -358,14 +358,14 @@ inline void QDirPrivate::initFileEngine()
Examples of absolute paths:
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 0
+ \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.
Examples of relative paths:
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 1
+ \snippet code/src_corelib_io_qdir.cpp 1
You can use the isRelative() or isAbsolute() functions to check if
a QDir is using a relative or an absolute file path. Call
@@ -382,7 +382,7 @@ inline void QDirPrivate::initFileEngine()
the location of the directory. However, it can also return "." if
the QDir represents the current directory.
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 2
+ \snippet code/src_corelib_io_qdir.cpp 2
The path for a directory can also be changed with the cd() and cdUp()
functions, both of which operate like familiar shell commands.
@@ -418,7 +418,7 @@ inline void QDirPrivate::initFileEngine()
file or directory. Neither of these functions checks for the
existence of files or directory; they only construct paths.
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 3
+ \snippet code/src_corelib_io_qdir.cpp 3
Files can be removed by using the remove() function. Directories
cannot be removed in the same way as files; use rmdir() to remove
@@ -490,19 +490,19 @@ inline void QDirPrivate::initFileEngine()
Check if a directory exists:
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 4
+ \snippet code/src_corelib_io_qdir.cpp 4
(We could also use the static convenience function
QFile::exists().)
Traversing directories and reading a file:
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 5
+ \snippet code/src_corelib_io_qdir.cpp 5
A program that lists all the files in the current directory
(excluding symbolic links), sorted by size, smallest first:
- \snippet doc/src/snippets/qdir-listfiles/main.cpp 0
+ \snippet qdir-listfiles/main.cpp 0
\sa QFileInfo, QFile, QFileDialog, QApplication::applicationDirPath(), {Find Files Example}
*/
@@ -630,7 +630,7 @@ QString QDir::absolutePath() const
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 6
+ \snippet code/src_corelib_io_qdir.cpp 6
\sa path(), absolutePath(), exists(), cleanPath(), dirName(),
absoluteFilePath()
@@ -669,7 +669,7 @@ QString QDir::dirName() const
be relative. Redundant multiple separators or "." and ".."
directories in \a fileName are not removed (see cleanPath()).
- \sa dirName() absoluteFilePath(), isRelative(), canonicalPath()
+ \sa dirName(), absoluteFilePath(), isRelative(), canonicalPath()
*/
QString QDir::filePath(const QString &fileName) const
{
@@ -692,7 +692,7 @@ QString QDir::filePath(const QString &fileName) const
exists(). Redundant multiple separators or "." and ".."
directories in \a fileName are not removed (see cleanPath()).
- \sa relativeFilePath() filePath() canonicalPath()
+ \sa relativeFilePath(), filePath(), canonicalPath()
*/
QString QDir::absoluteFilePath(const QString &fileName) const
{
@@ -711,9 +711,9 @@ QString QDir::absoluteFilePath(const QString &fileName) const
/*!
Returns the path to \a fileName relative to the directory.
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 7
+ \snippet code/src_corelib_io_qdir.cpp 7
- \sa absoluteFilePath() filePath() canonicalPath()
+ \sa absoluteFilePath(), filePath(), canonicalPath()
*/
QString QDir::relativeFilePath(const QString &fileName) const
{
@@ -941,7 +941,7 @@ QStringList QDir::nameFilters() const
to ensure that only files with extensions typically used for C++
source files are listed:
- \snippet doc/src/snippets/qdir-namefilters/main.cpp 0
+ \snippet qdir-namefilters/main.cpp 0
\sa nameFilters(), setFilter()
*/
@@ -988,7 +988,7 @@ void QDir::addResourceSearchPath(const QString &path)
Qt uses this search path to locate files with a known prefix. The search
path entries are tested in order, starting with the first entry.
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 8
+ \snippet code/src_corelib_io_qdir.cpp 8
File name prefix must be at least 2 characters long to avoid conflicts with
Windows drive letters.
@@ -1146,7 +1146,7 @@ void QDir::setFilter(Filters filters)
/*!
Returns the value set by setSorting()
- \sa setSorting() SortFlag
+ \sa setSorting(), SortFlag
*/
QDir::SortFlags QDir::sorting() const
{
@@ -1190,7 +1190,7 @@ QDir::SortFlags QDir::sorting() const
The \a sort is specified by OR-ing values from the enum
\l{QDir::SortFlag}.
- \sa sorting() SortFlag
+ \sa sorting(), SortFlag
*/
void QDir::setSorting(SortFlags sort)
{
@@ -1561,7 +1561,7 @@ bool QDir::exists() const
this function returns false. If you want to test for this use
canonicalPath(), e.g.
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 9
+ \snippet code/src_corelib_io_qdir.cpp 9
\sa root(), rootPath()
*/
@@ -1578,7 +1578,7 @@ bool QDir::isRoot() const
Returns true if the directory's path is absolute; otherwise
returns false. See isAbsolutePath().
- \sa isRelative() makeAbsolute() cleanPath()
+ \sa isRelative(), makeAbsolute(), cleanPath()
*/
/*!
@@ -1587,7 +1587,7 @@ bool QDir::isRoot() const
Returns true if \a path is absolute; returns false if it is
relative.
- \sa isAbsolute() isRelativePath() makeAbsolute() cleanPath()
+ \sa isAbsolute(), isRelativePath(), makeAbsolute(), cleanPath()
*/
/*!
@@ -1595,7 +1595,7 @@ bool QDir::isRoot() const
false. (Under Unix a path is relative if it does not start with a
"/").
- \sa makeAbsolute() isAbsolute() isAbsolutePath() cleanPath()
+ \sa makeAbsolute(), isAbsolute(), isAbsolutePath(), cleanPath()
*/
bool QDir::isRelative() const
{
@@ -1610,7 +1610,7 @@ bool QDir::isRelative() const
absolute nothing happens. Returns true if the conversion
succeeded; otherwise returns false.
- \sa isAbsolute() isAbsolutePath() isRelative() cleanPath()
+ \sa isAbsolute(), isAbsolutePath(), isRelative(), cleanPath()
*/
bool QDir::makeAbsolute()
{
@@ -1639,7 +1639,7 @@ bool QDir::makeAbsolute()
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 10
+ \snippet code/src_corelib_io_qdir.cpp 10
*/
bool QDir::operator==(const QDir &dir) const
{
@@ -1718,7 +1718,7 @@ QDir &QDir::operator=(const QString &path)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 11
+ \snippet code/src_corelib_io_qdir.cpp 11
*/
/*!
@@ -1873,7 +1873,7 @@ QString QDir::currentPath()
Under Windows this function will return the directory of the
current user's profile. Typically, this is:
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 12
+ \snippet code/src_corelib_io_qdir.cpp 12
Use the toNativeSeparators() function to convert the separators to
the ones that are appropriate for the underlying operating system.
@@ -1966,7 +1966,7 @@ QString QDir::rootPath()
patterns in the list of \a filters; otherwise returns false. The
matching is case insensitive.
- \sa {QRegExp wildcard matching}, QRegExp::exactMatch() entryList() entryInfoList()
+ \sa {QRegExp wildcard matching}, QRegExp::exactMatch(), entryList(), entryInfoList()
*/
bool QDir::match(const QStringList &filters, const QString &fileName)
{
@@ -1984,7 +1984,7 @@ bool QDir::match(const QStringList &filters, const QString &fileName)
contain multiple patterns separated by spaces or semicolons.
The matching is case insensitive.
- \sa {QRegExp wildcard matching}, QRegExp::exactMatch() entryList() entryInfoList()
+ \sa {QRegExp wildcard matching}, QRegExp::exactMatch(), entryList(), entryInfoList()
*/
bool QDir::match(const QString &filter, const QString &fileName)
{
@@ -2001,7 +2001,7 @@ bool QDir::match(const QString &filter, const QString &fileName)
For example, "./local" becomes "local", "local/../bin" becomes
"bin" and "/local/usr/../bin" becomes "/local/bin".
- \sa absolutePath() canonicalPath()
+ \sa absolutePath(), canonicalPath()
*/
QString QDir::cleanPath(const QString &path)
{
@@ -2129,7 +2129,7 @@ QString QDir::cleanPath(const QString &path)
Returns true if \a path is relative; returns false if it is
absolute.
- \sa isRelative() isAbsolutePath() makeAbsolute()
+ \sa isRelative(), isAbsolutePath(), makeAbsolute()
*/
bool QDir::isRelativePath(const QString &path)
{
@@ -2181,7 +2181,7 @@ QStringList QDir::nameFiltersFromString(const QString &nameFilter)
initialized at startup by adding this line to your \c main()
function:
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 13
+ \snippet code/src_corelib_io_qdir.cpp 13
If the file name contains characters that cannot be part of a valid C++ function name
(such as '-'), they have to be replaced by the underscore character ('_').
@@ -2190,7 +2190,7 @@ QStringList QDir::nameFiltersFromString(const QString &nameFilter)
main(). If that is not possible, the following workaround can be used
to init the resource \c myapp from the function \c{MyNamespace::myFunction}:
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 14
+ \snippet code/src_corelib_io_qdir.cpp 14
\sa Q_CLEANUP_RESOURCE(), {The Qt Resource System}
*/
@@ -2213,7 +2213,7 @@ QStringList QDir::nameFiltersFromString(const QString &nameFilter)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qdir.cpp 15
+ \snippet code/src_corelib_io_qdir.cpp 15
\sa Q_INIT_RESOURCE(), {The Qt Resource System}
*/
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index 56912e8706..f2a259be64 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -55,7 +55,7 @@
argument. After construction, the iterator is located before the first
directory entry. Here's how to iterate over all the entries sequentially:
- \snippet doc/src/snippets/code/src_corelib_io_qdiriterator.cpp 0
+ \snippet code/src_corelib_io_qdiriterator.cpp 0
The next() function returns the path to the next directory entry and
advances the iterator. You can also call filePath() to get the current
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 120c5a8c23..b3e3bdde53 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -170,7 +170,7 @@ QAbstractFileEngine *QFilePrivate::engine() const
The following example reads a text file line by line:
- \snippet doc/src/snippets/file/file.cpp 0
+ \snippet file/file.cpp 0
The QIODevice::Text flag passed to open() tells Qt to convert
Windows-style line terminators ("\\r\\n") into C++-style
@@ -182,7 +182,7 @@ QAbstractFileEngine *QFilePrivate::engine() const
The next example uses QTextStream to read a text file
line by line:
- \snippet doc/src/snippets/file/file.cpp 1
+ \snippet file/file.cpp 1
QTextStream takes care of converting the 8-bit data stored on
disk into a 16-bit Unicode QString. By default, it assumes that
@@ -194,7 +194,7 @@ QAbstractFileEngine *QFilePrivate::engine() const
take a QTextStream on the left and various data types (including
QString) on the right:
- \snippet doc/src/snippets/file/file.cpp 2
+ \snippet file/file.cpp 2
QDataStream is similar, in that you can use operator<<() to write
data and operator>>() to read it back. See the class
@@ -217,7 +217,7 @@ QAbstractFileEngine *QFilePrivate::engine() const
read() or readLine() repeatedly until no more data can be read. The next
example uses QTextStream to read \c /proc/modules line by line:
- \snippet doc/src/snippets/file/file.cpp 3
+ \snippet file/file.cpp 3
\section1 Signals
@@ -325,7 +325,7 @@ QString QFile::fileName() const
\e{at the time of the open()} call.
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qfile.cpp 0
+ \snippet code/src_corelib_io_qfile.cpp 0
Note that the directory separator "/" works for all operating
systems supported by Qt.
@@ -363,7 +363,7 @@ QFile::setFileName(const QString &name)
file names that the user chooses. File names hard-coded into the
application should only use 7-bit ASCII filename characters.
- \sa decodeName() setEncodingFunction()
+ \sa decodeName(), setEncodingFunction()
*/
QByteArray
@@ -378,7 +378,7 @@ QFile::encodeName(const QString &fileName)
This is a typedef for a pointer to a function with the following
signature:
- \snippet doc/src/snippets/code/src_corelib_io_qfile.cpp 1
+ \snippet code/src_corelib_io_qfile.cpp 1
\sa setEncodingFunction(), encodeName()
*/
@@ -420,7 +420,7 @@ QFile::setEncodingFunction(EncoderFn f)
This is a typedef for a pointer to a function with the following
signature:
- \snippet doc/src/snippets/code/src_corelib_io_qfile.cpp 2
+ \snippet code/src_corelib_io_qfile.cpp 2
\sa setDecodingFunction()
*/
@@ -485,7 +485,7 @@ QFile::exists(const QString &fileName)
This name may not represent an existing file; it is only a string.
QFile::exists() returns true if the symlink points to an existing file.
- \sa fileName() setFileName()
+ \sa fileName(), setFileName()
*/
/*!
@@ -896,7 +896,7 @@ bool QFile::open(OpenMode mode)
Returns true if successful; otherwise returns false.
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qfile.cpp 3
+ \snippet code/src_corelib_io_qfile.cpp 3
When a QFile is opened using this function, behaviour of close() is
controlled by the AutoCloseHandle flag.
@@ -930,7 +930,7 @@ bool QFile::open(OpenMode mode)
stdin, stdout and stderr streams at the console. To do this, add the
following declaration to your application's project file:
- \snippet doc/src/snippets/code/src_corelib_io_qfile.cpp 4
+ \snippet code/src_corelib_io_qfile.cpp 4
*/
bool QFile::open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
{
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index 1805e759ab..1dcde0496d 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -244,14 +244,14 @@ QDateTime &QFileInfoPrivate::getFileTime(QAbstractFileEngine::FileTime request)
transparently; similarly, opening a symlink using QFile
effectively opens the link's target. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp 0
+ \snippet code/src_corelib_io_qfileinfo.cpp 0
On Windows, symlinks (shortcuts) are \c .lnk files. The reported
size() is that of the symlink (not the link's target), and
opening a symlink using QFile opens the \c .lnk file. For
example:
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp 1
+ \snippet code/src_corelib_io_qfileinfo.cpp 1
Elements of the file's name can be extracted with path() and
fileName(). The fileName()'s parts can be extracted with
@@ -442,7 +442,7 @@ QFileInfo &QFileInfo::operator=(const QFileInfo &fileinfo)
path relative to the current directory.
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp 2
+ \snippet code/src_corelib_io_qfileinfo.cpp 2
\sa isRelative(), QDir::setCurrent(), QDir::isRelativePath()
*/
@@ -496,7 +496,7 @@ void QFileInfo::setFile(const QDir &dir, const QString &file)
QFileInfo will uppercase drive letters. Note that QDir does not do
this. The code snippet below shows this.
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp newstuff
+ \snippet code/src_corelib_io_qfileinfo.cpp newstuff
This function returns the same as filePath(), unless isRelative()
is true. In contrast to canonicalFilePath(), symbolic links or
@@ -688,7 +688,7 @@ QString QFileInfo::filePath() const
Returns the name of the file, excluding the path.
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp 3
+ \snippet code/src_corelib_io_qfileinfo.cpp 3
Note that, if this QFileInfo object is given a path ending in a
slash, the name of the file is considered empty.
@@ -711,7 +711,7 @@ QString QFileInfo::fileName() const
path isBundle(). On all other platforms an empty QString is returned.
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp 4
+ \snippet code/src_corelib_io_qfileinfo.cpp 4
\sa isBundle(), filePath(), baseName(), extension()
*/
@@ -730,7 +730,7 @@ QString QFileInfo::bundleName() const
not including) the \e first '.' character.
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp 5
+ \snippet code/src_corelib_io_qfileinfo.cpp 5
The base name of a file is computed equally on all platforms, independent
@@ -754,7 +754,7 @@ QString QFileInfo::baseName() const
to (but not including) the \e last '.' character.
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp 6
+ \snippet code/src_corelib_io_qfileinfo.cpp 6
\sa fileName(), suffix(), completeSuffix(), baseName()
*/
@@ -773,7 +773,7 @@ QString QFileInfo::completeBaseName() const
(but not including) the first '.'.
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp 7
+ \snippet code/src_corelib_io_qfileinfo.cpp 7
\sa fileName(), suffix(), baseName(), completeBaseName()
*/
@@ -792,7 +792,7 @@ QString QFileInfo::completeSuffix() const
including) the last '.'.
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp 8
+ \snippet code/src_corelib_io_qfileinfo.cpp 8
The suffix of a file is computed equally on all platforms, independent of
file naming conventions (e.g., ".bashrc" on Unix has an empty base name,
@@ -818,12 +818,12 @@ QString QFileInfo::suffix() const
For each of the following, dir() returns a QDir for
\c{"~/examples/191697"}.
- \snippet doc/src/snippets/fileinfo/main.cpp 0
+ \snippet fileinfo/main.cpp 0
For each of the following, dir() returns a QDir for
\c{"."}.
- \snippet doc/src/snippets/fileinfo/main.cpp 1
+ \snippet fileinfo/main.cpp 1
\sa absolutePath(), filePath(), fileName(), isRelative(), absoluteDir()
*/
@@ -1010,7 +1010,7 @@ bool QFileInfo::isBundle() const
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp 9
+ \snippet code/src_corelib_io_qfileinfo.cpp 9
\note If the symlink points to a non existing file, exists() returns
false.
@@ -1172,7 +1172,7 @@ uint QFileInfo::groupId() const
always returns true.
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qfileinfo.cpp 10
+ \snippet code/src_corelib_io_qfileinfo.cpp 10
\sa isReadable(), isWritable(), isExecutable()
*/
@@ -1243,7 +1243,7 @@ qint64 QFileInfo::size() const
If neither creation time nor "last status change" time are not
available, returns the same as lastModified().
- \sa lastModified() lastRead()
+ \sa lastModified(), lastRead()
*/
QDateTime QFileInfo::created() const
{
@@ -1261,7 +1261,7 @@ QDateTime QFileInfo::created() const
/*!
Returns the date and time when the file was last modified.
- \sa created() lastRead()
+ \sa created(), lastRead()
*/
QDateTime QFileInfo::lastModified() const
{
@@ -1282,7 +1282,7 @@ QDateTime QFileInfo::lastModified() const
On platforms where this information is not available, returns the
same as lastModified().
- \sa created() lastModified()
+ \sa created(), lastModified()
*/
QDateTime QFileInfo::lastRead() const
{
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 1cdfc61627..3c2da7fa85 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -215,7 +215,7 @@ QIODevicePrivate::~QIODevicePrivate()
Calling these functions from the main, GUI thread, may cause your
user interface to freeze. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qiodevice.cpp 0
+ \snippet code/src_corelib_io_qiodevice.cpp 0
By subclassing QIODevice, you can provide the same interface to
your own I/O devices. Subclasses of QIODevice are only required to
@@ -239,7 +239,7 @@ QIODevicePrivate::~QIODevicePrivate()
subclassing QIODevice, remember to bypass any buffer you may use
when the device is open in Unbuffered mode.
- \sa QBuffer QFile QTcpSocket
+ \sa QBuffer, QFile, QTcpSocket
*/
/*!
@@ -257,9 +257,9 @@ QIODevicePrivate::~QIODevicePrivate()
\value Truncate If possible, the device is truncated before it is opened.
All earlier contents of the device are lost.
\value Text When reading, the end-of-line terminators are
- translated to '\n'. When writing, the end-of-line
+ translated to '\\n'. When writing, the end-of-line
terminators are translated to the local encoding, for
- example '\r\n' for Win32.
+ example '\\r\\n' for Win32.
\value Unbuffered Any buffer in the device is bypassed.
Certain flags, such as \c Unbuffered and \c Truncate, are
@@ -431,7 +431,7 @@ QIODevice::OpenMode QIODevice::openMode() const
function to set the open mode if the flags change after the device
has been opened.
- \sa openMode() OpenMode
+ \sa openMode(), OpenMode
*/
void QIODevice::setOpenMode(OpenMode openMode)
{
@@ -484,7 +484,7 @@ bool QIODevice::isTextModeEnabled() const
default, this function returns false if openMode() returns
\c NotOpen.
- \sa openMode() OpenMode
+ \sa openMode(), OpenMode
*/
bool QIODevice::isOpen() const
{
@@ -498,7 +498,7 @@ bool QIODevice::isOpen() const
This is a convenience function which checks if the OpenMode of the
device contains the ReadOnly flag.
- \sa openMode() OpenMode
+ \sa openMode(), OpenMode
*/
bool QIODevice::isReadable() const
{
@@ -512,7 +512,7 @@ bool QIODevice::isReadable() const
This is a convenience function which checks if the OpenMode of the
device contains the WriteOnly flag.
- \sa openMode() OpenMode
+ \sa openMode(), OpenMode
*/
bool QIODevice::isWritable() const
{
@@ -524,7 +524,7 @@ bool QIODevice::isWritable() const
otherwise returns false. This function should be called from any
reimplementations of open() or other functions that open the device.
- \sa openMode() OpenMode
+ \sa openMode(), OpenMode
*/
bool QIODevice::open(OpenMode mode)
{
@@ -544,7 +544,7 @@ bool QIODevice::open(OpenMode mode)
First emits aboutToClose(), then closes the device and sets its
OpenMode to NotOpen. The error string is also reset.
- \sa setOpenMode() OpenMode
+ \sa setOpenMode(), OpenMode
*/
void QIODevice::close()
{
@@ -704,7 +704,7 @@ bool QIODevice::reset()
Subclasses that reimplement this function must call the base
implementation in order to include the size of QIODevices' buffer. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qiodevice.cpp 1
+ \snippet code/src_corelib_io_qiodevice.cpp 1
\sa bytesToWrite(), readyRead(), isSequential()
*/
@@ -745,7 +745,7 @@ qint64 QIODevice::bytesToWrite() const
function returns -1 in those cases (that is, reading on a closed
socket or after a process has died).
- \sa readData() readLine() write()
+ \sa readData(), readLine(), write()
*/
qint64 QIODevice::read(char *data, qint64 maxSize)
{
@@ -1032,13 +1032,13 @@ QByteArray QIODevice::readAll()
occurs, this function returns the length of what could be read, or
-1 if nothing was read.
- A terminating '\0' byte is always appended to \a data, so \a
+ A terminating '\\0' byte is always appended to \a data, so \a
maxSize must be larger than 1.
Data is read until either of the following conditions are met:
\list
- \li The first '\n' character is read.
+ \li The first '\\n' character is read.
\li \a maxSize - 1 bytes are read.
\li The end of the device data is detected.
\endlist
@@ -1046,12 +1046,12 @@ QByteArray QIODevice::readAll()
For example, the following code reads a line of characters from a
file:
- \snippet doc/src/snippets/code/src_corelib_io_qiodevice.cpp 2
+ \snippet code/src_corelib_io_qiodevice.cpp 2
- The newline character ('\n') is included in the buffer. If a
+ The newline character ('\\n') is included in the buffer. If a
newline is not encountered before maxSize - 1 bytes are read, a
newline will not be inserted into the buffer. On windows newline
- characters are replaced with '\n'.
+ characters are replaced with '\\n'.
This function calls readLineData(), which is implemented using
repeated calls to getChar(). You can provide a more efficient
@@ -1208,7 +1208,7 @@ QByteArray QIODevice::readLine(qint64 maxSize)
implementation, using getChar(). Buffered devices can improve the
performance of readLine() by reimplementing this function.
- readLine() appends a '\0' byte to \a data; readLineData() does not
+ readLine() appends a '\\0' byte to \a data; readLineData() does not
need to do this.
If you reimplement this function, be careful to return the correct
@@ -1258,7 +1258,7 @@ qint64 QIODevice::readLineData(char *data, qint64 maxSize)
Subclasses that reimplement this function must call the base
implementation in order to include the contents of the QIODevice's buffer. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qiodevice.cpp 3
+ \snippet code/src_corelib_io_qiodevice.cpp 3
\sa readyRead(), readLine()
*/
@@ -1272,7 +1272,7 @@ bool QIODevice::canReadLine() const
device. Returns the number of bytes that were actually written, or
-1 if an error occurred.
- \sa read() writeData()
+ \sa read(), writeData()
*/
qint64 QIODevice::write(const char *data, qint64 maxSize)
{
@@ -1362,7 +1362,7 @@ qint64 QIODevice::write(const char *data, qint64 maxSize)
...
\endcode
- \sa read() writeData()
+ \sa read(), writeData()
*/
qint64 QIODevice::write(const char *data)
{
@@ -1376,7 +1376,7 @@ qint64 QIODevice::write(const char *data)
Writes the content of \a byteArray to the device. Returns the number of
bytes that were actually written, or -1 if an error occurred.
- \sa read() writeData()
+ \sa read(), writeData()
*/
/*!
@@ -1407,7 +1407,7 @@ void QIODevice::ungetChar(char c)
Writes the character \a c to the device. Returns true on success;
otherwise returns false.
- \sa write() getChar() ungetChar()
+ \sa write(), getChar(), ungetChar()
*/
bool QIODevice::putChar(char c)
{
@@ -1457,7 +1457,7 @@ QByteArray QIODevicePrivate::peek(qint64 maxSize)
is 0, the character is discarded. Returns true on success;
otherwise returns false.
- \sa read() putChar() ungetChar()
+ \sa read(), putChar(), ungetChar()
*/
bool QIODevice::getChar(char *c)
{
@@ -1479,7 +1479,7 @@ bool QIODevice::getChar(char *c)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qiodevice.cpp 4
+ \snippet code/src_corelib_io_qiodevice.cpp 4
\sa read()
*/
@@ -1497,7 +1497,7 @@ qint64 QIODevice::peek(char *data, qint64 maxSize)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qiodevice.cpp 5
+ \snippet code/src_corelib_io_qiodevice.cpp 5
This function has no way of reporting errors; returning an empty
QByteArray() can mean either that no data was currently available
@@ -1620,7 +1620,7 @@ QString QIODevice::errorString() const
all the requested information was read and therefore does not retry reading
if there was a problem.
- \sa read() readLine() writeData()
+ \sa read(), readLine(), writeData()
*/
/*!
@@ -1638,7 +1638,7 @@ QString QIODevice::errorString() const
all the information was written and therefore does not retry writing if
there was a problem.
- \sa read() write()
+ \sa read(), write()
*/
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index f3680decc7..b75c9c1974 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -451,10 +451,10 @@ void QProcessPrivate::Channel::clear()
containing "-style" and "motif" as two items in the list of
arguments:
- \snippet doc/src/snippets/qprocess/qprocess-simpleexecution.cpp 0
+ \snippet qprocess/qprocess-simpleexecution.cpp 0
\dots
- \snippet doc/src/snippets/qprocess/qprocess-simpleexecution.cpp 1
- \snippet doc/src/snippets/qprocess/qprocess-simpleexecution.cpp 2
+ \snippet qprocess/qprocess-simpleexecution.cpp 1
+ \snippet qprocess/qprocess-simpleexecution.cpp 2
QProcess then enters the \l Starting state, and when the program
has started, QProcess enters the \l Running state and emits
@@ -550,7 +550,7 @@ void QProcessPrivate::Channel::clear()
The following example runs \c gzip to compress the string "Qt
rocks!", without an event loop:
- \snippet doc/src/snippets/process/process.cpp 0
+ \snippet process/process.cpp 0
\section1 Notes for Windows Users
@@ -1184,7 +1184,7 @@ QProcess::ProcessChannelMode QProcess::processChannelMode() const
error channels to the \a mode specified.
This mode will be used the next time start() is called. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 0
+ \snippet code/src_corelib_io_qprocess.cpp 0
\sa processChannelMode(), ProcessChannelMode, setReadChannel()
*/
@@ -1261,7 +1261,7 @@ void QProcess::closeReadChannel(ProcessChannel channel)
Unix and Windows. But it will not display the text data until
QProcess's write channel has been closed. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 1
+ \snippet code/src_corelib_io_qprocess.cpp 1
The write channel is implicitly opened when start() is called.
@@ -1363,10 +1363,10 @@ void QProcess::setStandardErrorFile(const QString &fileName, OpenMode mode)
destination process' standard input.
The following shell command:
- \snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 2
+ \snippet code/src_corelib_io_qprocess.cpp 2
Can be accomplished with QProcesses with the following code:
- \snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 3
+ \snippet code/src_corelib_io_qprocess.cpp 3
*/
void QProcess::setStandardOutputProcess(QProcess *destination)
{
@@ -1567,7 +1567,7 @@ QProcess::ProcessState QProcess::state() const
For example, the following code adds the \c{C:\\BIN} directory to the list of
executable paths (\c{PATHS}) on Windows:
- \snippet doc/src/snippets/qprocess-environment/main.cpp 0
+ \snippet qprocess-environment/main.cpp 0
\note This function is less efficient than the setProcessEnvironment()
function.
@@ -1605,7 +1605,7 @@ QStringList QProcess::environment() const
For example, the following code adds the \c{C:\\BIN} directory to the list of
executable paths (\c{PATHS}) on Windows and sets \c{TMPDIR}:
- \snippet doc/src/snippets/qprocess-environment/main.cpp 1
+ \snippet qprocess-environment/main.cpp 1
Note how, on Windows, environment variable names are case-insensitive.
@@ -1755,7 +1755,7 @@ void QProcess::setProcessState(ProcessState state)
\e execve()). Reimplement this function to do last minute initialization
of the child process. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 4
+ \snippet code/src_corelib_io_qprocess.cpp 4
You cannot exit the process (by calling exit(), for instance) from
this function. If you need to stop the program before it starts
@@ -2002,12 +2002,12 @@ static QStringList parseCombinedArgString(const QString &program)
program name and its arguments. The arguments are separated by one or
more spaces. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 5
+ \snippet code/src_corelib_io_qprocess.cpp 5
The \a program string can also contain quotes, to ensure that arguments
containing spaces are correctly supplied to the new process. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 6
+ \snippet code/src_corelib_io_qprocess.cpp 6
If the QProcess object is already running a process, a warning may be
printed at the console, and the existing process will continue running.
@@ -2017,7 +2017,7 @@ static QStringList parseCombinedArgString(const QString &program)
way to ensure that \c{"My Documents"} is used as the argument to
the \c dir executable:
- \snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 7
+ \snippet code/src_corelib_io_qprocess.cpp 7
The OpenMode is set to \a mode.
*/
@@ -2235,7 +2235,7 @@ QT_END_INCLUDE_NAMESPACE
Returns the environment of the calling process as a list of
key=value pairs. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 8
+ \snippet code/src_corelib_io_qprocess.cpp 8
This function does not cache the system environment. Therefore, it's
possible to obtain an updated version of the environment if low-level C
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 4a0211c00a..0937e1e795 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -584,7 +584,7 @@ QResource::addSearchPath(const QString &path)
Returns the current search path list. This list is consulted when
creating a relative resource.
- \sa QDir::addSearchPath() QDir::setSearchPaths()
+ \sa QDir::addSearchPath(), QDir::setSearchPaths()
*/
QStringList
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 8a6eef053e..33c1d4301d 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -2028,7 +2028,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
company is called MySoft, you would construct the QSettings
object as follows:
- \snippet doc/src/snippets/settings/settings.cpp 0
+ \snippet settings/settings.cpp 0
QSettings objects can be created either on the stack or on
the heap (i.e. using \c new). Constructing and destroying a
@@ -2040,11 +2040,11 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
QCoreApplication::setApplicationName(), and then use the default
QSettings constructor:
- \snippet doc/src/snippets/settings/settings.cpp 1
- \snippet doc/src/snippets/settings/settings.cpp 2
- \snippet doc/src/snippets/settings/settings.cpp 3
+ \snippet settings/settings.cpp 1
+ \snippet settings/settings.cpp 2
+ \snippet settings/settings.cpp 3
\dots
- \snippet doc/src/snippets/settings/settings.cpp 4
+ \snippet settings/settings.cpp 4
(Here, we also specify the organization's Internet domain. When
the Internet domain is set, it is used on Mac OS X instead of the
@@ -2058,7 +2058,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
that stores the data associated with the key. To write a setting,
use setValue(). For example:
- \snippet doc/src/snippets/settings/settings.cpp 5
+ \snippet settings/settings.cpp 5
If there already exists a setting with the same key, the existing
value is overwritten by the new value. For efficiency, the
@@ -2067,14 +2067,14 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
You can get a setting's value back using value():
- \snippet doc/src/snippets/settings/settings.cpp 6
+ \snippet settings/settings.cpp 6
If there is no setting with the specified name, QSettings
returns a null QVariant (which can be converted to the integer 0).
You can specify another default value by passing a second
argument to value():
- \snippet doc/src/snippets/settings/settings.cpp 7
+ \snippet settings/settings.cpp 7
To test whether a given key exists, call contains(). To remove
the setting associated with a key, call remove(). To obtain the
@@ -2091,13 +2091,13 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
Instead, you can use the QVariant::value() or the qVariantValue()
template function. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 0
+ \snippet code/src_corelib_io_qsettings.cpp 0
The inverse conversion (e.g., from QColor to QVariant) is
automatic for all data types supported by QVariant, including
GUI-related types:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 1
+ \snippet code/src_corelib_io_qsettings.cpp 1
Custom types registered using qRegisterMetaType() and
qRegisterMetaTypeStreamOperators() can be stored using QSettings.
@@ -2127,18 +2127,18 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
You can form hierarchical keys using the '/' character as a
separator, similar to Unix file paths. For example:
- \snippet doc/src/snippets/settings/settings.cpp 8
- \snippet doc/src/snippets/settings/settings.cpp 9
- \snippet doc/src/snippets/settings/settings.cpp 10
+ \snippet settings/settings.cpp 8
+ \snippet settings/settings.cpp 9
+ \snippet settings/settings.cpp 10
If you want to save or restore many settings with the same
prefix, you can specify the prefix using beginGroup() and call
endGroup() at the end. Here's the same example again, but this
time using the group mechanism:
- \snippet doc/src/snippets/settings/settings.cpp 11
+ \snippet settings/settings.cpp 11
\codeline
- \snippet doc/src/snippets/settings/settings.cpp 12
+ \snippet settings/settings.cpp 12
If a group is set using beginGroup(), the behavior of most
functions changes consequently. Groups can be set recursively.
@@ -2178,8 +2178,8 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
Let's see with an example:
- \snippet doc/src/snippets/settings/settings.cpp 13
- \snippet doc/src/snippets/settings/settings.cpp 14
+ \snippet settings/settings.cpp 13
+ \snippet settings/settings.cpp 14
The table below summarizes which QSettings objects access
which location. "\b{X}" means that the location is the main
@@ -2205,7 +2205,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
argument to the QSettings constructor, followed by the scope, the
organization name, and the application name:
- \snippet doc/src/snippets/settings/settings.cpp 15
+ \snippet settings/settings.cpp 15
The \l{tools/settingseditor}{Settings Editor} example lets you
experiment with different settings location and with fallbacks
@@ -2217,9 +2217,9 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
application. The following example illustrates how to use QSettings
to save and restore the geometry of an application's main window.
- \snippet doc/src/snippets/settings/settings.cpp 16
+ \snippet settings/settings.cpp 16
\codeline
- \snippet doc/src/snippets/settings/settings.cpp 17
+ \snippet settings/settings.cpp 17
See \l{Window Geometry} for a discussion on why it is better to
call QWidget::resize() and QWidget::move() rather than QWidget::setGeometry()
@@ -2229,12 +2229,12 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
called from the main window's constructor and close event handler
as follows:
- \snippet doc/src/snippets/settings/settings.cpp 18
+ \snippet settings/settings.cpp 18
\dots
- \snippet doc/src/snippets/settings/settings.cpp 19
- \snippet doc/src/snippets/settings/settings.cpp 20
+ \snippet settings/settings.cpp 19
+ \snippet settings/settings.cpp 20
\codeline
- \snippet doc/src/snippets/settings/settings.cpp 21
+ \snippet settings/settings.cpp 21
See the \l{mainwindows/application}{Application} example for a
self-contained example that uses QSettings.
@@ -2341,7 +2341,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
takes a file name as first argument and pass QSettings::IniFormat
as second argument. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 2
+ \snippet code/src_corelib_io_qsettings.cpp 2
You can then use the QSettings object to read and write settings
in the file.
@@ -2349,7 +2349,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
On Mac OS X, you can access XML-based \c .plist files by passing
QSettings::NativeFormat as second argument. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 3
+ \snippet code/src_corelib_io_qsettings.cpp 3
\section2 Accessing the Windows Registry Directly
@@ -2360,13 +2360,13 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
For example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 4
+ \snippet code/src_corelib_io_qsettings.cpp 4
All the registry entries that appear under the specified path can
be read or written through the QSettings object as usual (using
forward slashes instead of backslashes). For example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 5
+ \snippet code/src_corelib_io_qsettings.cpp 5
Note that the backslash character is, as mentioned, used by
QSettings to separate subkeys. As a result, you cannot read or
@@ -2380,7 +2380,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
Its default value is accessed by using "Default" or "." in
place of a subkey:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 6
+ \snippet code/src_corelib_io_qsettings.cpp 6
On other platforms than Windows, "Default" and "." would be
treated as regular subkeys.
@@ -2421,7 +2421,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
Another solution is to use preprocessor directives, for
example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 7
+ \snippet code/src_corelib_io_qsettings.cpp 7
\li On Unix and Mac OS X systems, the advisory file locking is disabled
if NFS (or AutoFS or CacheFS) is detected to work around a bug in the
@@ -2487,7 +2487,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
(e.g., QPoint, QRect, and QSize), Qt uses an \c{@}-based
syntax to encode the type. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 8
+ \snippet code/src_corelib_io_qsettings.cpp 8
To minimize compatibility issues, any \c @ that doesn't
appear at the first position in the value or that isn't
@@ -2498,7 +2498,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
Windows applications don't escape backslashes (\c{\}) in file
paths:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 9
+ \snippet code/src_corelib_io_qsettings.cpp 9
QSettings always treats backslash as a special character and
provides no API for reading or writing such entries.
@@ -2547,7 +2547,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
organization, and with parent \a parent.
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 10
+ \snippet code/src_corelib_io_qsettings.cpp 10
The scope is set to QSettings::UserScope, and the format is
set to QSettings::NativeFormat (i.e. calling setDefaultFormat()
@@ -2659,11 +2659,11 @@ QSettings::QSettings(const QString &fileName, Format format, QObject *parent)
The code
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 11
+ \snippet code/src_corelib_io_qsettings.cpp 11
is equivalent to
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 12
+ \snippet code/src_corelib_io_qsettings.cpp 12
If QCoreApplication::setOrganizationName() and
QCoreApplication::setApplicationName() has not been previously
@@ -2926,7 +2926,7 @@ QSettings::Status QSettings::status() const
Groups are useful to avoid typing in the same setting paths over
and over. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 13
+ \snippet code/src_corelib_io_qsettings.cpp 13
This will set the value of three settings:
@@ -2953,7 +2953,7 @@ void QSettings::beginGroup(const QString &prefix)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 14
+ \snippet code/src_corelib_io_qsettings.cpp 14
\sa beginGroup(), group()
*/
@@ -2991,7 +2991,7 @@ QString QSettings::group() const
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 15
+ \snippet code/src_corelib_io_qsettings.cpp 15
Use beginWriteArray() to write the array in the first place.
@@ -3014,7 +3014,7 @@ int QSettings::beginReadArray(const QString &prefix)
that you want to save a variable-length list of user names and
passwords. You could then write:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 16
+ \snippet code/src_corelib_io_qsettings.cpp 16
The generated keys will have the form
@@ -3099,12 +3099,12 @@ void QSettings::setArrayIndex(int i)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 17
+ \snippet code/src_corelib_io_qsettings.cpp 17
If a group is set using beginGroup(), only the keys in the group
are returned, without the group prefix:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 18
+ \snippet code/src_corelib_io_qsettings.cpp 18
\sa childGroups(), childKeys()
*/
@@ -3120,12 +3120,12 @@ QStringList QSettings::allKeys() const
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 19
+ \snippet code/src_corelib_io_qsettings.cpp 19
If a group is set using beginGroup(), the top-level keys in that
group are returned, without the group prefix:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 20
+ \snippet code/src_corelib_io_qsettings.cpp 20
You can navigate through the entire setting hierarchy using
childKeys() and childGroups() recursively.
@@ -3144,12 +3144,12 @@ QStringList QSettings::childKeys() const
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 21
+ \snippet code/src_corelib_io_qsettings.cpp 21
If a group is set using beginGroup(), the first-level keys in
that group are returned, without the group prefix.
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 22
+ \snippet code/src_corelib_io_qsettings.cpp 22
You can navigate through the entire setting hierarchy using
childKeys() and childGroups() recursively.
@@ -3192,7 +3192,7 @@ bool QSettings::isWritable() const
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 23
+ \snippet code/src_corelib_io_qsettings.cpp 23
\sa value(), remove(), contains()
*/
@@ -3209,7 +3209,7 @@ void QSettings::setValue(const QString &key, const QVariant &value)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 24
+ \snippet code/src_corelib_io_qsettings.cpp 24
Be aware that if one of the fallback locations contains a setting
with the same key, that setting will be visible after calling
@@ -3218,7 +3218,7 @@ void QSettings::setValue(const QString &key, const QVariant &value)
If \a key is an empty string, all keys in the current group() are
removed. For example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 25
+ \snippet code/src_corelib_io_qsettings.cpp 25
Note that the Windows registry and INI files use case-insensitive
keys, whereas the Carbon Preferences API on Mac OS X uses
@@ -3324,7 +3324,7 @@ bool QSettings::event(QEvent *event)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 26
+ \snippet code/src_corelib_io_qsettings.cpp 26
\sa setValue(), contains(), remove()
*/
@@ -3457,7 +3457,7 @@ void QSettings::setPath(Format format, Scope scope, const QString &path)
Typedef for a pointer to a function with the following signature:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 27
+ \snippet code/src_corelib_io_qsettings.cpp 27
\c ReadFunc is used in \c registerFormat() as a pointer to a function
that reads a set of key/value pairs. \c ReadFunc should read all the
@@ -3472,7 +3472,7 @@ void QSettings::setPath(Format format, Scope scope, const QString &path)
Typedef for a pointer to a function with the following signature:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 28
+ \snippet code/src_corelib_io_qsettings.cpp 28
\c WriteFunc is used in \c registerFormat() as a pointer to a function
that writes a set of key/value pairs. \c WriteFunc is only called once,
@@ -3508,7 +3508,7 @@ void QSettings::setPath(Format format, Scope scope, const QString &path)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 29
+ \snippet code/src_corelib_io_qsettings.cpp 29
\sa setPath()
*/
diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp
index c6103b3f2f..700b80b062 100644
--- a/src/corelib/io/qstandardpaths.cpp
+++ b/src/corelib/io/qstandardpaths.cpp
@@ -94,7 +94,7 @@ QT_BEGIN_NAMESPACE
\value DownloadLocation Returns a directory for user's downloaded files.
- \sa writableLocation() standardLocations() displayName() locate() locateAll()
+ \sa writableLocation(), standardLocations(), displayName(), locate(), locateAll()
*/
/*!
diff --git a/src/corelib/io/qtemporarydir.cpp b/src/corelib/io/qtemporarydir.cpp
index 579d569a01..1abc257fa1 100644
--- a/src/corelib/io/qtemporarydir.cpp
+++ b/src/corelib/io/qtemporarydir.cpp
@@ -171,7 +171,7 @@ void QTemporaryDirPrivate::create(const QString &templateName)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qtemporarydir.cpp 0
+ \snippet code/src_corelib_io_qtemporarydir.cpp 0
It is very important to test that the temporary directory could be
created, using isValid(). Do not use exists(), since a default-constructed
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index 75681dadff..cb8b5dbefc 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -466,7 +466,7 @@ static QString defaultTemplateName()
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp 0
+ \snippet code/src_corelib_io_qtemporaryfile.cpp 0
Reopening a QTemporaryFile after calling close() is safe. For as long as
the QTemporaryFile object itself is not destroyed, the unique temporary
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index 0411b463b3..73ffdfe0a4 100644
--- a/src/corelib/io/qtextstream.cpp
+++ b/src/corelib/io/qtextstream.cpp
@@ -58,13 +58,13 @@ static const int QTEXTSTREAM_BUFFERSIZE = 16384;
generating text, QTextStream supports formatting options for field
padding and alignment, and formatting of numbers. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 0
+ \snippet code/src_corelib_io_qtextstream.cpp 0
It's also common to use QTextStream to read console input and write
console output. QTextStream is locale aware, and will automatically decode
standard input using the correct codec. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 1
+ \snippet code/src_corelib_io_qtextstream.cpp 1
Besides using QTextStream's constructors, you can also set the
device or string QTextStream operates on by calling setDevice() or
@@ -117,7 +117,7 @@ static const int QTEXTSTREAM_BUFFERSIZE = 16384;
the integer base, thereby disabling the automatic detection, by
calling setIntegerBase(). Example:
- \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 2
+ \snippet code/src_corelib_io_qtextstream.cpp 2
QTextStream supports many formatting options for generating text.
You can set the field width and pad character by calling
@@ -154,7 +154,7 @@ static const int QTEXTSTREAM_BUFFERSIZE = 16384;
\row \li \c left \li Same as setFieldAlignment(AlignLeft).
\row \li \c right \li Same as setFieldAlignment(AlignRight).
\row \li \c center \li Same as setFieldAlignment(AlignCenter).
- \row \li \c endl \li Same as operator<<('\n') and flush().
+ \row \li \c endl \li Same as operator<<('\\n') and flush().
\row \li \c flush \li Same as flush().
\row \li \c reset \li Same as reset().
\row \li \c ws \li Same as skipWhiteSpace().
@@ -1081,7 +1081,7 @@ QTextStream::QTextStream(QByteArray *array, QIODevice::OpenMode openMode)
This constructor is convenient for working on constant
strings. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 3
+ \snippet code/src_corelib_io_qtextstream.cpp 3
*/
QTextStream::QTextStream(const QByteArray &array, QIODevice::OpenMode openMode)
: d_ptr(new QTextStreamPrivate(this))
@@ -1111,7 +1111,7 @@ QTextStream::QTextStream(const QByteArray &array, QIODevice::OpenMode openMode)
This constructor is useful for working directly with the common
FILE based input and output streams: stdin, stdout and stderr. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 4
+ \snippet code/src_corelib_io_qtextstream.cpp 4
*/
QTextStream::QTextStream(FILE *fileHandle, QIODevice::OpenMode openMode)
@@ -1404,11 +1404,11 @@ QTextStream::FieldAlignment QTextStream::fieldAlignment() const
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 5
+ \snippet code/src_corelib_io_qtextstream.cpp 5
The string \c s contains:
- \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 6
+ \snippet code/src_corelib_io_qtextstream.cpp 6
\sa padChar(), setFieldWidth()
*/
@@ -1601,7 +1601,7 @@ void QTextStream::resetStatus()
Subsequent calls to setStatus() are ignored until resetStatus()
is called.
- \sa Status status() resetStatus()
+ \sa Status, status(), resetStatus()
*/
void QTextStream::setStatus(Status status)
{
@@ -2023,7 +2023,7 @@ bool QTextStreamPrivate::getReal(double *f)
reference to the QTextStream, so several operators can be
nested. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 7
+ \snippet code/src_corelib_io_qtextstream.cpp 7
Whitespace is \e not skipped.
*/
@@ -2241,8 +2241,8 @@ QTextStream &QTextStream::operator>>(QByteArray &array)
/*!
\overload
- Stores the word in \a c, terminated by a '\0' character. If no word is
- available, only the '\0' character is stored.
+ Stores the word in \a c, terminated by a '\\0' character. If no word is
+ available, only the '\\0' character is stored.
Warning: Although convenient, this operator is dangerous and must
be used with care. QTextStream assumes that \a c points to a
@@ -2561,11 +2561,11 @@ QTextStream &QTextStream::operator<<(const QByteArray &array)
string is assumed to be in ISO-8859-1 encoding. This operator
is convenient when working with constant string data. Example:
- \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 8
+ \snippet code/src_corelib_io_qtextstream.cpp 8
Warning: QTextStream assumes that \a string points to a string of
- text, terminated by a '\0' character. If there is no terminating
- '\0' character, your application may crash.
+ text, terminated by a '\\0' character. If there is no terminating
+ '\\0' character, your application may crash.
*/
QTextStream &QTextStream::operator<<(const char *string)
{
@@ -2865,13 +2865,13 @@ QTextStream &center(QTextStream &stream)
/*!
\relates QTextStream
- Writes '\n' to the \a stream and flushes the stream.
+ Writes '\\n' to the \a stream and flushes the stream.
Equivalent to
- \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 9
+ \snippet code/src_corelib_io_qtextstream.cpp 9
- Note: On Windows, all '\n' characters are written as '\r\n' if
+ Note: On Windows, all '\\n' characters are written as '\\r\\n' if
QTextStream's device or string is opened using the QIODevice::Text flag.
\sa flush(), reset(), {QTextStream manipulators}
@@ -2993,7 +2993,7 @@ void QTextStream::setCodec(QTextCodec *codec)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 10
+ \snippet code/src_corelib_io_qtextstream.cpp 10
\sa QTextCodec::codecForName(), setLocale()
*/
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index fbc8d761c2..b6667d6790 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -64,7 +64,7 @@
unencoded representation is suitable for showing to users, but
the encoded representation is typically what you would send to
a web server. For example, the unencoded URL
- "http://b\uuml\c{}hler.example.com" would be sent to the server as
+ "http://b\\uuml\c{}hler.example.com" would be sent to the server as
"http://xn--bhler-kva.example.com/List%20of%20applicants.xml".
A URL can also be constructed piece by piece by calling
@@ -155,7 +155,7 @@
*/
/*!
- \enum QUrl::FormattingOption
+ \enum QUrl::FormattingOptions
The formatting options define how the URL is formatted when written out
as text.
@@ -1400,11 +1400,11 @@ const QByteArray &QUrlPrivate::normalized() const
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 0
+ \snippet code/src_corelib_io_qurl.cpp 0
To construct a URL from an encoded string, call fromEncoded():
- \snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 1
+ \snippet code/src_corelib_io_qurl.cpp 1
\sa setUrl(), setEncodedUrl(), fromEncoded(), TolerantMode
*/
@@ -1445,7 +1445,7 @@ QUrl::~QUrl()
must conform to the standard encoding rules of the URI standard
for the URL to be reported as valid.
- \snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 2
+ \snippet code/src_corelib_io_qurl.cpp 2
*/
bool QUrl::isValid() const
{
@@ -1501,7 +1501,7 @@ void QUrl::setUrl(const QString &url, ParsingMode parsingMode)
and is followed by a ':'. The following example shows a URL where
the scheme is "ftp":
- \img qurl-authority2.png
+ \image qurl-authority2.png
The scheme can also be empty, in which case the URL is interpreted
as relative.
@@ -1548,7 +1548,7 @@ QString QUrl::scheme() const
The following example shows a valid authority string:
- \img qurl-authority.png
+ \image qurl-authority.png
*/
void QUrl::setAuthority(const QString &authority)
{
@@ -1585,7 +1585,7 @@ QString QUrl::authority(ComponentFormattingOptions options) const
separated by a ':'. If the password is empty, the colon must be
omitted. The following example shows a valid user info string:
- \img qurl-authority3.png
+ \image qurl-authority3.png
\sa userInfo(), setUserName(), setPassword(), setAuthority()
*/
@@ -1746,7 +1746,7 @@ void QUrl::setPort(int port)
Example:
- \snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 3
+ \snippet code/src_corelib_io_qurl.cpp 3
*/
int QUrl::port(int defaultPort) const
{
@@ -1758,12 +1758,12 @@ int QUrl::port(int defaultPort) const
Sets the path of the URL to \a path. The path is the part of the
URL that comes after the authority but before the query string.
- \img qurl-ftppath.png
+ \image qurl-ftppath.png
For non-hierarchical schemes, the path will be everything
following the scheme declaration, as in the following example:
- \img qurl-mailtopath.png
+ \image qurl-mailtopath.png
\sa path()
*/
@@ -1862,7 +1862,7 @@ QString QUrl::query(ComponentFormattingOptions options) const
characters. It is typically used in HTTP for referring to a
certain link or point on a page:
- \img qurl-fragment.png
+ \image qurl-fragment.png
The fragment is sometimes also referred to as the URL "reference".
@@ -1938,7 +1938,7 @@ QString QUrl::topLevelDomain(ComponentFormattingOptions options) const
the base URL, but with the merged path, as in the following
example:
- \snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 5
+ \snippet code/src_corelib_io_qurl.cpp 5
Calling resolved() with ".." returns a QUrl whose directory is
one level higher than the original. Similarly, calling resolved()
@@ -2173,7 +2173,7 @@ QString QUrl::fromPercentEncoding(const QByteArray &input)
Unreserved is defined as:
ALPHA / DIGIT / "-" / "." / "_" / "~"
- \snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 6
+ \snippet code/src_corelib_io_qurl.cpp 6
*/
QByteArray QUrl::toPercentEncoding(const QString &input, const QByteArray &exclude, const QByteArray &include)
{