[Kde-bindings] Building QtRuby for Qt/Embedded
Steffen Beyer
serpent at centibel.org
Sun Mar 14 19:20:16 UTC 2010
On Sat, 20 Feb 2010 16:57:21 +0000, Steffen Beyer wrote:
> Now I'm stuck here:
>
> [root at centibel ~]# ruby -r Qt -e exit
> ASSERT failure in QList<T>::operator[]: "index out of range", file
> /usr/local/include/QtCore/qlist.h, line 447
> Aborted
Digged a little deeper on the Ruby side of code -- and found a way to get
(at least) some sample apps to run:
Index: ruby/qtruby/src/lib/Qt/qtruby4.rb
===================================================================
--- ruby/qtruby/src/lib/Qt/qtruby4.rb (revision 1103267)
+++ ruby/qtruby/src/lib/Qt/qtruby4.rb (working copy)
@@ -2446,7 +2446,8 @@
attr_accessor :index
def smoke
- if ! @smoke
+ warn "@smoke < 0" if @smoke < 0
+ if ! @smoke || @smoke < 0
return 0
end
return @smoke
@@ -2749,6 +2750,7 @@
def Internal.init_all_classes()
Qt::Internal::getClassList().each do |c|
+ warn "init #{c}"
if c == "Qt"
# Don't change Qt to Qt::t, just leave as is
@@cpp_names["Qt"] = c
This avoids invalid indexes while producing the following output:
[root at centibel application]# ruby ./main.rb -qws
init QAbstractAnimation
init QAbstractEventDispatcher
init QAbstractFileEngine
init QAbstractFileEngine::ExtensionOption
init QAbstractFileEngine::ExtensionReturn
init QAbstractFileEngine::MapExtensionOption
init QAbstractFileEngine::MapExtensionReturn
init QAbstractFileEngine::UnMapExtensionOption
init QAbstractFileEngineHandler
init QAbstractFileEngineIterator
[...]
init QDBusMessage
init QDBusMetaType
init QDBusPendingCall
init QDBusPendingCallWatcher
init QDBusServer
init QDBusServiceWatcher
init QGlobalSpace
init QBitArray&
@smoke < 0
init QByteArray&
@smoke < 0
init QChildEvent*
@smoke < 0
init QDBusAbstractInterface*
@smoke < 0
init QDBusArgument::ElementType
@smoke < 0
init QDBusConnection*
@smoke < 0
init QDBusConnection::RegisterOptions
@smoke < 0
init QDBusConnectionInterface*
@smoke < 0
init QDBusConnectionInterface::ServiceReplacementOptions
@smoke < 0
init QDBusError&
@smoke < 0
init QDBusInterface*
@smoke < 0
init QDBusMessage*
@smoke < 0
init QDBusObjectPath&
@smoke < 0
init QDBusPendingCall*
@smoke < 0
init QDBusReply<QString>
@smoke < 0
init QDBusReply<unsigned int>
@smoke < 0
init QDBusServiceWatcher*
@smoke < 0
init QDBusServiceWatcher::WatchModeFlag
@smoke < 0
init QDataStream&
@smoke < 0
init QDebug
@smoke < 0
init QDir::SortFlags::enum_type
@smoke < 0
init QEventLoop::ProcessEventsFlags::enum_type
@smoke < 0
init QFlags<QDBusConnection::RegisterOptions::enum_type>
@smoke < 0
init QFlags<QDir::SortFlags::enum_type>
@smoke < 0
init QFlags<QFile::Permissions::enum_type>
@smoke < 0
init QFlags<QLocale::NumberOptions::enum_type>
@smoke < 0
init QFlags<QTextStream::NumberFlags::enum_type>
@smoke < 0
init QFlags<Qt::DockWidgetAreas::enum_type>
@smoke < 0
init QFlags<Qt::ImageConversionFlags::enum_type>
@smoke < 0
init QFlags<Qt::KeyboardModifiers::enum_type>
@smoke < 0
init QFlags<Qt::Orientations::enum_type>
@smoke < 0
init QFlags<Qt::TouchPointStates::enum_type>
@smoke < 0
init QIODevice::OpenMode
@smoke < 0
init QLibrary::LoadHints::enum_type
@smoke < 0
init QList<QVariant>
@smoke < 0
init QLocale::NumberOptions::enum_type
@smoke < 0
init QObject*(*)()
@smoke < 0
init QRect&
@smoke < 0
init QSize&
@smoke < 0
init QString&
@smoke < 0
init QStringList
@smoke < 0
init QTextCodec::ConversionFlags::enum_type
@smoke < 0
init QTextStream::NumberFlags::enum_type
@smoke < 0
init QTimerEvent*
@smoke < 0
init QUuid&
@smoke < 0
init QVariant::Type
@smoke < 0
init Qt::AlignmentFlag
@smoke < 0
init Qt::ApplicationAttribute
@smoke < 0
init Qt::Axis
@smoke < 0
init Qt::CaseSensitivity
@smoke < 0
init Qt::ConnectionType
@smoke < 0
init Qt::Corner
@smoke < 0
init Qt::DayOfWeek
@smoke < 0
init Qt::DockWidgetAreas::enum_type
@smoke < 0
init Qt::EventPriority
@smoke < 0
Don't know enough about Qt yet to say if this gives me a usable binding or
brakes some important classes...?
Kind regards,
--
Steffen Beyer <serpent at centibel.org>
GnuPG key fingerprint: CA00 1611 242B 89D4 E643 E235 05F3 7689 DD3E EB26
Public key available upon request or at http://wwwkeys.de.pgp.net
More information about the Kde-bindings
mailing list