forked from qt-creator/qt-creator
Protect the rewriter.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "parser/javascriptast_p.h"
|
||||
|
||||
using namespace JavaScript;
|
||||
using namespace DuiEditor::Internal;
|
||||
|
||||
void Rewriter::replace(const AST::SourceLocation &loc, const QString &text)
|
||||
{ replace(loc.offset, loc.length, text); }
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
#include "textwriter.h"
|
||||
#include "parser/javascriptastvisitor_p.h"
|
||||
|
||||
namespace DuiEditor {
|
||||
namespace Internal {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Replacement
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -97,4 +100,7 @@ private:
|
||||
QList<Replacement> _replacementList;
|
||||
};
|
||||
|
||||
} // end of namespace Internal
|
||||
} // end of namespace DuiEditor
|
||||
|
||||
#endif // REWRITER_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "textwriter.h"
|
||||
|
||||
using namespace DuiEditor::Internal;
|
||||
|
||||
TextWriter::TextWriter()
|
||||
:string(0), cursor(0)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <QList>
|
||||
#include <QTextCursor>
|
||||
|
||||
namespace DuiEditor {
|
||||
namespace Internal {
|
||||
|
||||
class TextWriter
|
||||
{
|
||||
@@ -46,4 +48,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
} // end of namespace Internal
|
||||
} // end of namespace DuiEditor
|
||||
|
||||
#endif // TEXTWRITER_H
|
||||
|
||||
Reference in New Issue
Block a user