From c282d222d7085e7ca0891392a8f132d61b31e4e3 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 6 Feb 2013 17:42:35 +0100 Subject: [PATCH] get rid of declarativescriptenv --- .../qml/common/declarativescriptenv.cpp | 22 ------------------- scriptengines/qml/common/scriptenv.cpp | 8 ++----- scriptengines/qml/common/scriptenv.h | 3 --- 3 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 scriptengines/qml/common/declarativescriptenv.cpp diff --git a/scriptengines/qml/common/declarativescriptenv.cpp b/scriptengines/qml/common/declarativescriptenv.cpp deleted file mode 100644 index 5bebb202b..000000000 --- a/scriptengines/qml/common/declarativescriptenv.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2010 Aaron J. Seigo - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License version 2 as - * published by the Free Software Foundation - * - * 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 Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#define USEGUI -#define DECLARATIVE -#include "scriptenv.cpp" - diff --git a/scriptengines/qml/common/scriptenv.cpp b/scriptengines/qml/common/scriptenv.cpp index b79cd3d5a..b9c420b7a 100644 --- a/scriptengines/qml/common/scriptenv.cpp +++ b/scriptengines/qml/common/scriptenv.cpp @@ -65,9 +65,7 @@ void ScriptEnv::setupGlobalObject() global.setProperty("__plasma_scriptenv", m_engine->newQObject(this), QScriptValue::ReadOnly|QScriptValue::Undeletable|QScriptValue::SkipInEnumeration); // Add utility functions -#ifndef DECLARATIVE - global.setProperty("print", m_engine->newFunction(ScriptEnv::print)); -#endif + global.setProperty("debug", m_engine->newFunction(ScriptEnv::debug)); } @@ -522,6 +520,4 @@ bool ScriptEnv::removeEventListener(const QString &event, const QScriptValue &fu return found; } -#ifndef USEGUI -#include "scriptenv.moc" -#endif +#include "moc_scriptenv.cpp" diff --git a/scriptengines/qml/common/scriptenv.h b/scriptengines/qml/common/scriptenv.h index 41bfadd50..7e6ff315e 100644 --- a/scriptengines/qml/common/scriptenv.h +++ b/scriptengines/qml/common/scriptenv.h @@ -20,9 +20,6 @@ #ifndef SCRIPTENV_H #define SCRIPTENV_H -#define USEGUI -#define DECLARATIVE - #include #include #include