summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/io.pri2
-rw-r--r--src/corelib/io/qabstractfileengine.cpp6
-rw-r--r--src/corelib/io/qabstractfileengine.h247
-rw-r--r--src/corelib/io/qabstractfileengine_p.h191
-rw-r--r--src/corelib/io/qdir.cpp4
-rw-r--r--src/corelib/io/qdiriterator.cpp4
-rw-r--r--src/corelib/io/qfile.cpp6
-rw-r--r--src/corelib/io/qfile_p.h2
-rw-r--r--src/corelib/io/qfileinfo_p.h2
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp5
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp2
-rw-r--r--src/corelib/io/qfilesystemmetadata_p.h2
-rw-r--r--src/corelib/io/qfsfileengine.cpp1
-rw-r--r--src/corelib/io/qfsfileengine.h122
-rw-r--r--src/corelib/io/qfsfileengine_iterator_p.h2
-rw-r--r--src/corelib/io/qfsfileengine_p.h65
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp2
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp2
-rw-r--r--src/corelib/io/qresource_iterator_p.h2
-rw-r--r--src/corelib/io/qresource_p.h2
20 files changed, 275 insertions, 396 deletions
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri
index 2df862e360..29599295ad 100644
--- a/src/corelib/io/io.pri
+++ b/src/corelib/io/io.pri
@@ -1,7 +1,6 @@
# Qt core io module
HEADERS += \
- io/qabstractfileengine.h \
io/qabstractfileengine_p.h \
io/qbuffer.h \
io/qdatastream.h \
@@ -30,7 +29,6 @@ HEADERS += \
io/qtldurl_p.h \
io/qsettings.h \
io/qsettings_p.h \
- io/qfsfileengine.h \
io/qfsfileengine_p.h \
io/qfsfileengine_iterator_p.h \
io/qfilesystemwatcher.h \
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp
index fb18809e48..021698115c 100644
--- a/src/corelib/io/qabstractfileengine.cpp
+++ b/src/corelib/io/qabstractfileengine.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#include "qabstractfileengine.h"
#include "private/qabstractfileengine_p.h"
+#include "private/qfsfileengine_p.h"
#ifdef QT_BUILD_CORE_LIB
#include "private/qresource_p.h"
#endif
@@ -48,7 +48,6 @@
#include "qreadwritelock.h"
#include "qvariant.h"
// built-in handlers
-#include "qfsfileengine.h"
#include "qdiriterator.h"
#include "qstringbuilder.h"
@@ -61,6 +60,7 @@ QT_BEGIN_NAMESPACE
/*!
\class QAbstractFileEngineHandler
\reentrant
+ \internal
\brief The QAbstractFileEngineHandler class provides a way to register
custom file engines with your application.
@@ -220,6 +220,7 @@ QAbstractFileEngine *QAbstractFileEngine::create(const QString &fileName)
/*!
\class QAbstractFileEngine
\reentrant
+ \internal
\brief The QAbstractFileEngine class provides an abstraction for accessing
the filesystem.
@@ -804,6 +805,7 @@ bool QAbstractFileEngine::unmap(uchar *address)
\class QAbstractFileEngineIterator
\brief The QAbstractFileEngineIterator class provides an iterator
interface for custom file engines.
+ \internal
If all you want is to iterate over entries in a directory, see
QDirIterator instead. This class is only for custom file engine authors.
diff --git a/src/corelib/io/qabstractfileengine.h b/src/corelib/io/qabstractfileengine.h
deleted file mode 100644
index 6ea5a2b94e..0000000000
--- a/src/corelib/io/qabstractfileengine.h
+++ /dev/null
@@ -1,247 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtCore 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 QABSTRACTFILEENGINE_H
-#define QABSTRACTFILEENGINE_H
-
-#include <QtCore/qdir.h>
-
-#ifdef open
-#error qabstractfileengine.h must be included before any header file that defines open
-#endif
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class QFileExtension;
-class QFileExtensionResult;
-class QVariant;
-class QAbstractFileEngineIterator;
-class QAbstractFileEnginePrivate;
-
-class Q_CORE_EXPORT QAbstractFileEngine
-{
-public:
- enum FileFlag {
- //perms (overlaps the QFile::Permission)
- ReadOwnerPerm = 0x4000, WriteOwnerPerm = 0x2000, ExeOwnerPerm = 0x1000,
- ReadUserPerm = 0x0400, WriteUserPerm = 0x0200, ExeUserPerm = 0x0100,
- ReadGroupPerm = 0x0040, WriteGroupPerm = 0x0020, ExeGroupPerm = 0x0010,
- ReadOtherPerm = 0x0004, WriteOtherPerm = 0x0002, ExeOtherPerm = 0x0001,
-
- //types
- LinkType = 0x10000,
- FileType = 0x20000,
- DirectoryType = 0x40000,
- BundleType = 0x80000,
-
- //flags
- HiddenFlag = 0x0100000,
- LocalDiskFlag = 0x0200000,
- ExistsFlag = 0x0400000,
- RootFlag = 0x0800000,
- Refresh = 0x1000000,
-
- //masks
- PermsMask = 0x0000FFFF,
- TypesMask = 0x000F0000,
- FlagsMask = 0x0FF00000,
- FileInfoAll = FlagsMask | PermsMask | TypesMask
- };
- Q_DECLARE_FLAGS(FileFlags, FileFlag)
-
- enum FileName {
- DefaultName,
- BaseName,
- PathName,
- AbsoluteName,
- AbsolutePathName,
- LinkName,
- CanonicalName,
- CanonicalPathName,
- BundleName,
- NFileNames = 9
- };
- enum FileOwner {
- OwnerUser,
- OwnerGroup
- };
- enum FileTime {
- CreationTime,
- ModificationTime,
- AccessTime
- };
-
- virtual ~QAbstractFileEngine();
-
- virtual bool open(QIODevice::OpenMode openMode);
- virtual bool close();
- virtual bool flush();
- virtual qint64 size() const;
- virtual qint64 pos() const;
- virtual bool seek(qint64 pos);
- virtual bool isSequential() const;
- virtual bool remove();
- virtual bool copy(const QString &newName);
- virtual bool rename(const QString &newName);
- virtual bool link(const QString &newName);
- virtual bool mkdir(const QString &dirName, bool createParentDirectories) const;
- virtual bool rmdir(const QString &dirName, bool recurseParentDirectories) const;
- virtual bool setSize(qint64 size);
- virtual bool caseSensitive() const;
- virtual bool isRelativePath() const;
- virtual QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const;
- virtual FileFlags fileFlags(FileFlags type=FileInfoAll) const;
- virtual bool setPermissions(uint perms);
- virtual QString fileName(FileName file=DefaultName) const;
- virtual uint ownerId(FileOwner) const;
- virtual QString owner(FileOwner) const;
- virtual QDateTime fileTime(FileTime time) const;
- virtual void setFileName(const QString &file);
- virtual int handle() const;
- bool atEnd() const;
- uchar *map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags);
- bool unmap(uchar *ptr);
-
- typedef QAbstractFileEngineIterator Iterator;
- virtual Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames);
- virtual Iterator *endEntryList();
-
- virtual qint64 read(char *data, qint64 maxlen);
- virtual qint64 readLine(char *data, qint64 maxlen);
- virtual qint64 write(const char *data, qint64 len);
-
- QFile::FileError error() const;
- QString errorString() const;
-
- enum Extension {
- AtEndExtension,
- FastReadLineExtension,
- MapExtension,
- UnMapExtension
- };
- class ExtensionOption
- {};
- class ExtensionReturn
- {};
-
- class MapExtensionOption : public ExtensionOption {
- public:
- qint64 offset;
- qint64 size;
- QFile::MemoryMapFlags flags;
- };
- class MapExtensionReturn : public ExtensionReturn {
- public:
- uchar *address;
- };
-
- class UnMapExtensionOption : public ExtensionOption {
- public:
- uchar *address;
- };
-
- virtual bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
- virtual bool supportsExtension(Extension extension) const;
-
- // Factory
- static QAbstractFileEngine *create(const QString &fileName);
-
-protected:
- void setError(QFile::FileError error, const QString &str);
-
- QAbstractFileEngine();
- QAbstractFileEngine(QAbstractFileEnginePrivate &);
-
- QScopedPointer<QAbstractFileEnginePrivate> d_ptr;
-private:
- Q_DECLARE_PRIVATE(QAbstractFileEngine)
- Q_DISABLE_COPY(QAbstractFileEngine)
-};
-
-Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractFileEngine::FileFlags)
-
-class Q_CORE_EXPORT QAbstractFileEngineHandler
-{
-public:
- QAbstractFileEngineHandler();
- virtual ~QAbstractFileEngineHandler();
- virtual QAbstractFileEngine *create(const QString &fileName) const = 0;
-};
-
-class QAbstractFileEngineIteratorPrivate;
-class Q_CORE_EXPORT QAbstractFileEngineIterator
-{
-public:
- QAbstractFileEngineIterator(QDir::Filters filters, const QStringList &nameFilters);
- virtual ~QAbstractFileEngineIterator();
-
- virtual QString next() = 0;
- virtual bool hasNext() const = 0;
-
- QString path() const;
- QStringList nameFilters() const;
- QDir::Filters filters() const;
-
- virtual QString currentFileName() const = 0;
- virtual QFileInfo currentFileInfo() const;
- QString currentFilePath() const;
-
-protected:
- enum EntryInfoType {
- };
- virtual QVariant entryInfo(EntryInfoType type) const;
-
-private:
- Q_DISABLE_COPY(QAbstractFileEngineIterator)
- friend class QDirIterator;
- friend class QDirIteratorPrivate;
- void setPath(const QString &path);
- QScopedPointer<QAbstractFileEngineIteratorPrivate> d;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QABSTRACTFILEENGINE_H
diff --git a/src/corelib/io/qabstractfileengine_p.h b/src/corelib/io/qabstractfileengine_p.h
index 08bb7fb097..ae7f56e2d7 100644
--- a/src/corelib/io/qabstractfileengine_p.h
+++ b/src/corelib/io/qabstractfileengine_p.h
@@ -53,11 +53,200 @@
// We mean it.
//
-#include "QtCore/qabstractfileengine.h"
#include "QtCore/qfile.h"
+#include "QtCore/qdir.h"
+
+#ifdef open
+#error qabstractfileengine_p.h must be included before any header file that defines open
+#endif
QT_BEGIN_NAMESPACE
+class QVariant;
+class QAbstractFileEngineIterator;
+class QAbstractFileEnginePrivate;
+
+class Q_AUTOTEST_EXPORT QAbstractFileEngine
+{
+public:
+ enum FileFlag {
+ //perms (overlaps the QFile::Permission)
+ ReadOwnerPerm = 0x4000, WriteOwnerPerm = 0x2000, ExeOwnerPerm = 0x1000,
+ ReadUserPerm = 0x0400, WriteUserPerm = 0x0200, ExeUserPerm = 0x0100,
+ ReadGroupPerm = 0x0040, WriteGroupPerm = 0x0020, ExeGroupPerm = 0x0010,
+ ReadOtherPerm = 0x0004, WriteOtherPerm = 0x0002, ExeOtherPerm = 0x0001,
+
+ //types
+ LinkType = 0x10000,
+ FileType = 0x20000,
+ DirectoryType = 0x40000,
+ BundleType = 0x80000,
+
+ //flags
+ HiddenFlag = 0x0100000,
+ LocalDiskFlag = 0x0200000,
+ ExistsFlag = 0x0400000,
+ RootFlag = 0x0800000,
+ Refresh = 0x1000000,
+
+ //masks
+ PermsMask = 0x0000FFFF,
+ TypesMask = 0x000F0000,
+ FlagsMask = 0x0FF00000,
+ FileInfoAll = FlagsMask | PermsMask | TypesMask
+ };
+ Q_DECLARE_FLAGS(FileFlags, FileFlag)
+
+ enum FileName {
+ DefaultName,
+ BaseName,
+ PathName,
+ AbsoluteName,
+ AbsolutePathName,
+ LinkName,
+ CanonicalName,
+ CanonicalPathName,
+ BundleName,
+ NFileNames = 9
+ };
+ enum FileOwner {
+ OwnerUser,
+ OwnerGroup
+ };
+ enum FileTime {
+ CreationTime,
+ ModificationTime,
+ AccessTime
+ };
+
+ virtual ~QAbstractFileEngine();
+
+ virtual bool open(QIODevice::OpenMode openMode);
+ virtual bool close();
+ virtual bool flush();
+ virtual qint64 size() const;
+ virtual qint64 pos() const;
+ virtual bool seek(qint64 pos);
+ virtual bool isSequential() const;
+ virtual bool remove();
+ virtual bool copy(const QString &newName);
+ virtual bool rename(const QString &newName);
+ virtual bool link(const QString &newName);
+ virtual bool mkdir(const QString &dirName, bool createParentDirectories) const;
+ virtual bool rmdir(const QString &dirName, bool recurseParentDirectories) const;
+ virtual bool setSize(qint64 size);
+ virtual bool caseSensitive() const;
+ virtual bool isRelativePath() const;
+ virtual QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const;
+ virtual FileFlags fileFlags(FileFlags type=FileInfoAll) const;
+ virtual bool setPermissions(uint perms);
+ virtual QString fileName(FileName file=DefaultName) const;
+ virtual uint ownerId(FileOwner) const;
+ virtual QString owner(FileOwner) const;
+ virtual QDateTime fileTime(FileTime time) const;
+ virtual void setFileName(const QString &file);
+ virtual int handle() const;
+ bool atEnd() const;
+ uchar *map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags);
+ bool unmap(uchar *ptr);
+
+ typedef QAbstractFileEngineIterator Iterator;
+ virtual Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames);
+ virtual Iterator *endEntryList();
+
+ virtual qint64 read(char *data, qint64 maxlen);
+ virtual qint64 readLine(char *data, qint64 maxlen);
+ virtual qint64 write(const char *data, qint64 len);
+
+ QFile::FileError error() const;
+ QString errorString() const;
+
+ enum Extension {
+ AtEndExtension,
+ FastReadLineExtension,
+ MapExtension,
+ UnMapExtension
+ };
+ class ExtensionOption
+ {};
+ class ExtensionReturn
+ {};
+
+ class MapExtensionOption : public ExtensionOption {
+ public:
+ qint64 offset;
+ qint64 size;
+ QFile::MemoryMapFlags flags;
+ };
+ class MapExtensionReturn : public ExtensionReturn {
+ public:
+ uchar *address;
+ };
+
+ class UnMapExtensionOption : public ExtensionOption {
+ public:
+ uchar *address;
+ };
+
+ virtual bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
+ virtual bool supportsExtension(Extension extension) const;
+
+ // Factory
+ static QAbstractFileEngine *create(const QString &fileName);
+
+protected:
+ void setError(QFile::FileError error, const QString &str);
+
+ QAbstractFileEngine();
+ QAbstractFileEngine(QAbstractFileEnginePrivate &);
+
+ QScopedPointer<QAbstractFileEnginePrivate> d_ptr;
+private:
+ Q_DECLARE_PRIVATE(QAbstractFileEngine)
+ Q_DISABLE_COPY(QAbstractFileEngine)
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractFileEngine::FileFlags)
+
+class Q_AUTOTEST_EXPORT QAbstractFileEngineHandler
+{
+public:
+ QAbstractFileEngineHandler();
+ virtual ~QAbstractFileEngineHandler();
+ virtual QAbstractFileEngine *create(const QString &fileName) const = 0;
+};
+
+class QAbstractFileEngineIteratorPrivate;
+class Q_AUTOTEST_EXPORT QAbstractFileEngineIterator
+{
+public:
+ QAbstractFileEngineIterator(QDir::Filters filters, const QStringList &nameFilters);
+ virtual ~QAbstractFileEngineIterator();
+
+ virtual QString next() = 0;
+ virtual bool hasNext() const = 0;
+
+ QString path() const;
+ QStringList nameFilters() const;
+ QDir::Filters filters() const;
+
+ virtual QString currentFileName() const = 0;
+ virtual QFileInfo currentFileInfo() const;
+ QString currentFilePath() const;
+
+protected:
+ enum EntryInfoType {
+ };
+ virtual QVariant entryInfo(EntryInfoType type) const;
+
+private:
+ Q_DISABLE_COPY(QAbstractFileEngineIterator)
+ friend class QDirIterator;
+ friend class QDirIteratorPrivate;
+ void setPath(const QString &path);
+ QScopedPointer<QAbstractFileEngineIteratorPrivate> d;
+};
+
class QAbstractFileEnginePrivate
{
public:
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 220fc43b92..afd402d019 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -42,12 +42,12 @@
#include "qplatformdefs.h"
#include "qdir.h"
#include "qdir_p.h"
-#include "qabstractfileengine.h"
+#include "qabstractfileengine_p.h"
+#include "qfsfileengine_p.h"
#ifndef QT_NO_DEBUG_STREAM
#include "qdebug.h"
#endif
#include "qdiriterator.h"
-#include "qfsfileengine.h"
#include "qdatetime.h"
#include "qstring.h"
#include "qregexp.h"
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index c5f24071aa..b8536a8dce 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -91,8 +91,7 @@
#include "qdiriterator.h"
#include "qdir_p.h"
-
-#include "qabstractfileengine.h"
+#include "qabstractfileengine_p.h"
#include <QtCore/qset.h>
#include <QtCore/qstack.h>
@@ -102,7 +101,6 @@
#include <QtCore/private/qfilesystementry_p.h>
#include <QtCore/private/qfilesystemmetadata_p.h>
#include <QtCore/private/qfilesystemengine_p.h>
-#include <QtCore/qfsfileengine.h>
#include <QtCore/private/qfileinfo_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 1879e8b36a..fc0c90cf69 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -42,7 +42,7 @@
#include "qplatformdefs.h"
#include "qdebug.h"
#include "qfile.h"
-#include "qfsfileengine.h"
+#include "qfsfileengine_p.h"
#include "qtemporaryfile.h"
#include "qlist.h"
#include "qfileinfo.h"
@@ -1197,7 +1197,7 @@ QFile::handle() const
\note On Windows CE 5.0 the file will be closed before mapping occurs.
- \sa unmap(), QAbstractFileEngine::supportsExtension()
+ \sa unmap()
*/
uchar *QFile::map(qint64 offset, qint64 size, MemoryMapFlags flags)
{
@@ -1219,7 +1219,7 @@ uchar *QFile::map(qint64 offset, qint64 size, MemoryMapFlags flags)
Returns true if the unmap succeeds; false otherwise.
- \sa map(), QAbstractFileEngine::supportsExtension()
+ \sa map()
*/
bool QFile::unmap(uchar *address)
{
diff --git a/src/corelib/io/qfile_p.h b/src/corelib/io/qfile_p.h
index 4a637d44a8..3d2d3d678b 100644
--- a/src/corelib/io/qfile_p.h
+++ b/src/corelib/io/qfile_p.h
@@ -53,7 +53,7 @@
// We mean it.
//
-#include "QtCore/qabstractfileengine.h"
+#include "private/qabstractfileengine_p.h"
#include "private/qiodevice_p.h"
#include "private/qringbuffer_p.h"
diff --git a/src/corelib/io/qfileinfo_p.h b/src/corelib/io/qfileinfo_p.h
index aa1d88665c..4c7c9ffea8 100644
--- a/src/corelib/io/qfileinfo_p.h
+++ b/src/corelib/io/qfileinfo_p.h
@@ -54,12 +54,12 @@
//
#include "qfileinfo.h"
-#include "qabstractfileengine.h"
#include "qdatetime.h"
#include "qatomic.h"
#include "qshareddata.h"
#include "qfilesystemengine_p.h"
+#include <QtCore/private/qabstractfileengine_p.h>
#include <QtCore/private/qfilesystementry_p.h>
#include <QtCore/private/qfilesystemmetadata_p.h>
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 8d08bb5944..5e466e480d 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -42,7 +42,6 @@
#include "qplatformdefs.h"
#include "qfilesystemengine_p.h"
#include "qplatformdefs.h"
-#include "qfsfileengine.h"
#include "qfile.h"
#include <QtCore/qvarlengtharray.h>
@@ -645,12 +644,12 @@ QFileSystemEntry QFileSystemEngine::currentPath()
result = QFileSystemEntry(QByteArray(currentName), QFileSystemEntry::FromNativePath());
# if defined(QT_DEBUG)
if (result.isEmpty())
- qWarning("QFSFileEngine::currentPath: getcwd() failed");
+ qWarning("QFileSystemEngine::currentPath: getcwd() failed");
# endif
#endif
} else {
# if defined(QT_DEBUG)
- qWarning("QFSFileEngine::currentPath: stat(\".\") failed");
+ qWarning("QFileSystemEngine::currentPath: stat(\".\") failed");
# endif
}
return result;
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index b04018ca0f..294affce53 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -43,7 +43,7 @@
#define _POSIX_
#include "qplatformdefs.h"
-#include "qabstractfileengine.h"
+#include "private/qabstractfileengine_p.h"
#include "private/qfsfileengine_p.h"
#include <private/qsystemlibrary_p.h>
#include <qdebug.h>
diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h
index 792ee0e714..6053b16752 100644
--- a/src/corelib/io/qfilesystemmetadata_p.h
+++ b/src/corelib/io/qfilesystemmetadata_p.h
@@ -56,7 +56,7 @@
#include "qplatformdefs.h"
#include <QtCore/qglobal.h>
#include <QtCore/qdatetime.h>
-#include <QtCore/qabstractfileengine.h>
+#include <QtCore/private/qabstractfileengine_p.h>
// Platform-specific includes
#ifdef Q_OS_WIN
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index 4bf2e530a3..dde854e903 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -84,6 +84,7 @@ QT_BEGIN_NAMESPACE
/*! \class QFSFileEngine
\brief The QFSFileEngine class implements Qt's default file engine.
\since 4.1
+ \internal
This class is part of the file engine framework in Qt. If you only want to
access files or directories, use QFile, QFileInfo or QDir instead.
diff --git a/src/corelib/io/qfsfileengine.h b/src/corelib/io/qfsfileengine.h
deleted file mode 100644
index 63659e709a..0000000000
--- a/src/corelib/io/qfsfileengine.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtCore 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 QFSFILEENGINE_H
-#define QFSFILEENGINE_H
-
-#include <QtCore/qabstractfileengine.h>
-
-#ifndef QT_NO_FSFILEENGINE
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class QFSFileEnginePrivate;
-
-class Q_CORE_EXPORT QFSFileEngine : public QAbstractFileEngine
-{
- Q_DECLARE_PRIVATE(QFSFileEngine)
-public:
- QFSFileEngine();
- explicit QFSFileEngine(const QString &file);
- ~QFSFileEngine();
-
- bool open(QIODevice::OpenMode openMode);
- bool open(QIODevice::OpenMode flags, FILE *fh);
- bool close();
- bool flush();
- qint64 size() const;
- qint64 pos() const;
- bool seek(qint64);
- bool isSequential() const;
- bool remove();
- bool copy(const QString &newName);
- bool rename(const QString &newName);
- bool link(const QString &newName);
- bool mkdir(const QString &dirName, bool createParentDirectories) const;
- bool rmdir(const QString &dirName, bool recurseParentDirectories) const;
- bool setSize(qint64 size);
- bool caseSensitive() const;
- bool isRelativePath() const;
- QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const;
- FileFlags fileFlags(FileFlags type) const;
- bool setPermissions(uint perms);
- QString fileName(FileName file) const;
- uint ownerId(FileOwner) const;
- QString owner(FileOwner) const;
- QDateTime fileTime(FileTime time) const;
- void setFileName(const QString &file);
- int handle() const;
-
- Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames);
- Iterator *endEntryList();
-
- qint64 read(char *data, qint64 maxlen);
- qint64 readLine(char *data, qint64 maxlen);
- qint64 write(const char *data, qint64 len);
-
- bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
- bool supportsExtension(Extension extension) const;
-
- //FS only!!
- bool open(QIODevice::OpenMode flags, int fd);
- bool open(QIODevice::OpenMode flags, int fd, QFile::FileHandleFlags handleFlags);
- bool open(QIODevice::OpenMode flags, FILE *fh, QFile::FileHandleFlags handleFlags);
- static bool setCurrentPath(const QString &path);
- static QString currentPath(const QString &path = QString());
- static QString homePath();
- static QString rootPath();
- static QString tempPath();
- static QFileInfoList drives();
-
-protected:
- QFSFileEngine(QFSFileEnginePrivate &dd);
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QT_NO_FSFILEENGINE
-
-#endif // QFSFILEENGINE_H
diff --git a/src/corelib/io/qfsfileengine_iterator_p.h b/src/corelib/io/qfsfileengine_iterator_p.h
index 477e0ecd73..b0f47ea19d 100644
--- a/src/corelib/io/qfsfileengine_iterator_p.h
+++ b/src/corelib/io/qfsfileengine_iterator_p.h
@@ -53,7 +53,7 @@
// We mean it.
//
-#include "qabstractfileengine.h"
+#include "private/qabstractfileengine_p.h"
#include "qfilesystemiterator_p.h"
#include "qdir.h"
diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h
index c06f662380..f403706479 100644
--- a/src/corelib/io/qfsfileengine_p.h
+++ b/src/corelib/io/qfsfileengine_p.h
@@ -54,8 +54,7 @@
//
#include "qplatformdefs.h"
-#include "QtCore/qfsfileengine.h"
-#include "private/qabstractfileengine_p.h"
+#include "QtCore/private/qabstractfileengine_p.h"
#include <QtCore/private/qfilesystementry_p.h>
#include <QtCore/private/qfilesystemmetadata_p.h>
#include <qhash.h>
@@ -68,6 +67,68 @@ QT_BEGIN_NAMESPACE
#define Q_USE_DEPRECATED_MAP_API 1
#endif
+class QFSFileEnginePrivate;
+
+class Q_AUTOTEST_EXPORT QFSFileEngine : public QAbstractFileEngine
+{
+ Q_DECLARE_PRIVATE(QFSFileEngine)
+public:
+ QFSFileEngine();
+ explicit QFSFileEngine(const QString &file);
+ ~QFSFileEngine();
+
+ bool open(QIODevice::OpenMode openMode);
+ bool open(QIODevice::OpenMode flags, FILE *fh);
+ bool close();
+ bool flush();
+ qint64 size() const;
+ qint64 pos() const;
+ bool seek(qint64);
+ bool isSequential() const;
+ bool remove();
+ bool copy(const QString &newName);
+ bool rename(const QString &newName);
+ bool link(const QString &newName);
+ bool mkdir(const QString &dirName, bool createParentDirectories) const;
+ bool rmdir(const QString &dirName, bool recurseParentDirectories) const;
+ bool setSize(qint64 size);
+ bool caseSensitive() const;
+ bool isRelativePath() const;
+ QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const;
+ FileFlags fileFlags(FileFlags type) const;
+ bool setPermissions(uint perms);
+ QString fileName(FileName file) const;
+ uint ownerId(FileOwner) const;
+ QString owner(FileOwner) const;
+ QDateTime fileTime(FileTime time) const;
+ void setFileName(const QString &file);
+ int handle() const;
+
+ Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames);
+ Iterator *endEntryList();
+
+ qint64 read(char *data, qint64 maxlen);
+ qint64 readLine(char *data, qint64 maxlen);
+ qint64 write(const char *data, qint64 len);
+
+ bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
+ bool supportsExtension(Extension extension) const;
+
+ //FS only!!
+ bool open(QIODevice::OpenMode flags, int fd);
+ bool open(QIODevice::OpenMode flags, int fd, QFile::FileHandleFlags handleFlags);
+ bool open(QIODevice::OpenMode flags, FILE *fh, QFile::FileHandleFlags handleFlags);
+ static bool setCurrentPath(const QString &path);
+ static QString currentPath(const QString &path = QString());
+ static QString homePath();
+ static QString rootPath();
+ static QString tempPath();
+ static QFileInfoList drives();
+
+protected:
+ QFSFileEngine(QFSFileEnginePrivate &dd);
+};
+
class Q_AUTOTEST_EXPORT QFSFileEnginePrivate : public QAbstractFileEnginePrivate
{
Q_DECLARE_PUBLIC(QFSFileEngine)
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 805c4b5989..561e950217 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "qplatformdefs.h"
-#include "qabstractfileengine.h"
+#include "private/qabstractfileengine_p.h"
#include "private/qfsfileengine_p.h"
#include "private/qcore_unix_p.h"
#include "qfilesystementry_p.h"
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index cc78664275..347ce8429e 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -41,7 +41,7 @@
#define _POSIX_
#include "qplatformdefs.h"
-#include "qabstractfileengine.h"
+#include "private/qabstractfileengine_p.h"
#include "private/qfsfileengine_p.h"
#include "qfilesystemengine_p.h"
#include <qdebug.h>
diff --git a/src/corelib/io/qresource_iterator_p.h b/src/corelib/io/qresource_iterator_p.h
index e01b5d3e5f..763c0b72e2 100644
--- a/src/corelib/io/qresource_iterator_p.h
+++ b/src/corelib/io/qresource_iterator_p.h
@@ -53,7 +53,7 @@
// We mean it.
//
-#include "qabstractfileengine.h"
+#include "qabstractfileengine_p.h"
#include "qdir.h"
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/io/qresource_p.h b/src/corelib/io/qresource_p.h
index 73046888a5..b7c0a5fcb6 100644
--- a/src/corelib/io/qresource_p.h
+++ b/src/corelib/io/qresource_p.h
@@ -53,7 +53,7 @@
// We mean it.
//
-#include "QtCore/qabstractfileengine.h"
+#include "qabstractfileengine_p.h"
QT_BEGIN_NAMESPACE