don't register print() in the declarative bindings: t' already there

svn path=/trunk/KDE/kdebase/runtime/; revision=1187930
This commit is contained in:
Marco Martin 2010-10-20 19:40:30 +00:00
parent 81879c1cf4
commit e054fbb8aa
4 changed files with 27 additions and 2 deletions

View File

@ -2,7 +2,7 @@
set(simple_javascript_engine_SRCS
common/javascriptaddonpackagestructure.cpp
common/scriptenvui.cpp
common/jsscriptenv.cpp
plasmoid/abstractjsappletscript.cpp
plasmoid/appletauthorization.cpp
plasmoid/jsappletinterface.cpp
@ -113,7 +113,7 @@ install(FILES data/plasma-javascriptaddon.desktop DESTINATION ${SERVICETYPES_INS
#DECLARATIVE APPLET
set(declarative_appletscript_SRCS
common/javascriptaddonpackagestructure.cpp
common/scriptenvui.cpp
common/declarativescriptenv.cpp
plasmoid/abstractjsappletscript.cpp
plasmoid/appletauthorization.cpp
plasmoid/appletinterface.cpp

View File

@ -0,0 +1,23 @@
/*
* Copyright 2010 Aaron J. Seigo <aseigo@kde.org>
*
* 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"
#include "scriptenv.moc"

View File

@ -70,7 +70,9 @@ void ScriptEnv::setupGlobalObject()
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));
}