Bug 126928 - Qtruby QServerSocket not working
Summary: Qtruby QServerSocket not working
Status: RESOLVED WORKSFORME
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-07 23:13 UTC by Maël Clérambault
Modified: 2006-05-08 00:56 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maël Clérambault 2006-05-07 23:13:50 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Gentoo Packages
OS:                Linux

sample script:
--------------

require 'Qt'

class MyServer < Qt::ServerSocket
  def newConnection(socket)
    puts 'connection'
  end
end

Qt.debug_level = Qt::DebugLevel::High
s = MyServer.new(9000)
a = Qt::Application.new(ARGV)
a.exec


output:
--------

classname    == QServerSocket
:: method == QServerSocket
-> methodIds == [9115]
candidate list:
        QServerSocket* QServerSocket::QServerSocket(Q_UINT16)  (9115)
matching => 9115
      Q_UINT16 (i)
match => 9115 score: -99
No matching constructor found, possibles:
        QServerSocket* QServerSocket::QServerSocket(Q_UINT16, int)
        QServerSocket* QServerSocket::QServerSocket(const QHostAddress&, Q_UINT16, int, QObject*, const char*)
        QServerSocket* QServerSocket::QServerSocket(const QHostAddress&, Q_UINT16, int, QObject*)
        QServerSocket* QServerSocket::QServerSocket(Q_UINT16, int, QObject*, const char*)
        QServerSocket* QServerSocket::QServerSocket(const QHostAddress&, Q_UINT16)
        QServerSocket* QServerSocket::QServerSocket(QObject*, const char*)
        QServerSocket* QServerSocket::QServerSocket(QObject*)
        QServerSocket* QServerSocket::QServerSocket(Q_UINT16)
        QServerSocket* QServerSocket::QServerSocket()
        QServerSocket* QServerSocket::QServerSocket(Q_UINT16, int, QObject*)
        QServerSocket* QServerSocket::QServerSocket(const QHostAddress&, Q_UINT16, int)
setCurrentMethod()
/usr/lib/ruby/site_ruby/1.8/Qt/qtruby.rb:691:in `initialize': unresolved constructor call MyServer (ArgumentError)
        from /usr/lib/ruby/site_ruby/1.8/Qt/qtruby.rb:691:in `try_initialize'
        from /usr/lib/ruby/site_ruby/1.8/Qt/qtruby.rb:690:in `try_initialize'
        from qserversocket.rb:10
Comment 1 Richard Dale 2006-05-08 00:08:05 UTC
SVN commit 538419 by rdale:

* An an type of Q_UINT16 wasn't working with QtRuby. Fixes problem
  reported by maelclerambault.

CCBUGS: 126928


 M  +5 -0      ChangeLog  
 M  +1 -1      rubylib/qtruby/lib/Qt/qtruby.rb  


--- branches/KDE/3.5/kdebindings/qtruby/ChangeLog #538418:538419
@@ -1,3 +1,8 @@
+2006-05-07  Richard Dale  <rdale@foton.es>
+
+	* An an type of Q_UINT16 wasn't working with QtRuby. Fixes problem
+	  reported by maelclerambault.
+
 2006-05-03  Richard Dale  <rdale@foton.es>
 
 	* The qt_emit() and qt_invoke() methods are overriden by the QtRuby
--- branches/KDE/3.5/kdebindings/qtruby/rubylib/qtruby/lib/Qt/qtruby.rb #538418:538419
@@ -1163,7 +1163,7 @@
 			if argtype == 'i'
 				if typename =~ /^int&?$|^signed int&?$|^signed$|^Q_INT32&?$/
 					return 1
-				elsif typename =~ /^(?:short|ushort|unsigned short int|uchar|uint|long|ulong|unsigned long int|unsigned|float|double)$/
+				elsif typename =~ /^(?:short|ushort|unsigned short int|uchar|uint|long|ulong|unsigned long int|unsigned|float|double|Q_UINT32|Q_UINT16|Q_INT16)$/
 					return 0
 				else 
 					t = typename.sub(/^const\s+/, '')
Comment 2 Maël Clérambault 2006-05-08 00:56:50 UTC
Thanks, it solves it.