From 741b1fcfa333e33f3e1bd02f975a22e5b0b74316 Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 24 May 2012 10:36:01 +0200 Subject: Make qurlinfo private, now that QFtp is private. Change-Id: I0bb641b397b7087c89009f92d9973e0922dce653 Reviewed-by: Thiago Macieira Reviewed-by: Shane Kearns --- src/corelib/global/qfeatures.h | 5 +- src/corelib/global/qfeatures.txt | 9 +- src/corelib/io/qurl.cpp | 2 - src/network/access/qftp.cpp | 2 +- src/network/access/qftp_p.h | 2 +- src/network/access/qnetworkaccesscachebackend.cpp | 2 +- src/network/access/qnetworkaccessfilebackend.cpp | 2 +- src/network/kernel/kernel.pri | 2 +- src/network/kernel/qurlinfo.cpp | 2 +- src/network/kernel/qurlinfo.h | 130 ---------------------- src/network/kernel/qurlinfo_p.h | 130 ++++++++++++++++++++++ 11 files changed, 138 insertions(+), 150 deletions(-) delete mode 100644 src/network/kernel/qurlinfo.h create mode 100644 src/network/kernel/qurlinfo_p.h (limited to 'src') diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h index 7abddda0c5..3267e3e06e 100644 --- a/src/corelib/global/qfeatures.h +++ b/src/corelib/global/qfeatures.h @@ -235,9 +235,6 @@ // QUndoCommand //#define QT_NO_UNDOCOMMAND -// QUrlInfo -//#define QT_NO_URLINFO - // QValidator //#define QT_NO_VALIDATOR @@ -388,7 +385,7 @@ #endif // File Transfer Protocol -#if !defined(QT_NO_FTP) && (defined(QT_NO_URLINFO) || defined(QT_NO_TEXTDATE)) +#if !defined(QT_NO_FTP) && (defined(QT_NO_TEXTDATE)) #define QT_NO_FTP #endif diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index 777128299a..f0b8b470c5 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -962,13 +962,6 @@ SeeAlso: ??? # Networking -Feature: URLINFO -Description: Supports storage of URL information. -Section: Networking -Requires: -Name: QUrlInfo -SeeAlso: ??? - Feature: HOSTINFO Description: Supports host name lookups. Section: Networking @@ -979,7 +972,7 @@ SeeAlso: ??? Feature: FTP Description: Supports FTP file access. Section: Networking -Requires: URLINFO TEXTDATE +Requires: TEXTDATE Name: File Transfer Protocol SeeAlso: ??? diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index e4fb18e2f0..6494590679 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -116,8 +116,6 @@ \li When creating an QString to contain a URL from a QByteArray or a char*, always use QString::fromUtf8(). \endlist - - \sa QUrlInfo */ /*! diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp index a261c19ad6..03244e86ea 100644 --- a/src/network/access/qftp.cpp +++ b/src/network/access/qftp.cpp @@ -49,7 +49,7 @@ #include "qcoreapplication.h" #include "qtcpsocket.h" -#include "qurlinfo.h" +#include "qurlinfo_p.h" #include "qstringlist.h" #include "qregexp.h" #include "qtimer.h" diff --git a/src/network/access/qftp_p.h b/src/network/access/qftp_p.h index 8dc423973a..2e86522238 100644 --- a/src/network/access/qftp_p.h +++ b/src/network/access/qftp_p.h @@ -54,7 +54,7 @@ #define QFTP_H #include -#include +#include #include QT_BEGIN_HEADER diff --git a/src/network/access/qnetworkaccesscachebackend.cpp b/src/network/access/qnetworkaccesscachebackend.cpp index 6abe42f795..8f81e1b150 100644 --- a/src/network/access/qnetworkaccesscachebackend.cpp +++ b/src/network/access/qnetworkaccesscachebackend.cpp @@ -44,7 +44,7 @@ #include "qnetworkaccesscachebackend_p.h" #include "qabstractnetworkcache.h" #include "qfileinfo.h" -#include "qurlinfo.h" +#include "qurlinfo_p.h" #include "qdir.h" #include "qcoreapplication.h" diff --git a/src/network/access/qnetworkaccessfilebackend.cpp b/src/network/access/qnetworkaccessfilebackend.cpp index dbe964ac8d..5b8eb631a5 100644 --- a/src/network/access/qnetworkaccessfilebackend.cpp +++ b/src/network/access/qnetworkaccessfilebackend.cpp @@ -41,7 +41,7 @@ #include "qnetworkaccessfilebackend_p.h" #include "qfileinfo.h" -#include "qurlinfo.h" +#include "qurlinfo_p.h" #include "qdir.h" #include "private/qnoncontiguousbytedevice_p.h" diff --git a/src/network/kernel/kernel.pri b/src/network/kernel/kernel.pri index a8aa3622e1..b9cd07ff66 100644 --- a/src/network/kernel/kernel.pri +++ b/src/network/kernel/kernel.pri @@ -11,7 +11,7 @@ HEADERS += kernel/qauthenticator.h \ kernel/qhostaddress_p.h \ kernel/qhostinfo.h \ kernel/qhostinfo_p.h \ - kernel/qurlinfo.h \ + kernel/qurlinfo_p.h \ kernel/qnetworkproxy.h \ kernel/qnetworkproxy_p.h \ kernel/qnetworkinterface.h \ diff --git a/src/network/kernel/qurlinfo.cpp b/src/network/kernel/qurlinfo.cpp index 9f571b9e8c..68c521c682 100644 --- a/src/network/kernel/qurlinfo.cpp +++ b/src/network/kernel/qurlinfo.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qurlinfo.h" +#include "qurlinfo_p.h" #ifndef QT_NO_URLINFO diff --git a/src/network/kernel/qurlinfo.h b/src/network/kernel/qurlinfo.h deleted file mode 100644 index 7fbf860c31..0000000000 --- a/src/network/kernel/qurlinfo.h +++ /dev/null @@ -1,130 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtNetwork module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QURLINFO_H -#define QURLINFO_H - -#include -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - - -#ifndef QT_NO_URLINFO - -class QUrl; -class QUrlInfoPrivate; - -class Q_NETWORK_EXPORT QUrlInfo -{ -public: - enum PermissionSpec { - ReadOwner = 00400, WriteOwner = 00200, ExeOwner = 00100, - ReadGroup = 00040, WriteGroup = 00020, ExeGroup = 00010, - ReadOther = 00004, WriteOther = 00002, ExeOther = 00001 }; - - QUrlInfo(); - QUrlInfo(const QUrlInfo &ui); - QUrlInfo(const QString &name, int permissions, const QString &owner, - const QString &group, qint64 size, const QDateTime &lastModified, - const QDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, - bool isWritable, bool isReadable, bool isExecutable); - QUrlInfo(const QUrl &url, int permissions, const QString &owner, - const QString &group, qint64 size, const QDateTime &lastModified, - const QDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, - bool isWritable, bool isReadable, bool isExecutable); - QUrlInfo &operator=(const QUrlInfo &ui); - virtual ~QUrlInfo(); - - virtual void setName(const QString &name); - virtual void setDir(bool b); - virtual void setFile(bool b); - virtual void setSymLink(bool b); - virtual void setOwner(const QString &s); - virtual void setGroup(const QString &s); - virtual void setSize(qint64 size); - virtual void setWritable(bool b); - virtual void setReadable(bool b); - virtual void setPermissions(int p); - virtual void setLastModified(const QDateTime &dt); - void setLastRead(const QDateTime &dt); - - bool isValid() const; - - QString name() const; - int permissions() const; - QString owner() const; - QString group() const; - qint64 size() const; - QDateTime lastModified() const; - QDateTime lastRead() const; - bool isDir() const; - bool isFile() const; - bool isSymLink() const; - bool isWritable() const; - bool isReadable() const; - bool isExecutable() const; - - static bool greaterThan(const QUrlInfo &i1, const QUrlInfo &i2, - int sortBy); - static bool lessThan(const QUrlInfo &i1, const QUrlInfo &i2, - int sortBy); - static bool equal(const QUrlInfo &i1, const QUrlInfo &i2, - int sortBy); - - bool operator==(const QUrlInfo &i) const; - inline bool operator!=(const QUrlInfo &i) const - { return !operator==(i); } - -private: - QUrlInfoPrivate *d; -}; - -#endif // QT_NO_URLINFO - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QURLINFO_H diff --git a/src/network/kernel/qurlinfo_p.h b/src/network/kernel/qurlinfo_p.h new file mode 100644 index 0000000000..7fbf860c31 --- /dev/null +++ b/src/network/kernel/qurlinfo_p.h @@ -0,0 +1,130 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QURLINFO_H +#define QURLINFO_H + +#include +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + + +#ifndef QT_NO_URLINFO + +class QUrl; +class QUrlInfoPrivate; + +class Q_NETWORK_EXPORT QUrlInfo +{ +public: + enum PermissionSpec { + ReadOwner = 00400, WriteOwner = 00200, ExeOwner = 00100, + ReadGroup = 00040, WriteGroup = 00020, ExeGroup = 00010, + ReadOther = 00004, WriteOther = 00002, ExeOther = 00001 }; + + QUrlInfo(); + QUrlInfo(const QUrlInfo &ui); + QUrlInfo(const QString &name, int permissions, const QString &owner, + const QString &group, qint64 size, const QDateTime &lastModified, + const QDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, + bool isWritable, bool isReadable, bool isExecutable); + QUrlInfo(const QUrl &url, int permissions, const QString &owner, + const QString &group, qint64 size, const QDateTime &lastModified, + const QDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, + bool isWritable, bool isReadable, bool isExecutable); + QUrlInfo &operator=(const QUrlInfo &ui); + virtual ~QUrlInfo(); + + virtual void setName(const QString &name); + virtual void setDir(bool b); + virtual void setFile(bool b); + virtual void setSymLink(bool b); + virtual void setOwner(const QString &s); + virtual void setGroup(const QString &s); + virtual void setSize(qint64 size); + virtual void setWritable(bool b); + virtual void setReadable(bool b); + virtual void setPermissions(int p); + virtual void setLastModified(const QDateTime &dt); + void setLastRead(const QDateTime &dt); + + bool isValid() const; + + QString name() const; + int permissions() const; + QString owner() const; + QString group() const; + qint64 size() const; + QDateTime lastModified() const; + QDateTime lastRead() const; + bool isDir() const; + bool isFile() const; + bool isSymLink() const; + bool isWritable() const; + bool isReadable() const; + bool isExecutable() const; + + static bool greaterThan(const QUrlInfo &i1, const QUrlInfo &i2, + int sortBy); + static bool lessThan(const QUrlInfo &i1, const QUrlInfo &i2, + int sortBy); + static bool equal(const QUrlInfo &i1, const QUrlInfo &i2, + int sortBy); + + bool operator==(const QUrlInfo &i) const; + inline bool operator!=(const QUrlInfo &i) const + { return !operator==(i); } + +private: + QUrlInfoPrivate *d; +}; + +#endif // QT_NO_URLINFO + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QURLINFO_H -- cgit v1.2.3