From afb52763aa759b3b60be2816212af04d0063595c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 10 Feb 2015 08:26:14 -0800 Subject: Doc: clarify what QUrl::topLevelDomain actually does Task-number: QTBUG-44390 Change-Id: I1a800c709d3543699131ffff13c19789a12dac0b Reviewed-by: Martin Smith Reviewed-by: Richard J. Moore --- src/corelib/io/qurl.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index eb97eaf6d6..f459928110 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3083,6 +3083,21 @@ bool QUrl::hasFragment() const URL does not contain a valid TLD, in which case the function returns an empty string. + Note that this function considers a TLD to be any domain that allows users + to register subdomains under, including many home, dynamic DNS websites and + blogging providers. This is useful for determining whether two websites + belong to the same infrastructure and communication should be allowed, such + as browser cookies: two domains should be considered part of the same + website if they share at least one label in addition to the value + returned by this function. + + \list + \li \c{foo.co.uk} and \c{foo.com} do not share a top-level domain + \li \c{foo.co.uk} and \c{bar.co.uk} share the \c{.co.uk} domain, but the next label is different + \li \c{www.foo.co.uk} and \c{ftp.foo.co.uk} share the same top-level domain and one more label, + so they are considered part of the same site + \endlist + If \a options includes EncodeUnicode, the returned string will be in ASCII Compatible Encoding. */ -- cgit v1.2.3 From 02c5657a7d6d30c6e874e29a0adcc38b58a45b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Fri, 13 Feb 2015 12:18:33 +0100 Subject: Android: Fix local ref handling. We where allowing conversion from jobject to QJNIObject without taking ownership of the jobject. Since we are managing the JNI environment we should not allow conversions without having the option of taking ownership of the local ref. This is now done by making the conversions explicit, i.e., local refs are converted through QJNIObjectPrivate::fromLocalRef() and global refs through the QJNIObjectPrivate's jobject constructor. This change breaks SC, but the API is private and no usage have been found outside QtBase. Change-Id: I3175f171699ec3f8e65144aaebc6246bc6e5bb4d Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/corelib/io/qstandardpaths_android.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qstandardpaths_android.cpp b/src/corelib/io/qstandardpaths_android.cpp index 958b4ea486..50cba3135e 100644 --- a/src/corelib/io/qstandardpaths_android.cpp +++ b/src/corelib/io/qstandardpaths_android.cpp @@ -57,7 +57,7 @@ static QJNIObjectPrivate applicationContext() if (appCtx.isValid()) return appCtx; - QJNIObjectPrivate activity = QtAndroidPrivate::activity(); + QJNIObjectPrivate activity(QtAndroidPrivate::activity()); if (!activity.isValid()) return appCtx; @@ -131,7 +131,7 @@ static QString getExternalFilesDir(const char *directoryField = 0) if (!path.isEmpty()) return path; - QJNIObjectPrivate activity = QtAndroidPrivate::activity(); + QJNIObjectPrivate activity(QtAndroidPrivate::activity()); if (!activity.isValid()) return QString(); -- cgit v1.2.3 From 6f87e1b526273aba16c44cbfa2b96934b4ee007d Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Fri, 20 Feb 2015 11:54:12 +0300 Subject: qstorageinfo_unix.cpp: Fix build on Solaris Task-number: QTBUG-44556 Change-Id: I22d791011866175ca88de88c0b1a7c4d9d397d8f Reviewed-by: Ivan Komissarov Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- src/corelib/io/qstorageinfo_unix.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp index 857464f578..2a83e87b0c 100644 --- a/src/corelib/io/qstorageinfo_unix.cpp +++ b/src/corelib/io/qstorageinfo_unix.cpp @@ -62,6 +62,7 @@ # include #elif defined(Q_OS_SOLARIS) # include +# include #else # include #endif @@ -202,17 +203,17 @@ inline bool QStorageIterator::next() inline QString QStorageIterator::rootPath() const { - return QFile::decodeName(mnt->mnt_mountp); + return QFile::decodeName(mnt.mnt_mountp); } inline QByteArray QStorageIterator::fileSystemType() const { - return QByteArray(mnt->mnt_fstype); + return QByteArray(mnt.mnt_fstype); } inline QByteArray QStorageIterator::device() const { - return QByteArray(mnt->mnt_mntopts); + return QByteArray(mnt.mnt_mntopts); } #elif defined(Q_OS_ANDROID) -- cgit v1.2.3 From 1afe110b8fe6da51ec23736fa3a105013255f904 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 21 Jan 2015 15:42:19 +0100 Subject: Doc: corrected link/autolink issues in corelib Task-number: QTBUG-43115 Change-Id: I31da92e3a7c4dd7b75ee283dbfecd77e284978ca Reviewed-by: Martin Smith --- src/corelib/io/qfileselector.cpp | 2 +- src/corelib/io/qiodevice.cpp | 2 +- src/corelib/io/qprocess.cpp | 2 +- src/corelib/io/qresource.cpp | 2 +- src/corelib/io/qstandardpaths.cpp | 10 +--------- src/corelib/io/qurl.cpp | 6 +++--- src/corelib/io/qurlquery.cpp | 2 +- 7 files changed, 9 insertions(+), 17 deletions(-) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qfileselector.cpp b/src/corelib/io/qfileselector.cpp index 5d1d5dfe23..008aea27cf 100644 --- a/src/corelib/io/qfileselector.cpp +++ b/src/corelib/io/qfileselector.cpp @@ -229,7 +229,7 @@ static QString qrcScheme() } /*! - This is a convenience version of select operating on QUrls. If the scheme is not file or qrc, + This is a convenience version of select operating on QUrl objects. If the scheme is not file or qrc, \a filePath is returned immediately. Otherwise selection is applied to the path of \a filePath and a QUrl is returned with the selected path and other QUrl parts the same as \a filePath. diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index 72ec6ff403..f1c42c9bb5 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -708,7 +708,7 @@ bool QIODevice::reset() number of bytes to allocate in a buffer before reading. Subclasses that reimplement this function must call the base - implementation in order to include the size of QIODevices' buffer. Example: + implementation in order to include the size of the buffer of QIODevice. Example: \snippet code/src_corelib_io_qiodevice.cpp 1 diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 939cecfb44..94912ad616 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1446,7 +1446,7 @@ void QProcess::setStandardErrorFile(const QString &fileName, OpenMode mode) The following shell command: \snippet code/src_corelib_io_qprocess.cpp 2 - Can be accomplished with QProcesses with the following code: + Can be accomplished with QProcess with the following code: \snippet code/src_corelib_io_qprocess.cpp 3 */ void QProcess::setStandardOutputProcess(QProcess *destination) diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp index ed6bfb4e0d..64c20dead2 100644 --- a/src/corelib/io/qresource.cpp +++ b/src/corelib/io/qresource.cpp @@ -197,7 +197,7 @@ Q_GLOBAL_STATIC(QStringList, resourceSearchPaths) path requested in setFileName(). The unregisterResource() function removes a reference to a particular - file. If there are QResources that currently reference resources related + file. If there are QResource objects that currently reference resources related to the unregistered file, they will continue to be valid but the resource file itself will be removed from the resource roots, and thus no further QResource can be created pointing into this resource data. The resource diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp index b41aee55d2..9d047123a1 100644 --- a/src/corelib/io/qstandardpaths.cpp +++ b/src/corelib/io/qstandardpaths.cpp @@ -77,15 +77,10 @@ QT_BEGIN_NAMESPACE this user, but should still be assumed to be unreachable by applications by other users. - The only exception is QStandardPaths::TempLocation (which is the same as - QDir::tempPath()): the path returned may be application-specific, but files - stored there may be accessed by other applications run by the same user. - Data interchange with other users is out of the scope of QStandardPaths. \value DesktopLocation Returns the user's desktop directory. This is a generic value. - On systems with no concept of a desktop, this is the same as - QStandardPaths::HomeLocation. + On systems with no concept of a desktop. \value DocumentsLocation Returns the directory containing user document files. This is a generic value. The returned path is never empty. \value FontsLocation Returns the directory containing user's fonts. This is a generic value. @@ -118,9 +113,6 @@ QT_BEGIN_NAMESPACE \value GenericCacheLocation Returns a directory location where user-specific non-essential (cached) data, shared across applications, should be written. This is a generic value. Note that the returned path may be empty if the system has no concept of shared cache. - \value GenericDataLocation Returns a directory location where persistent - data shared across applications can be stored. This is a generic value. The returned - path is never empty. \value RuntimeLocation Returns a directory location where runtime communication files should be written, like Unix local sockets. This is a generic value. The returned path may be empty on some systems. diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index f459928110..750437c2b0 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -82,7 +82,7 @@ For the convenience of generating encoded URL strings or query strings, there are two static functions called fromPercentEncoding() and toPercentEncoding() which deal with - percent encoding and decoding of QStrings. + percent encoding and decoding of QString objects. Calling isRelative() will tell whether or not the URL is relative. A relative URL can be resolved by passing it as argument @@ -172,7 +172,7 @@ setters setting components of a URL; it is not permitted in the QUrl constructor, in fromEncoded() or in setUrl(). For more information on this mode, see the documentation for - QUrl::FullyDecoded. + \l {QUrl::ComponentFormattingOption}{QUrl::FullyDecoded}. In TolerantMode, the parser has the following behaviour: @@ -4055,7 +4055,7 @@ QString QUrl::errorString() const /*! \since 5.1 - Converts a list of \a urls into a list of QStrings, using toString(\a options). + Converts a list of \a urls into a list of QString objects, using toString(\a options). */ QStringList QUrl::toStringList(const QList &urls, FormattingOptions options) { diff --git a/src/corelib/io/qurlquery.cpp b/src/corelib/io/qurlquery.cpp index 451f2c0ca7..abe05e4c4d 100644 --- a/src/corelib/io/qurlquery.cpp +++ b/src/corelib/io/qurlquery.cpp @@ -414,7 +414,7 @@ bool QUrlQuery::operator ==(const QUrlQuery &other) const } /*! - Returns \c true if this QUrlQUery object contains no key-value pairs, such as + Returns \c true if this QUrlQuery object contains no key-value pairs, such as after being default-constructed or after parsing an empty query string. \sa setQuery(), clear() -- cgit v1.2.3