diff --git a/src/qmljsc/compiler.cpp b/src/qmljsc/compiler.cpp index d85facf..9304126 100644 --- a/src/qmljsc/compiler.cpp +++ b/src/qmljsc/compiler.cpp @@ -1,38 +1,33 @@ /* * * Copyright (C) 2015 Jan Marker * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include "symboltable.h" #include "compiler.h" using namespace QmlJSc; -QmlJSc::Compiler* QmlJSc::Compiler::s_self = 0; - QmlJSc::Compiler::Compiler(QObject *parent) : QObject(parent) { - Q_ASSERT_X(!s_self, "QmlJSc::QmlJSc", "QmlJSc should only exist once."); - s_self = this; } QmlJSc::Compiler::~Compiler() { - s_self = 0; } diff --git a/src/qmljsc/compiler.h b/src/qmljsc/compiler.h index 828679c..0c38781 100644 --- a/src/qmljsc/compiler.h +++ b/src/qmljsc/compiler.h @@ -1,48 +1,41 @@ /* * * Copyright (C) 2015 Jan Marker * Copyright (C) 2015 Anton Kreuzkamp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef QMLJSC_H #define QMLJSC_H #include namespace QmlJSc { -class SymbolTable; - -#define compiler QmlJSc::Compiler::instance() - class Compiler : public QObject { Q_OBJECT public: explicit Compiler(QObject *parent = 0); virtual ~Compiler(); - static Compiler* instance() { return s_self; } - private: - static Compiler* s_self; }; } #endif // QMLJSC_H