~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to src/libs/qmljs/qmljsinterpreter.h

  • Committer: Timo Jyrinki
  • Date: 2013-12-02 09:16:15 UTC
  • mfrom: (1.1.29)
  • Revision ID: timo.jyrinki@canonical.com-20131202091615-xbj1os1f604ber1m
New upstream release candidate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
#include <qmljs/qmljsdocument.h>
34
34
#include <qmljs/qmljs_global.h>
 
35
#include <qmljs/qmljsconstants.h>
 
36
#include <qmljs/qmljsimportdependencies.h>
35
37
 
36
38
#include <QFileInfoList>
37
39
#include <QList>
39
41
#include <QHash>
40
42
#include <QSet>
41
43
#include <QMutex>
 
44
#include <QSharedPointer>
42
45
 
43
46
namespace QmlJS {
44
47
 
866
869
class QMLJS_EXPORT ImportInfo
867
870
{
868
871
public:
869
 
    enum Type {
870
 
        InvalidImport,
871
 
        ImplicitDirectoryImport,
872
 
        LibraryImport,
873
 
        FileImport,
874
 
        DirectoryImport,
875
 
        QrcFileImport,
876
 
        QrcDirectoryImport,
877
 
        UnknownFileImport // refers a file/directory that wasn't found
878
 
    };
879
 
 
880
872
    ImportInfo();
881
873
 
882
874
    static ImportInfo moduleImport(QString uri, LanguageUtils::ComponentVersion version,
888
880
    static ImportInfo implicitDirectoryImport(const QString &directory);
889
881
 
890
882
    bool isValid() const;
891
 
    Type type() const;
 
883
    ImportType::Enum type() const;
892
884
 
893
885
    // LibraryImport: uri with ',' separator
894
886
    // Other: non-absolute path
905
897
    AST::UiImport *ast() const;
906
898
 
907
899
private:
908
 
    Type _type;
 
900
    ImportType::Enum _type;
909
901
    LanguageUtils::ComponentVersion _version;
910
902
    QString _name;
911
903
    QString _path;
916
908
class QMLJS_EXPORT Import {
917
909
public:
918
910
    Import();
 
911
    Import(const Import &other);
919
912
 
920
913
    // const!
921
914
    ObjectValue *object;
922
915
    ImportInfo info;
 
916
    DependencyInfo::ConstPtr deps;
923
917
    // uri imports: path to library, else empty
924
918
    QString libraryPath;
925
919
    // whether the import succeeded
926
920
    bool valid;
 
921
    mutable bool used;
927
922
};
928
923
 
929
924
class Imports;