Commit f2b60498 authored by Michael Palimaka's avatar Michael Palimaka

Port away from kdelibs4support and remove unused dependencies.

REVIEW: 125950
parent db2b17e8
......@@ -13,8 +13,8 @@ include(ECMOptionalAddSubdirectory)
# Where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules)
find_package(Qt5 5.2.0 CONFIG REQUIRED Core Gui Widgets Test)
find_package(KF5 5.11.0 REQUIRED Kross KDELibs4Support)
find_package(Qt5 5.2.0 CONFIG REQUIRED Core Gui Widgets)
find_package(KF5 5.11.0 REQUIRED Kross)
# ========================= Find Python 2 =========================
......
......@@ -24,7 +24,6 @@
#include <QtWidgets/QWidget>
#include <QtCore/QMetaMethod>
#include <QtTest/QSignalSpy>
#include <QtCore/QVarLengthArray>
namespace Kross {
......
......@@ -508,7 +508,7 @@ MetaType* PythonMetaTypeFactory::create(const char* typeName, const Py::Object&
// still no success. So, let's try to guess the content...
QVariant v = PythonType<QVariant>::toVariant(object);
if( qVariantCanConvert< Kross::Object::Ptr >(v) ) {
if( v.canConvert<Kross::Object::Ptr>() ) {
#ifdef KROSS_PYTHON_VARIANT_DEBUG
krossdebug( QString("PythonType<QVariant>::toPyObject Casting '%1' to Kross::Object::Ptr").arg(v.typeName()) );
#endif
......
......@@ -52,7 +52,7 @@ RubyModule::RubyModule(QObject* parent, QObject* object, const QString & modname
#endif
d->extension = new RubyExtension(object);
VALUE rmodule = rb_define_module(d->modulename.toAscii());
VALUE rmodule = rb_define_module(d->modulename.toLatin1());
rb_define_module_function(rmodule,"method_missing", (VALUE (*)(...))RubyModule::method_missing, -1);
VALUE extension = RubyExtension::toVALUE(d->extension, /*owner*/ false);
rb_define_const(rmodule, "MODULEOBJ", extension);
......
......@@ -42,7 +42,7 @@ namespace Kross {
static void* extractVoidStar(const VALUE& object)
{
QVariant v = RubyType<QVariant>::toVariant(object);
if( QObject* obj = qVariantCanConvert< QWidget* >(v) ? qvariant_cast< QWidget* >(v) : qVariantCanConvert< QObject* >(v) ? qvariant_cast< QObject* >(v) : 0 ) {
if( QObject* obj = v.canConvert< QWidget* >() ? qvariant_cast< QWidget* >(v) : v.canConvert< QObject* >() ? qvariant_cast< QObject* >(v) : 0 ) {
if( WrapperInterface* wrapper = dynamic_cast<WrapperInterface*>(obj) )
return wrapper->wrappedObject();
return obj;
......@@ -154,7 +154,7 @@ VALUE RubyType<QVariant>::toVALUE(const QVariant& v)
return RubyType<QVariantList>::toVALUE(l);
}
if( qVariantCanConvert< Kross::Object::Ptr >(v) ) {
if( v.canConvert< Kross::Object::Ptr >() ) {
#ifdef KROSS_RUBY_VARIANT_DEBUG
krossdebug( QString("RubyType<QVariant>::toPyObject Casting '%1' to Kross::Object::Ptr").arg(v.typeName()) );
#endif
......@@ -169,7 +169,7 @@ VALUE RubyType<QVariant>::toVALUE(const QVariant& v)
return rbobj->rbObject();
}
if( qVariantCanConvert< QWidget* >(v) ) {
if( v.canConvert< QWidget* >() ) {
#ifdef KROSS_RUBY_VARIANT_DEBUG
krossdebug( QString("RubyType<QVariant>::toVALUE Casting '%1' to QWidget").arg(v.typeName()) );
#endif
......@@ -183,7 +183,7 @@ VALUE RubyType<QVariant>::toVALUE(const QVariant& v)
return RubyExtension::toVALUE( new RubyExtension(widget), true /*owner*/ );
}
if( qVariantCanConvert< QObject* >(v) ) {
if( v.canConvert< QObject* >() ) {
#ifdef KROSS_RUBY_VARIANT_DEBUG
krossdebug( QString("RubyType<QVariant>::toVALUE Casting '%1' to QObject*").arg(v.typeName()) );
#endif
......@@ -197,7 +197,7 @@ VALUE RubyType<QVariant>::toVALUE(const QVariant& v)
return RubyExtension::toVALUE( new RubyExtension(obj), true /*owner*/ );
}
if( qVariantCanConvert< void* >(v) ) {
if( v.canConvert< void* >() ) {
return Data_Wrap_Struct( rb_cObject, 0, 0, qvariant_cast<void*>(v));
}
......@@ -482,7 +482,7 @@ MetaType* RubyMetaTypeFactory::create(const char* typeName, int typeId, int meta
}
QVariant v = RubyType<QVariant>::toVariant(value);
if( qVariantCanConvert< Kross::Object::Ptr >(v) ) {
if( v.canConvert< Kross::Object::Ptr >() ) {
#ifdef KROSS_RUBY_VARIANT_DEBUG
krossdebug( QString("RubyMetaTypeFactory::create Casting '%1' to Kross::Object::Ptr").arg(v.typeName()) );
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment