Qt 4.8
Macros | Functions
qdeclarativetypeloader.cpp File Reference
#include "qdeclarativetypeloader_p.h"
#include <private/qdeclarativeengine_p.h>
#include <private/qdeclarativecompiler_p.h>
#include <private/qdeclarativecomponent_p.h>
#include <private/qdeclarativeglobal_p.h>
#include <private/qdeclarativedebugtrace_p.h>
#include <QtDeclarative/qdeclarativecomponent.h>
#include <QtCore/qdebug.h>
#include <QtCore/qdir.h>
#include <QtCore/qdiriterator.h>
#include <QtCore/qfile.h>

Go to the source code of this file.

Macros

#define DATALOADER_MAXIMUM_REDIRECT_RECURSION   16
 

Functions

static QSet< QString > * qmlFilesInDirectory (const QString &path)
 

Macro Definition Documentation

◆ DATALOADER_MAXIMUM_REDIRECT_RECURSION

#define DATALOADER_MAXIMUM_REDIRECT_RECURSION   16

Function Documentation

◆ qmlFilesInDirectory()

static QSet<QString>* qmlFilesInDirectory ( const QString path)
static

Definition at line 62 of file qdeclarativetypeloader.cpp.

Referenced by QDeclarativeTypeLoader::absoluteFilePath().

63 {
65  if (!dir.hasNext())
66  return 0;
67  QSet<QString> *files = new QSet<QString>;
68  while (dir.hasNext()) {
69  dir.next();
70  QString fileName = dir.fileName();
71  if (fileName == QLatin1String("qmldir")
72  || fileName.endsWith(QLatin1String(".qml"))
73  || fileName.endsWith(QLatin1String(".js"))) {
74 #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN)
75  fileName = fileName.toLower();
76 #endif
77  files->insert(fileName);
78  }
79  }
80  return files;
81 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QDirIterator class provides an iterator for directory entrylists.
Definition: qdiriterator.h:54
The QString class provides a Unicode character string.
Definition: qstring.h:83
const_iterator insert(const T &value)
Definition: qset.h:179
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
QString toLower() const Q_REQUIRED_RESULT
Returns a lowercase copy of the string.
Definition: qstring.cpp:5389
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
Definition: qstring.cpp:3796
static QString fileName(const QString &fileUrl)