Commit 33ec15b9 authored by Kai Koehne's avatar Kai Koehne
Browse files

Prevent symbol clashes for qml classes

Fix namespace usage such that all classes in shared/qml live in the
Qml namespace, and classes in QmlDesigner plugin in the QmlDesigner
namespace.

This should prevent any symbol clashes until we can finally get rid
of the file dublicates (e.g. QmlDocument).
parent f8083773
......@@ -32,8 +32,8 @@
#include "addarraymembervisitor.h"
using namespace QmlEditor;
using namespace QmlEditor::Internal;
using namespace QmlDesigner;
using namespace QmlDesigner::Internal;
using namespace QmlJS;
using namespace QmlJS::AST;
......
......@@ -32,7 +32,7 @@
#include "qmlrewriter.h"
namespace QmlEditor {
namespace QmlDesigner {
namespace Internal {
class AddArrayMemberVisitor: public QMLRewriter
......@@ -67,6 +67,6 @@ private:
};
} // namespace Internal
} // namespace QmlEditor
} // namespace QmlDesigner
#endif // ADDARRAYMEMBERVISITOR_H
......@@ -32,8 +32,8 @@
#include "addobjectvisitor.h"
using namespace QmlEditor;
using namespace QmlEditor::Internal;
using namespace QmlDesigner;
using namespace QmlDesigner::Internal;
using namespace QmlJS;
using namespace QmlJS::AST;
......
......@@ -32,7 +32,7 @@
#include "qmlrewriter.h"
namespace QmlEditor {
namespace QmlDesigner {
namespace Internal {
class AddObjectVisitor: public QMLRewriter
......@@ -57,6 +57,6 @@ private:
};
} // namespace Internal
} // namespace QmlEditor
} // namespace QmlDesigner
#endif // ADDOBJECTVISITOR_H
......@@ -32,8 +32,8 @@
#include "addpropertyvisitor.h"
using namespace QmlEditor;
using namespace QmlEditor::Internal;
using namespace QmlDesigner;
using namespace QmlDesigner::Internal;
using namespace QmlJS;
using namespace QmlJS::AST;
......
......@@ -33,7 +33,7 @@
#include "qmlrefactoring.h"
#include "qmlrewriter.h"
namespace QmlEditor {
namespace QmlDesigner {
namespace Internal {
class AddPropertyVisitor: public QMLRewriter
......@@ -44,7 +44,7 @@ public:
quint32 parentLocation,
const QString &name,
const QString &value,
QmlEditor::QmlRefactoring::PropertyType propertyType,
QmlDesigner::QmlRefactoring::PropertyType propertyType,
const QStringList &propertyOrder);
protected:
......@@ -58,11 +58,11 @@ private:
quint32 m_parentLocation;
QString m_name;
QString m_value;
QmlEditor::QmlRefactoring::PropertyType m_propertyType;
QmlDesigner::QmlRefactoring::PropertyType m_propertyType;
QStringList m_propertyOrder;
};
} // namespace Internal
} // namespace QmlEditor
} // namespace QmlDesigner
#endif // ADDPROPERTYVISITOR_H
......@@ -30,7 +30,7 @@
#include "astobjecttextextractor.h"
#include "qmljsast_p.h"
using namespace QmlEditor;
using namespace QmlDesigner;
using namespace QmlJS::AST;
ASTObjectTextExtractor::ASTObjectTextExtractor(const QString &text):
......
......@@ -35,7 +35,7 @@
#include "qmldocument.h"
#include "qmljsastvisitor_p.h"
namespace QmlEditor {
namespace QmlDesigner {
class ASTObjectTextExtractor: public QmlJS::AST::Visitor
{
......@@ -54,6 +54,6 @@ private:
QString m_text;
};
} // namespace QmlEditor
} // namespace QmlDesigner
#endif // ASTOBJECTTEXTEXTRACTOR_H
......@@ -37,7 +37,7 @@ using namespace QmlJS::AST;
using namespace QmlDesigner;
using namespace QmlDesigner::Internal;
using namespace QmlEditor::Internal;
using namespace QmlDesigner::Internal;
ChangeImportsVisitor::ChangeImportsVisitor(TextModifier &textModifier, const QSet<Import> &addedImports, const QSet<Import> &removedImports, const QString &source):
QMLRewriter(textModifier),
......
......@@ -36,7 +36,7 @@
#include "import.h"
#include "qmlrewriter.h"
namespace QmlEditor {
namespace QmlDesigner {
namespace Internal {
class ChangeImportsVisitor: public QMLRewriter, protected QmlDesigner::Internal::CopyPasteUtil
......@@ -56,6 +56,6 @@ private:
};
} // namespace Internal
} // namespace QmlEditor
} // namespace QmlDesigner
#endif // CHANGEIMPORTSVISITOR_H
......@@ -33,7 +33,7 @@
using namespace QmlJS;
using namespace QmlJS::AST;
using namespace QmlEditor::Internal;
using namespace QmlDesigner::Internal;
ChangeObjectTypeVisitor::ChangeObjectTypeVisitor(QmlDesigner::TextModifier &modifier,
quint32 nodeLocation,
......
......@@ -32,7 +32,7 @@
#include "qmlrewriter.h"
namespace QmlEditor {
namespace QmlDesigner {
namespace Internal {
class ChangeObjectTypeVisitor: public QMLRewriter
......@@ -55,6 +55,6 @@ private:
};
} // namespace Internal
} // namespace QmlEditor
} // namespace QmlDesigner
#endif // CHANGEOBJECTTYPEVISITOR_H
......@@ -34,8 +34,8 @@
using namespace QmlJS;
using namespace QmlJS::AST;
using namespace QmlEditor;
using namespace QmlEditor::Internal;
using namespace QmlDesigner;
using namespace QmlDesigner::Internal;
ChangePropertyVisitor::ChangePropertyVisitor(QmlDesigner::TextModifier &modifier,
quint32 parentLocation,
......
......@@ -33,7 +33,7 @@
#include "qmlrefactoring.h"
#include "qmlrewriter.h"
namespace QmlEditor {
namespace QmlDesigner {
namespace Internal {
class ChangePropertyVisitor: public QMLRewriter
......@@ -65,6 +65,6 @@ private:
};
} // namespace Internal
} // namespace QmlEditor
} // namespace QmlDesigner
#endif // CHANGEPROPERTYVISITOR_H
......@@ -32,7 +32,7 @@
#include <qmljsast_p.h>
using namespace QmlDesigner;
using namespace QmlEditor;
using namespace QmlDesigner;
using namespace QmlJS::AST;
FirstDefinitionFinder::FirstDefinitionFinder(const QString &text):
......
......@@ -52,7 +52,7 @@ protected:
void extractFirstObjectDefinition(QmlJS::AST::UiObjectInitializer* ast);
private:
QmlEditor::QmlDocument::Ptr m_doc;
QmlDesigner::QmlDocument::Ptr m_doc;
quint32 m_offset;
QmlJS::AST::UiObjectDefinition *m_firstObjectDefinition;
......
......@@ -33,8 +33,8 @@
using namespace QmlJS;
using namespace QmlJS::AST;
using namespace QmlEditor;
using namespace QmlEditor::Internal;
using namespace QmlDesigner;
using namespace QmlDesigner::Internal;
QMap<QString, QmlIdSymbol*> IdCollector::operator()(const QString &fileName, QmlJS::AST::UiProgram *ast)
{
......
......@@ -38,7 +38,7 @@
#include "qmljsastvisitor_p.h"
#include "qmlsymbol.h"
namespace QmlEditor {
namespace QmlDesigner {
namespace Internal {
class IdCollector: protected QmlJS::AST::Visitor
......@@ -64,6 +64,6 @@ private:
};
} // namespace Internal
} // namespace QmlEditor
} // namespace QmlDesigner
#endif // IDCOLLECTOR_H
......@@ -29,7 +29,7 @@
#include "indenter.h"
using namespace QmlEditor;
using namespace QmlDesigner;
Indenter::Indenter()
{
......
......@@ -30,7 +30,7 @@
#ifndef INDENTER_H
#define INDENTER_H
namespace QmlEditor {
namespace QmlDesigner {
class Indenter
{
......@@ -38,6 +38,6 @@ public:
Indenter();
};
} // namespace QmlEditor
} // namespace QmlDesigner
#endif // INDENTER_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment