summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2010-08-30 16:59:20 +0200
committerJoão Abecasis <joao.abecasis@nokia.com>2010-08-31 16:19:19 +0200
commit7a8cdcac068898697f9f0f75c410ea673d6f0d60 (patch)
tree22c0054186563c754c75af20b34abc34ccd85234
parentc2df86d23477573ef664a20b47b19a42e4a2e6c8 (diff)
downloadqt4-tools-7a8cdcac068898697f9f0f75c410ea673d6f0d60.tar.gz
Adding minimal QFileSystemIterator API
Only stubs, for now, but it's a start. Reviewed-by: Thomas Zander
-rw-r--r--qmake/Makefile.unix7
-rw-r--r--qmake/Makefile.win325
-rw-r--r--qmake/Makefile.win32-g++4
-rw-r--r--qmake/Makefile.win32-g++-sh4
-rw-r--r--qmake/qmake.pri4
-rw-r--r--src/corelib/io/io.pri5
-rw-r--r--src/corelib/io/qfilesystemiterator_p.h78
-rw-r--r--src/corelib/io/qfilesystemiterator_unix.cpp61
-rw-r--r--src/corelib/io/qfilesystemiterator_win.cpp61
-rw-r--r--src/tools/bootstrap/bootstrap.pro2
-rw-r--r--tools/configure/configure.pro2
-rw-r--r--tools/qtestlib/wince/cetest/bootstrapped.pri1
12 files changed, 229 insertions, 5 deletions
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index 4eba3f5b2f..e8e96fd113 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -16,7 +16,7 @@ OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o \
#qt code
QOBJS=qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o \
qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfile.o \
- qfilesystementry.o qfilesystemengine_unix.o qfilesystemengine.o \
+ qfilesystementry.o qfilesystemengine_unix.o qfilesystemengine.o qfilesystemiterator_unix.o \
qfsfileengine_unix.o qfsfileengine_iterator_unix.o qfsfileengine.o \
qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o \
qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o \
@@ -46,7 +46,7 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp generators/makefile.cpp ge
$(SOURCE_PATH)/src/corelib/tools/qbytearray.cpp $(SOURCE_PATH)/src/corelib/tools/qbytearraymatcher.cpp \
$(SOURCE_PATH)/src/corelib/io/qdatastream.cpp $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp \
$(SOURCE_PATH)/src/corelib/io/qfilesystementry.cpp $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp \
- $(SOURCE_PATH)/src/corelib/io/qfilesystemengine.cpp \
+ $(SOURCE_PATH)/src/corelib/io/qfilesystemengine.cpp $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp \
$(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp $(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp \
$(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator_unix.cpp $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.cpp \
$(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp $(SOURCE_PATH)/src/corelib/tools/qlist.cpp \
@@ -172,6 +172,9 @@ qfilesystemengine.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine.cpp
qfilesystemengine_unix.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp
+qfilesystemiterator_unix.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp
+ $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp
+
qfsfileengine.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index ec64fa9484..fa17b9d31b 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -91,6 +91,7 @@ QTOBJS= \
qfilesystementry.obj \
qfilesystemengine.obj \
qfilesystemengine_win.obj \
+ qfilesystemiterator_win.obj \
qfsfileengine.obj \
qfsfileengine_iterator.obj \
qbytearray.obj \
@@ -147,6 +148,7 @@ clean::
-del qfilesystementry.obj
-del qfilesystemengine.obj
-del qfilesystemengine_win.obj
+ -del qfilesystemiterator_win.obj
-del qfsfileengine.obj
-del qfsfileengine_iterator.obj
-del qbytearray.obj
@@ -325,6 +327,9 @@ qfilesystemengine.obj: $(SOURCE_PATH)\src\corelib\io\qfilesystemengine.cpp
qfilesystemengine_win.obj: $(SOURCE_PATH)\src\corelib\io\qfilesystemengine_win.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfilesystemengine_win.cpp
+qfilesystemiterator_win.obj: $(SOURCE_PATH)\src\corelib\io\qfilesystemiterator_win.cpp
+ $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfilesystemiterator_win.cpp
+
qfsfileengine_win.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine_win.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine_win.cpp
diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++
index f2f83866e3..57ea3d5fb5 100644
--- a/qmake/Makefile.win32-g++
+++ b/qmake/Makefile.win32-g++
@@ -64,6 +64,7 @@ QTOBJS= \
qfilesystementry.o \
qfilesystemengine.o \
qfilesystemengine_win.o \
+ qfilesystemiterator_win.o \
qfsfileengine.o \
qfsfileengine_iterator.o \
qfsfileengine_win.o \
@@ -204,6 +205,9 @@ qfilesystemengine.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine.cpp
qfilesystemengine_win.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_win.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_win.cpp
+qfilesystemiterator_win.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_win.cpp
+ $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_win.cpp
+
qfsfileengine_win.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp
diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh
index cc256e9cdf..33deb01823 100644
--- a/qmake/Makefile.win32-g++-sh
+++ b/qmake/Makefile.win32-g++-sh
@@ -63,6 +63,7 @@ QTOBJS= \
qabstractfileengine.o \
qfilesystementry.o \
qfilesystemengine_win.o \
+ qfilesystemiterator_win.o \
qfsfileengine.o \
qfsfileengine_iterator.o \
qfsfileengine_win.o \
@@ -199,6 +200,9 @@ qfilesystementry.o: $(SOURCE_PATH)/src/corelib/io/qfilesystementry.cpp
qfilesystemengine_win.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_win.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_win.cpp
+qfilesystemiterator_win.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_win.cpp
+ $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_win.cpp
+
qfsfileengine_win.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index be6a90965e..7226b12587 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -127,14 +127,14 @@ bootstrap { #Qt code
qxmlutils.h
unix {
- SOURCES += qfilesystemengine_unix.cpp qfsfileengine_unix.cpp qfsfileengine_iterator_unix.cpp
+ SOURCES += qfilesystemengine_unix.cpp qfilesystemiterator_unix.cpp qfsfileengine_unix.cpp qfsfileengine_iterator_unix.cpp
mac {
SOURCES += qcore_mac.cpp qsettings_mac.cpp
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported)
LIBS += -framework ApplicationServices
}
} else:win32 {
- SOURCES += qfilesystemengine_win.cpp qfsfileengine_win.cpp qfsfileengine_iterator_win.cpp qsettings_win.cpp
+ SOURCES += qfilesystemengine_win.cpp qfsfileengine_win.cpp qfilesystemiterator_win.cpp qfsfileengine_iterator_win.cpp qsettings_win.cpp
win32-msvc*:LIBS += ole32.lib advapi32.lib
win32-g++*:LIBS += -lole32 -luuid
}
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri
index 7a34275f2b..5d1021656a 100644
--- a/src/corelib/io/io.pri
+++ b/src/corelib/io/io.pri
@@ -32,7 +32,8 @@ HEADERS += \
io/qfilesystemwatcher_p.h \
io/qfilesystementry_p.h \
io/qfilesystemengine_p.h \
- io/qfilesystemmetadata_p.h
+ io/qfilesystemmetadata_p.h \
+ io/qfilesystemiterator_p.h
SOURCES += \
io/qabstractfileengine.cpp \
@@ -70,8 +71,10 @@ win32 {
HEADERS += io/qwindowspipewriter_p.h
SOURCES += io/qwindowspipewriter.cpp
SOURCES += io/qfilesystemengine_win.cpp
+ SOURCES += io/qfilesystemiterator_win.cpp
} else:unix {
SOURCES += io/qfilesystemengine_unix.cpp
+ SOURCES += io/qfilesystemiterator_unix.cpp
SOURCES += io/qfsfileengine_unix.cpp
SOURCES += io/qfsfileengine_iterator_unix.cpp
symbian:SOURCES += io/qprocess_symbian.cpp
diff --git a/src/corelib/io/qfilesystemiterator_p.h b/src/corelib/io/qfilesystemiterator_p.h
new file mode 100644
index 0000000000..436ff7e4e7
--- /dev/null
+++ b/src/corelib/io/qfilesystemiterator_p.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, 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.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QFILESYSTEMITERATOR_P_H_INCLUDED
+#define QFILESYSTEMITERATOR_P_H_INCLUDED
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qstringlist.h>
+
+#include <QtCore/private/qfilesystementry_p.h>
+#include <QtCore/private/qfilesystemmetadata_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QFileSystemIterator
+{
+public:
+ QFileSystemIterator(const QFileSystemEntry &entry, QDir::Filters filters, const QStringList &nameFilters);
+
+ bool advance(QFileSystemEntry &fileEntry, QFileSystemMetaData &metaData);
+
+private:
+ Q_DISABLE_COPY(QFileSystemIterator)
+};
+
+QT_END_NAMESPACE
+
+#endif // include guard
diff --git a/src/corelib/io/qfilesystemiterator_unix.cpp b/src/corelib/io/qfilesystemiterator_unix.cpp
new file mode 100644
index 0000000000..3ee344b649
--- /dev/null
+++ b/src/corelib/io/qfilesystemiterator_unix.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, 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.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qfilesystemiterator_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &entry, QDir::Filters filters,
+ const QStringList &nameFilters)
+{
+ Q_UNUSED(entry)
+ Q_UNUSED(filters)
+ Q_UNUSED(nameFilters)
+}
+
+bool QFileSystemIterator::advance(QFileSystemEntry &fileEntry, QFileSystemMetaData &metaData)
+{
+ Q_UNUSED(fileEntry)
+ Q_UNUSED(metaData)
+ return false;
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemiterator_win.cpp b/src/corelib/io/qfilesystemiterator_win.cpp
new file mode 100644
index 0000000000..3ee344b649
--- /dev/null
+++ b/src/corelib/io/qfilesystemiterator_win.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, 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.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qfilesystemiterator_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &entry, QDir::Filters filters,
+ const QStringList &nameFilters)
+{
+ Q_UNUSED(entry)
+ Q_UNUSED(filters)
+ Q_UNUSED(nameFilters)
+}
+
+bool QFileSystemIterator::advance(QFileSystemEntry &fileEntry, QFileSystemMetaData &metaData)
+{
+ Q_UNUSED(fileEntry)
+ Q_UNUSED(metaData)
+ return false;
+}
+
+QT_END_NAMESPACE
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 9adba9c716..6d2f760608 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -86,10 +86,12 @@ SOURCES += \
../../xml/sax/qxml.cpp
unix:SOURCES += ../../corelib/io/qfilesystemengine_unix.cpp \
+ ../../corelib/io/qfilesystemiterator_unix.cpp \
../../corelib/io/qfsfileengine_unix.cpp \
../../corelib/io/qfsfileengine_iterator_unix.cpp
win32:SOURCES += ../../corelib/io/qfilesystemengine_win.cpp \
+ ../../corelib/io/qfilesystemiterator_win.cpp \
../../corelib/io/qfsfileengine_win.cpp \
../../corelib/io/qfsfileengine_iterator_win.cpp
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index 854a0e41d5..fe1b0282a4 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -51,6 +51,7 @@ HEADERS = configureapp.h environment.h tools.h\
$$QT_SOURCE_TREE/src/corelib/io/qfilesystementry_p.h \
$$QT_SOURCE_TREE/src/corelib/io/qfilesystemengine_p.h \
$$QT_SOURCE_TREE/src/corelib/io/qfilesystemmetadata_p.h \
+ $$QT_SOURCE_TREE/src/corelib/io/qfilesystemiterator_p.h \
$$QT_SOURCE_TREE/src/corelib/io/qfsfileengine.h \
$$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator_p.h \
$$QT_SOURCE_TREE/src/corelib/io/qiodevice.h \
@@ -92,6 +93,7 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfilesystementry.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfilesystemengine.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfilesystemengine_win.cpp \
+ $$QT_SOURCE_TREE/src/corelib/io/qfilesystemiterator_win.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfsfileengine.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_win.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator.cpp \
diff --git a/tools/qtestlib/wince/cetest/bootstrapped.pri b/tools/qtestlib/wince/cetest/bootstrapped.pri
index f33dde8544..76245b0206 100644
--- a/tools/qtestlib/wince/cetest/bootstrapped.pri
+++ b/tools/qtestlib/wince/cetest/bootstrapped.pri
@@ -7,6 +7,7 @@ SOURCES += \
$$QT_SOURCE_TREE/src/corelib/io/qfilesystementry.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfilesystemengine.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfilesystemengine_win.cpp \
+ $$QT_SOURCE_TREE/src/corelib/io/qfilesystemiterator_win.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfsfileengine.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qabstractfileengine.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_win.cpp \