[Kde-bindings] KDE/kdebindings/ruby/qtruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Thu Apr 24 10:18:59 UTC 2008
SVN commit 800461 by rdale:
* Fixed a couple of differences between C++ code generation and Ruby.
The variable names weren't being stripped of any leading 'q' or 'k',
and the brush initialization hadn't been updated for Qt 4.4.
CCMAIL: kde-bindings at kde.org
M +6 -0 ChangeLog
M +2 -11 tools/rbuic/driver.cpp
M +2 -4 tools/rbuic/ruby/rbwriteinitialization.cpp
--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #800460:800461
@@ -1,3 +1,9 @@
+2008-04-24 Richard Dale <richard.j.dale at gmail.com>
+
+ * Fixed a couple of differences between C++ code generation and Ruby.
+ The variable names weren't being stripped of any leading 'q' or 'k',
+ and the brush initialization hadn't been updated for Qt 4.4.
+
2008-04-22 Sebastian Sauer <mail at dipe.org>
* Fix reported crash on shutdown if QtRuby is used embedded.
--- trunk/KDE/kdebindings/ruby/qtruby/tools/rbuic/driver.cpp #800460:800461
@@ -191,18 +191,9 @@
{
QString qname = name;
- if (qname.startsWith("Qt3::"))
- qname = qname.mid(strlen("Qt3::"));
+ if (qname.at(0) == QLatin1Char('Q') || qname.at(0) == QLatin1Char('K'))
+ qname = qname.mid(1);
- if (qname.startsWith("Qwt::"))
- qname = qname.mid(strlen("Qwt::"));
-
- if (qname.startsWith("Qt::"))
- qname = qname.mid(strlen("Qt::"));
-
- if (qname.startsWith("KDE::"))
- qname = qname.mid(strlen("KDE::"));
-
int i=0;
while (i < qname.length()) {
if (qname.at(i).toLower() != qname.at(i))
--- trunk/KDE/kdebindings/ruby/qtruby/tools/rbuic/ruby/rbwriteinitialization.cpp #800460:800461
@@ -1580,9 +1580,7 @@
while (itRole.hasNext()) {
const DomColorRole *colorRole = itRole.next();
if (colorRole->hasAttributeRole()) {
- const QString brushName = m_driver->unique(QLatin1String("brush"));
- writeBrush(colorRole->elementBrush(), brushName);
-
+ const QString brushName = writeBrushInitialization(colorRole->elementBrush());
m_output << m_option.indent << paletteName << ".setBrush(" << group
<< ", " << "Qt::Palette::" << colorRole->attributeRole()
<< ", " << brushName << ")\n";
@@ -1644,7 +1642,7 @@
m_output << m_option.indent << gradientName << " = Qt::ConicalGradient.new"
<< "(" << gradient->attributeCentralX()
<< ", " << gradient->attributeCentralY()
- << ", " << gradient->attributeAngle() << ");\n";
+ << ", " << gradient->attributeAngle() << ")\n";
}
m_output << m_option.indent << gradientName << ".spread = Qt::Gradient::"
More information about the Kde-bindings
mailing list