Hello community, here is the log from the commit of package perl-qt4 for openSUSE:Factory checked in at 2012-01-27 15:23:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-qt4 (Old) and /work/SRC/openSUSE:Factory/.perl-qt4.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-qt4", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-qt4/perl-qt4.changes 2011-12-08 11:30:51.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-qt4.new/perl-qt4.changes 2012-01-27 15:23:11.000000000 +0100 @@ -1,0 +2,16 @@ +Wed Jan 18 21:00:53 CET 2012 - [email protected] + +- update to 4.8.0 + * first stable release of KDE 4.8 (only critical fixes over 4.7.98) + * see http://kde.org/announcements/4.8/ for details + + +------------------------------------------------------------------- +Tue Jan 10 16:34:56 CET 2012 - [email protected] + +- update to 4.7.98 + * RC2+ milestone release of KDE 4.8 + * see http://kde.org/announcements/4.8/ for details + + +------------------------------------------------------------------- Old: ---- perlqt-4.7.4.tar.bz2 New: ---- perlqt-4.8.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-qt4.spec ++++++ --- /var/tmp/diff_new_pack.TBVcv2/_old 2012-01-27 15:23:12.000000000 +0100 +++ /var/tmp/diff_new_pack.TBVcv2/_new 2012-01-27 15:23:12.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-qt4 # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,14 +16,13 @@ # - Name: perl-qt4 -Version: 4.7.4 -Release: 1 -License: GPL-2.0+ +Version: 4.8.0 +Release: 0 Summary: PerlQt kdebindings library -Url: https://projects.kde.org/projects/kde/kdebindings/perl/perlqt +License: GPL-2.0+ Group: Development/Languages/Perl +Url: https://projects.kde.org/projects/kde/kdebindings/perl/perlqt Source0: perlqt-%{version}.tar.bz2 BuildRequires: cmake BuildRequires: kde4-filesystem @@ -44,7 +43,6 @@ Perl bindings for the Qt4 libraries from the kdebindings project. %package devel -License: GPL-2.0+ Summary: Development libraries for Perl-Qt4 Group: Development/Languages/Perl Requires: %{name} = %{version} ++++++ perlqt-4.7.4.tar.bz2 -> perlqt-4.8.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perlqt-4.7.4/INSTALL new/perlqt-4.8.0/INSTALL --- old/perlqt-4.7.4/INSTALL 2011-06-22 18:34:24.000000000 +0200 +++ new/perlqt-4.8.0/INSTALL 2011-07-27 20:37:34.000000000 +0200 @@ -1,9 +1,9 @@ PerlQt version 0.96 =================== -For simple install instructions, see the README file. +For simple installation instructions, see the README file. -This module uses cmake for it's build system. If you don't have it, you can +This module uses cmake for its build system. If you don't have it, you can download the most recent version at http://www.cmake.org/cmake/resources/software.html @@ -16,14 +16,16 @@ source tree if you use an out-of-source build, as described below. === CMake === -First, I recommend building the module in it's own directory. Type: +First, I recommend building the module in its own directory. Type: mkdir build cd build cmake provides a nice 'GUI'ish interface to view compile time options. To view -this, type: +this, type either: + cmake-gui .. + +Or if it's not available: ccmake .. - c Once that finishes, exit with 'q', and type: cmake .. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perlqt-4.7.4/qtcore/tools/puic/perl/plwritedeclaration.cpp new/perlqt-4.8.0/qtcore/tools/puic/perl/plwritedeclaration.cpp --- old/perlqt-4.7.4/qtcore/tools/puic/perl/plwritedeclaration.cpp 2011-06-22 18:34:24.000000000 +0200 +++ new/perlqt-4.8.0/qtcore/tools/puic/perl/plwritedeclaration.cpp 2011-07-27 20:37:34.000000000 +0200 @@ -102,64 +102,23 @@ m_output << m_option.indent << "@" << connection << "Connection = Qt::SqlDatabase.new\n"; } - TreeWalker::acceptWidget(node->elementWidget()); - - m_output << "\n"; - - WriteInitialization(m_uic).acceptUI(node); - -/* if (node->elementImages()) { WriteIconDeclaration(m_uic).acceptUI(node); - m_output << m_option.indent << m_option.indent << "unknown_ID = " - << node->elementImages()->elementImage().size() << "\n" - << m_option.indent << "\n"; - - WriteIconInitialization(m_uic).acceptUI(node); + m_output << "use constant unknown_ID => " + << node->elementImages()->elementImage().size() << ";\n\n"; } - m_output << "end\n\n"; - - it.toBack(); - while (it.hasPrevious()) { - QString ns = it.previous(); - if (ns.isEmpty()) - continue; - } - - if (namespaceList.count()) - m_output << "\n"; - - if (m_option.generateNamespace && !m_option.prefix.isEmpty()) { - namespaceList.append(QLatin1String("Ui")); + TreeWalker::acceptWidget(node->elementWidget()); - QListIterator<QString> it(namespaceList); - while (it.hasNext()) { - QString ns = it.next(); - if (ns.isEmpty()) - continue; - - m_output << "module " << ns.mid(0, 1).toUpper() << ns.mid(1) << "\n"; - } - - m_output << m_option.indent << "class " << className << " < " << m_option.prefix << className << "\n"; - m_output << m_option.indent << "end\n"; - - it.toBack(); - while (it.hasPrevious()) { - QString ns = it.previous(); - if (ns.isEmpty()) - continue; + m_output << "\n"; - m_output << "end # module " << ns << "\n"; - } + WriteInitialization(m_uic).acceptUI(node); - if (namespaceList.count()) - m_output << "\n"; + if (node->elementImages()) { + WriteIconInitialization(m_uic).acceptUI(node); } -*/ m_output << "1;"; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perlqt-4.7.4/qtcore/tools/puic/perl/plwriteicondata.cpp new/perlqt-4.8.0/qtcore/tools/puic/perl/plwriteicondata.cpp --- old/perlqt-4.7.4/qtcore/tools/puic/perl/plwriteicondata.cpp 2011-06-22 18:34:24.000000000 +0200 +++ new/perlqt-4.8.0/qtcore/tools/puic/perl/plwriteicondata.cpp 2011-07-27 20:37:34.000000000 +0200 @@ -137,7 +137,7 @@ int a = 0; int column = 0; bool inQuote = false; - output << indent << indent << indent << img << " = [" << endl; + output << indent << "my @" << img << " = (" << endl; while (baunzip[a] != '\"') a++; // For perl we need to ignore the '};\n' at the end of the data. @@ -155,9 +155,9 @@ column = 1; } } - output << "]" << endl; + output << ");" << endl; } else { - output << indent << indent << indent << img << " = [\n"; + output << indent << "my @" << img << " = (\n"; output << indent; int a ; for (a = 0; a < (int) (data.length()/2)-1; a++) { @@ -168,7 +168,7 @@ output << " "; } output << "0x" << QString(data[2*a]) << QString(data[2*a+1]) << "\n"; - output << "]\n\n"; + output << ");\n\n"; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perlqt-4.7.4/qtcore/tools/puic/perl/plwriteicondeclaration.cpp new/perlqt-4.8.0/qtcore/tools/puic/perl/plwriteicondeclaration.cpp --- old/perlqt-4.7.4/qtcore/tools/puic/perl/plwriteicondeclaration.cpp 2011-06-22 18:34:24.000000000 +0200 +++ new/perlqt-4.8.0/qtcore/tools/puic/perl/plwriteicondeclaration.cpp 2011-07-27 20:37:34.000000000 +0200 @@ -78,7 +78,7 @@ driver->insertPixmap(name); QString imageId = name; imageId.replace("image", ""); - output << option.indent << option.indent << name << "_ID = " << imageId << "\n"; + output << "use constant " << name << "_ID => " << imageId << ";\n"; } } // namespace Perl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perlqt-4.7.4/qtcore/tools/puic/perl/plwriteiconinitialization.cpp new/perlqt-4.8.0/qtcore/tools/puic/perl/plwriteiconinitialization.cpp --- old/perlqt-4.7.4/qtcore/tools/puic/perl/plwriteiconinitialization.cpp 2011-06-22 18:34:24.000000000 +0200 +++ new/perlqt-4.8.0/qtcore/tools/puic/perl/plwriteiconinitialization.cpp 2011-07-27 20:37:34.000000000 +0200 @@ -70,24 +70,21 @@ QString className = node->elementClass() + option.postfix; - output << option.indent << "def self.icon(id)\n"; + output << "sub icon {\n"; + output << option.indent << "my ($id) = @_;\n"; WriteIconData(uic).acceptUI(node); - output << option.indent << option.indent << "case id\n"; - TreeWalker::acceptUI(node); - output << option.indent << option.indent << "else\n"; - output << option.indent << option.indent << option.indent << "return Qt::Pixmap.new\n"; + output << option.indent << "return Qt::Pixmap();\n"; - output << option.indent << option.indent << "end\n" - << option.indent << "end\n\n"; + output << "}\n\n"; } QString WriteIconInitialization::iconFromDataFunction() { - return QLatin1String("qt_get_icon"); + return QLatin1String("$self->icon"); } void WriteIconInitialization::acceptImages(DomImages *images) @@ -103,19 +100,21 @@ QString imageId = image->attributeName() + QLatin1String("_ID"); QString imageData = image->attributeName() + QLatin1String("_data"); - QString ind = option.indent + option.indent; + QString ind = option.indent; - output << ind << "when " << imageId << "\n"; + output << ind << "if( $id == " << imageId << " ) {\n"; if (fmt == QLatin1String("XPM.GZ")) { - output << option.indent << option.indent << option.indent << "return " << "Qt::Pixmap.new(" << imageData << ")\n"; + output << option.indent << option.indent << "return " << "Qt::Pixmap(@" << imageData << ");\n"; + output << option.indent << "}\n"; } else { - output << option.indent << option.indent << option.indent << - " img = Qt::Image.new\n"; - output << option.indent << option.indent << option.indent << "img.loadFromData(" << imageData << ", " << - "imageData.length, " << fixString(fmt, ind) << ")\n"; - output << option.indent << option.indent << option.indent << - "return Qt::Pixmap.fromImage(img)\n"; + output << option.indent << option.indent << + "my $img = Qt::Image();\n"; + output << option.indent << option.indent << "$img->loadFromData(" << imageData << ", " << + "$imageData->length, " << fixString(fmt, ind) << ");\n"; + output << option.indent << option.indent << + "return Qt::Pixmap->fromImage($img)\n"; + output << option.indent << "}\n"; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perlqt-4.7.4/qtcore/tools/puic/perl/plwriteinitialization.cpp new/perlqt-4.8.0/qtcore/tools/puic/perl/plwriteinitialization.cpp --- old/perlqt-4.7.4/qtcore/tools/puic/perl/plwriteinitialization.cpp 2011-06-22 18:34:24.000000000 +0200 +++ new/perlqt-4.8.0/qtcore/tools/puic/perl/plwriteinitialization.cpp 2011-07-27 20:37:34.000000000 +0200 @@ -548,11 +548,11 @@ m_layoutMarginType = m_widgetChain.count() == 1 ? TopLevelMargin : ChildMargin; const QString className = node->attributeClass(); QString varNameNoSigil = m_driver->findOrInsertWidget(node); + varNameNoSigil = varNameNoSigil.mid(0, 1).toLower() + varNameNoSigil.mid(1); QString varName = toPerlIdentifier(varNameNoSigil); - QString varNameGetter = "$self->" + varNameNoSigil + "()"; + QString varNameGetter = "$self->{" + varNameNoSigil + "}"; m_registeredWidgets.insert(varName, node); // register the current widget - //varName = varName.mid(0, 1).toLower() + varName.mid(1); QString parentWidget, parentWidgetNoSigil, parentClass; if (m_widgetChain.top()) { @@ -717,12 +717,12 @@ m_output << m_option.indent << parentWidget << "->addItem( " << varName << icon << ", " << trCall(label) << " );\n"; - m_refreshOut << m_option.indent << "$self->" << parentWidgetNoSigil << "()->setItemText( " - << "$self->" << parentWidgetNoSigil << "()->indexOf( " << varNameGetter << "), " << trCall(label) << " );\n"; + m_refreshOut << m_option.indent << "$self->{" << parentWidgetNoSigil << "}->setItemText( " + << "$self->{" << parentWidgetNoSigil << "}->indexOf( " << varNameGetter << "), " << trCall(label) << " );\n"; if (DomProperty *ptoolTip = attributes.value(QLatin1String("toolTip"))) { - m_refreshOut << m_option.indent << "$self->" << parentWidgetNoSigil << "()->setItemToolTip( " - << "$self->" << parentWidgetNoSigil << "()->indexOf( " << varNameGetter << "), " << trCall(ptoolTip->elementString()) << " );\n"; + m_refreshOut << m_option.indent << "$self->{" << parentWidgetNoSigil << "}->setItemToolTip( " + << "$self->{" << parentWidgetNoSigil << "}->indexOf( " << varNameGetter << "), " << trCall(ptoolTip->elementString()) << " );\n"; } } else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QTabWidget"))) { QString icon; @@ -733,17 +733,17 @@ m_output << m_option.indent << parentWidget << "->addTab( " << varName << icon << ", " << trCall(title) << " );\n"; - m_refreshOut << m_option.indent << "$self->" << parentWidgetNoSigil << "()->setTabText( " - << "$self->" << parentWidgetNoSigil << "()->indexOf( " << varNameGetter << "), " << trCall(title) << " );\n"; + m_refreshOut << m_option.indent << "$self->{" << parentWidgetNoSigil << "}->setTabText( " + << "$self->{" << parentWidgetNoSigil << "}->indexOf( " << varNameGetter << "), " << trCall(title) << " );\n"; if (const DomProperty *ptoolTip = attributes.value(QLatin1String("toolTip"))) { - m_refreshOut << m_option.indent << "$self->" << parentWidgetNoSigil << "()->setTabToolTip( " - << "$self->" << parentWidgetNoSigil << "()->indexOf( " << varNameGetter << "), " << trCall(ptoolTip->elementString()) << " );\n"; + m_refreshOut << m_option.indent << "$self->{" << parentWidgetNoSigil << "}->setTabToolTip( " + << "$self->{" << parentWidgetNoSigil << "}->indexOf( " << varNameGetter << "), " << trCall(ptoolTip->elementString()) << " );\n"; } } else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("Q3Wizard"))) { m_output << m_option.indent << parentWidget << "->addPage( " << varName << ", " << trCall(title) << " );\n"; - m_refreshOut << m_option.indent << "$self->" << parentWidgetNoSigil << "()->setTitle( " + m_refreshOut << m_option.indent << "$self->{" << parentWidgetNoSigil << "}->setTitle( " << varName << ", " << trCall(title) << " );\n"; } @@ -813,12 +813,12 @@ m_output << m_option.indent << "$self->{" << varNameNoSigil << "} = " << varName << ";\n"; if (isGroupBox) { - const QString tempName = m_driver->unique(QLatin1String("boxlayout")); + const QString tempName = toPerlIdentifier(m_driver->unique(QLatin1String("boxlayout"))); QString widget = m_driver->findOrInsertWidget(m_widgetChain.top()); widget = widget.mid(0, 1).toLower() + widget.mid(1); widget.prepend("$"); - m_output << m_option.indent << "" << tempName << " = " << + m_output << m_option.indent << "my " << tempName << " = " << widget << "->layout();\n"; m_output << m_option.indent << "if ( " << tempName << " ) {\n"; m_output << m_option.indent << " " << tempName << "->addLayout( " << varName << " );\n"; @@ -927,7 +927,7 @@ if (layout->attributeClass() == QLatin1String("QFormLayout")) { methodPrefix = QLatin1String("set"); const int row = node->attributeRow(); - const QString role = node->attributeColumn() == 0 ? QLatin1String("Qt::FormLayout::LabelRole") : QLatin1String("Qt::FormLayout::FieldRole"); + const QString role = node->attributeColumn() == 0 ? QLatin1String("Qt::FormLayout::LabelRole()") : QLatin1String("Qt::FormLayout::FieldRole()"); addArgs = QString::fromLatin1("%1, %2, %3").arg(row).arg(role).arg(itemName); } else { addArgs = itemName; @@ -955,18 +955,17 @@ void WriteInitialization::acceptActionGroup(DomActionGroup *node) { - QString actionName = toPerlIdentifier(m_driver->findOrInsertActionGroup(node)); + QString actionNameNoSigil = m_driver->findOrInsertActionGroup(node); + actionNameNoSigil = actionNameNoSigil.mid(0, 1).toLower() + actionNameNoSigil.mid(1); + QString actionName = toPerlIdentifier(actionNameNoSigil); - QString varName = m_driver->findOrInsertWidget(m_widgetChain.top()); - varName = varName.mid(0, 1).toLower() + varName.mid(1); - if (m_widgetChain.count() > 2) { - varName.prepend("$"); - } + QString varName = toPerlIdentifier(m_driver->findOrInsertWidget(m_widgetChain.top())); if (m_actionGroupChain.top()) varName = m_driver->findOrInsertActionGroup(m_actionGroupChain.top()); - m_output << m_option.indent << actionName << " = Qt::ActionGroup( " << varName << " );\n"; + m_output << m_option.indent << "my " << actionName << " = Qt::ActionGroup( " << varName << " );\n"; + m_output << m_option.indent << "$self->{" << actionNameNoSigil << "} = " << actionName << ";\n"; writeProperties(actionName, QLatin1String("QActionGroup"), node->elementProperty()); m_actionGroupChain.push(node); @@ -1388,8 +1387,8 @@ // has 2 arguments, $self and the object to which the ui // belongs. If this is an operation on the 2nd argument, use // $varName. Otherwise, it's a member of the ui implementation - // file, so use $self->varName(). - varNewName = "$self->" + varNewName.mid(1) + "()"; + // file, so use $self->{varName}. + varNewName = "$self->{" + varNewName.mid(1, 2).toLower() + varNewName.mid(3) + "}"; } o << m_option.indent << varNewName << setFunction << propertyValue; @@ -1534,7 +1533,7 @@ m_iconPropertiesNameMap.insert(IconHandle(i), iconName); if (isIconFormat44(i)) { const QString pixmap = QLatin1String("Qt::Pixmap"); - m_output << m_option.indent << "my " << iconName << " = Qt::Icon\n"; + m_output << m_option.indent << "my " << iconName << " = Qt::Icon();\n"; if (i->hasElementNormalOff()) m_output << m_option.indent << iconName << "->addPixmap(" << pixCall(pixmap, i->elementNormalOff()->text()) << ", Qt::Icon::Normal(), Qt::Icon::Off() );\n"; if (i->hasElementNormalOn()) @@ -1552,7 +1551,7 @@ if (i->hasElementSelectedOn()) m_output << m_option.indent << iconName << "->addPixmap(" << pixCall(pixmap, i->elementSelectedOn()->text()) << ", Qt::Icon::Selected(), Qt::Icon::On() );\n"; } else { // pre-4.4 legacy - m_output << m_option.indent << "my " << iconName << " = " << pixCall(QLatin1String("Qt::Icon"), i->text())<< ";\n"; + m_output << m_option.indent << "my " << iconName << " = " << "Qt::Icon(" << pixCall(QLatin1String("Qt::Icon"), i->text()) << ");\n"; } return iconName; } @@ -1581,10 +1580,10 @@ for (int i=0; i<colors.size(); ++i) { DomColor *color = colors.at(i); - m_output << m_option.indent << paletteName << ".setColor(" << group + m_output << m_option.indent << paletteName << "->setColor(" << group << ", " << i << ", " << domColor2QString(color) - << ")\n"; + << ");\n"; } // new format @@ -2011,7 +2010,7 @@ } if (noIcons) { - m_refreshOut << m_option.indent << "$self->" << varNameNoSigil << "()->insertItems(0, [" ; + m_refreshOut << m_option.indent << "$self->{" << varNameNoSigil << "}->insertItems(0, [" ; for (int i = 0; i < list.size(); ++i) { m_refreshOut << list.at(i); if (i != (list.size() - 1)) { @@ -2030,13 +2029,13 @@ if (icon) iconValue = iconCall(icon); - m_output << m_option.indent << varName << ".addItem("; + m_output << m_option.indent << varName << "->addItem("; if (icon) m_output << iconValue << ", "; m_output << "\"\");\n"; if (!toString(text->elementString()).isEmpty()) - m_refreshOut << m_option.indent << varName << ".setItemText(" << i << ", " << trCall(text->elementString()) << ");\n"; + m_refreshOut << m_option.indent << "$self->{" << varNameNoSigil << "}->setItemText(" << i << ", " << trCall(text->elementString()) << ");\n"; } m_refreshOut << "\n"; } @@ -2050,8 +2049,8 @@ tempName = toPerlIdentifier(m_driver->unique(QLatin1String("__sortingEnabled"))); m_refreshOut << "\n"; m_refreshOut << m_option.indent << "my " << tempName - << " = " << "$self->" << varName << "()->isSortingEnabled();\n"; - m_refreshOut << m_option.indent << "$self->" << varName << "()->setSortingEnabled( 0 );\n"; + << " = " << "$self->{" << varName << "}->isSortingEnabled();\n"; + m_refreshOut << m_option.indent << "$self->{" << varName << "}->setSortingEnabled( 0 );\n"; } return tempName; } @@ -2060,7 +2059,7 @@ { if (!w->elementItem().isEmpty()) { m_refreshOut << "\n"; - m_refreshOut << m_option.indent << "$self->" << varName << "()->setSortingEnabled( " << tempName << " );\n"; + m_refreshOut << m_option.indent << "$self->{" << varName << "}->setSortingEnabled( " << tempName << " );\n"; } } @@ -2095,7 +2094,7 @@ } if (!toString(text->elementString()).isEmpty()) { - m_refreshOut << m_option.indent << "$self->" << varNameNoSigil << "()->item(" << i << ")->setText( " << trCall(text->elementString()) << " );\n"; + m_refreshOut << m_option.indent << "$self->{" << varNameNoSigil << "}->item(" << i << ")->setText( " << trCall(text->elementString()) << " );\n"; } } enableSorting(w, varNameNoSigil, tempName); @@ -2118,7 +2117,7 @@ if (!toString(text->elementString()).isEmpty()) { const QString txt = trCall(text->elementString()); - m_refreshOut << m_option.indent << "$self->" << varNameNoSigil << "()->headerItem()->setText(" << i << ", " << txt << ");\n"; + m_refreshOut << m_option.indent << "$self->{" << varNameNoSigil << "}->headerItem()->setText(" << i << ", " << txt << ");\n"; } if (icon) { @@ -2189,16 +2188,18 @@ void WriteInitialization::initializeTableWidget(DomWidget *w) { - QString varName = toPerlIdentifier(m_driver->findOrInsertWidget(w)); + QString varNameNoSigil = m_driver->findOrInsertWidget(w); + QString varName = toPerlIdentifier(varNameNoSigil); QString className = w->attributeClass(); // columns QList<DomColumn *> columns = w->elementColumn(); + m_refreshOut << m_option.indent << "my " << varName << " = $self->{" << varNameNoSigil << "};\n"; if (columns.size() != 0) { - m_refreshOut << m_option.indent << "if " << varName << ".columnCount < " << columns.size() << "\n" - << m_option.indent << m_option.indent << varName << ".columnCount = " << columns.size() << "\n" - << m_option.indent << "end\n"; + m_refreshOut << m_option.indent << "if ( " << varName << "->columnCount < " << columns.size() << " ) {\n" + << m_option.indent << m_option.indent << varName << "->setColumnCount(" << columns.size() << ");\n" + << m_option.indent << "}\n"; } for (int i = 0; i < columns.size(); ++i) { @@ -2208,10 +2209,10 @@ DomProperty *text = properties.value(QLatin1String("text")); DomProperty *icon = properties.value(QLatin1String("icon")); if (text || icon) { - QString itemName = m_driver->unique(QLatin1String("__colItem")); + QString itemName = toPerlIdentifier(m_driver->unique(QLatin1String("__colItem"))); m_refreshOut << "\n"; m_refreshOut << m_option.indent - << itemName << " = Qt::TableWidgetItem.new\n"; + << "my " << itemName << " = Qt::TableWidgetItem();\n"; if (text && text->attributeName() == QLatin1String("text")) m_refreshOut << m_option.indent << itemName << "->setText( " @@ -2220,7 +2221,7 @@ if (icon && icon->attributeName() == QLatin1String("icon")) m_refreshOut << m_option.indent << itemName << "->setIcon( " << pixCall(icon) << " );\n"; - m_refreshOut << m_option.indent << varName << ".setHorizontalHeaderItem( " + m_refreshOut << m_option.indent << varName << "->setHorizontalHeaderItem( " << i << ", " << itemName << " );\n"; } } @@ -2229,9 +2230,9 @@ QList<DomRow *> rows = w->elementRow(); if (rows.size() != 0) { - m_refreshOut << m_option.indent << "if " << varName << ".rowCount < " << rows.size() << "\n" - << m_option.indent << m_option.indent << varName << ".rowCount = " << rows.size() << "\n" - << m_option.indent << "end\n"; + m_refreshOut << m_option.indent << "if ( " << varName << "->rowCount() < " << rows.size() << " ) {\n" + << m_option.indent << m_option.indent << varName << "->setRowCount(" << rows.size() << ");\n" + << m_option.indent << "}\n"; } for (int i = 0; i < rows.size(); ++i) { @@ -2241,10 +2242,10 @@ DomProperty *text = properties.value(QLatin1String("text")); DomProperty *icon = properties.value(QLatin1String("icon")); if (text || icon) { - QString itemName = m_driver->unique(QLatin1String("__rowItem")); + QString itemName = toPerlIdentifier(m_driver->unique(QLatin1String("__rowItem"))); m_refreshOut << "\n"; m_refreshOut << m_option.indent - << itemName << " = Qt::TableWidgetItem();\n"; + << "my " << itemName << " = Qt::TableWidgetItem();\n"; if (text && text->attributeName() == QLatin1String("text")) m_refreshOut << m_option.indent << itemName << "->setText( " @@ -2267,10 +2268,10 @@ DomProperty *text = properties.value(QLatin1String("text")); DomProperty *icon = properties.value(QLatin1String("icon")); if (text || icon) { - QString itemName = m_driver->unique(QLatin1String("__item")); + QString itemName = toPerlIdentifier(m_driver->unique(QLatin1String("__item"))); m_refreshOut << "\n"; m_refreshOut << m_option.indent - << itemName << " = Qt::TableWidgetItem();\n"; + << "my " << itemName << " = Qt::TableWidgetItem();\n"; if (text && text->attributeName() == QLatin1String("text")) m_refreshOut << m_option.indent << itemName << "->setText( " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perlqt-4.7.4/qtcore/tools/puic/uic.cpp new/perlqt-4.8.0/qtcore/tools/puic/uic.cpp --- old/perlqt-4.7.4/qtcore/tools/puic/uic.cpp 2011-06-22 18:34:24.000000000 +0200 +++ new/perlqt-4.8.0/qtcore/tools/puic/uic.cpp 2011-07-27 20:37:34.000000000 +0200 @@ -139,8 +139,12 @@ { QString comment = ui->elementComment(); if ( this->option().generator == Option::PerlGenerator ) { + comment.insert( 0, "# " ); + comment.replace( QRegExp("\n"), "\n# " ); if (comment.size()) - out << "/*\n" << comment << "\n*/\n\n"; + out << "###############################################################################\n" + << comment + << "\n###############################################################################\n\n"; out << "#################################################################################\n"; out << "## Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perlqt-4.7.4/qtcore/tools/puic/utils.h new/perlqt-4.8.0/qtcore/tools/puic/utils.h --- old/perlqt-4.7.4/qtcore/tools/puic/utils.h 2011-06-22 18:34:24.000000000 +0200 +++ new/perlqt-4.8.0/qtcore/tools/puic/utils.h 2011-07-27 20:37:34.000000000 +0200 @@ -81,11 +81,6 @@ cursegment += QLatin1Char(cbyte); } } - - if (cursegment.length() > 1024) { - result << cursegment; - cursegment.clear(); - } } if (!cursegment.isEmpty()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perlqt-4.7.4/qtgui/t/itemviewspuzzle.t new/perlqt-4.8.0/qtgui/t/itemviewspuzzle.t --- old/perlqt-4.7.4/qtgui/t/itemviewspuzzle.t 2011-06-22 18:34:24.000000000 +0200 +++ new/perlqt-4.8.0/qtgui/t/itemviewspuzzle.t 2011-07-27 20:37:34.000000000 +0200 @@ -28,15 +28,52 @@ my $puzzle = $window->{puzzleWidget}; foreach my $row ( 0..$model->rowCount(Qt::ModelIndex())-1 ) { foreach my $column ( 0..$model->columnCount(Qt::ModelIndex())-1 ) { + my $delay = 10; my $index = $model->index( $row, $column, Qt::ModelIndex() ); + my $mimeData = $model->mimeData( [$index] ); $view->scrollTo($index); + qApp->processEvents(); + Qt::Test::qSleep( $delay ); my $destRowCol = $model->data( $index, Qt::UserRole() + 1 )->value; - my $srcPos = $view->rectForIndex( $index )->center(); - my $destPos = Qt::Rect( $destRowCol->x*80, $destRowCol->y*80, 80, 80)->center(); + my $srcPos = $view->viewport()->mapToGlobal($view->rectForIndex( $index )->center()); + my $destPos = $puzzle->mapToGlobal(Qt::Rect( $destRowCol->x*80, $destRowCol->y*80, 80, 80)->center()); - # If QTest allowed us to make drag events, we could actually solve the puzzle. - Qt::Test::mousePress( $view->viewport(), Qt::LeftButton(), Qt::NoModifier(), $srcPos, 10 ); - Qt::Test::mouseRelease( $puzzle, Qt::LeftButton(), Qt::NoModifier(), $destPos, 10 ); + my $numSteps = 10; + my $xstep = ($destPos->x() - $srcPos->x()) / $numSteps; + my $ystep = ($destPos->y() - $srcPos->y()) / $numSteps; + + my $event = Qt::DragEnterEvent( $view->viewport()->mapFromGlobal($srcPos), + Qt::MoveAction(), $mimeData, Qt::LeftButton(), Qt::NoModifier() ); + $view->viewport()->dragEnterEvent( $event ); + qApp->processEvents(); + Qt::Test::qSleep( $delay ); + + my $curPos = Qt::Point($srcPos); + my $widget = $view->viewport(); + my $inPuzzle = 0; + foreach my $step (0..$numSteps - 1) { + $curPos->setX( $curPos->x() + $xstep ); + $curPos->setY( $curPos->y() + $ystep ); + if ( !$inPuzzle && $widget->mapFromGlobal($curPos)->x() > $widget->geometry()->width() ) { + $inPuzzle = 1; + $widget = $puzzle; + $event = Qt::DragEnterEvent( $widget->mapFromGlobal($srcPos), + Qt::MoveAction(), $mimeData, Qt::LeftButton(), Qt::NoModifier() ); + $widget->dragEnterEvent( $event ); + qApp->processEvents(); + Qt::Test::qSleep( $delay ); + } + $event = Qt::DragMoveEvent( $widget->mapFromGlobal($curPos), + Qt::MoveAction(), $mimeData, Qt::LeftButton(), Qt::NoModifier() ); + $widget->dragMoveEvent( $event ); + qApp->processEvents(); + Qt::Test::qSleep( $delay ); + } + $event = Qt::DropEvent( $puzzle->mapFromGlobal($curPos), + Qt::MoveAction(), $mimeData, Qt::LeftButton(), Qt::NoModifier() ); + $puzzle->dropEvent($event); + qApp->processEvents(); + Qt::Test::qSleep( $delay ); } } } @@ -48,6 +85,8 @@ Qt::Test::qWaitForWindowShown( $window ); this->{window} = $window; pass( 'Window shown' ); + $DB::single=1; + 1; } package main; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
