summaryrefslogtreecommitdiffstats
path: root/lib/kross/python
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2019-05-28 23:09:09 +0900
committerMichele Calgaro <[email protected]>2019-05-28 23:09:09 +0900
commit04a12485219f38e113932e8aa20b6bc12d8fa715 (patch)
tree68ee6acef9dfadc11fe8bd4d94f52d020cd8b7a1 /lib/kross/python
parent03eee956313fe6172f719669a1bd3d5739e023ba (diff)
downloadkoffice-04a12485219f38e113932e8aa20b6bc12d8fa715.tar.gz
koffice-04a12485219f38e113932e8aa20b6bc12d8fa715.zip
Adjusted to latest TQVariant::TQVariant(bool) function.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'lib/kross/python')
-rw-r--r--lib/kross/python/pythonextension.cpp2
-rw-r--r--lib/kross/python/pythonscript.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/kross/python/pythonextension.cpp b/lib/kross/python/pythonextension.cpp
index dbbe9bf6..efa13bd7 100644
--- a/lib/kross/python/pythonextension.cpp
+++ b/lib/kross/python/pythonextension.cpp
@@ -196,7 +196,7 @@ Kross::Api::Object::Ptr PythonExtension::toObject(const Py::Object& object)
if(type == &PyInt_Type)
return new Kross::Api::Variant(int(Py::Int(object)));
if(type == &PyBool_Type)
- return new Kross::Api::Variant(TQVariant(object.isTrue(),0));
+ return new Kross::Api::Variant(TQVariant(object.isTrue()));
if(type == &PyLong_Type)
return new Kross::Api::Variant(TQ_LLONG(long(Py::Long(object))));
if(type == &PyFloat_Type)
diff --git a/lib/kross/python/pythonscript.cpp b/lib/kross/python/pythonscript.cpp
index 5c2dec8b..d7835d52 100644
--- a/lib/kross/python/pythonscript.cpp
+++ b/lib/kross/python/pythonscript.cpp
@@ -107,7 +107,7 @@ void PythonScript::initialize()
// simply access the ScriptContainer itself from within
// python scripting code.
Py::Dict moduledict = d->m_module->getDict();
- moduledict["self"] = PythonExtension::toPyObject( m_scriptcontainer );
+ moduledict["self"] = PythonExtension::toPyObject( (Kross::Api::Object::Ptr)m_scriptcontainer );
//moduledict["parent"] = PythonExtension::toPyObject( m_manager );
/*
@@ -129,7 +129,7 @@ void PythonScript::initialize()
// Compile the python script code. It will be later on request
// executed. That way we cache the compiled code.
PyObject* code = 0;
- bool restricted = m_scriptcontainer->getOption("restricted", TQVariant(false,0), true).toBool();
+ bool restricted = m_scriptcontainer->getOption("restricted", TQVariant(false), true).toBool();
krossdebug( TQString("PythonScript::initialize() name=%1 restricted=%2").arg(m_scriptcontainer->getName()).arg(restricted) );
if(restricted) {