Summary: | perlqt: qtgui/t/helpcontextsensitivehelp.t tests fail | ||
---|---|---|---|
Product: | [Unmaintained] bindings | Reporter: | Petr Pisar <ppisar> |
Component: | general | Assignee: | kde-bindings |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chrisburel |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Petr Pisar
2016-03-22 11:26:51 UTC
By the way qtgui/t/mainwindowsmdi.t fails too: $ xvfb-run -a "prove" -v -I/home/test/fedora/perl-Qt/Qt-0.96.0/build/blib/{arch,lib} "/home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/mainwindowsmdi.t" /home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/mainwindowsmdi.t .. 1..5 ********* Start testing of MainWindowsMDITest ********* Config: Using QTest library 4.8.7, Qt 4.8.7 PASS : MainWindowsMDITest::initTestCase() ok 1 - File write contents PASS : MainWindowsMDITest::testSave() ok 2 - Widget focus ok 3 - Widget focus not ok 4 - Widget focus # Failed test 'Widget focus' # at /home/test/fedora/perl-Qt/Qt-0.96.0/qtgui/t/mainwindowsmdi.t line 73. # got: ' MdiChild=HASH(0x24c5b80)' # expected: ' MdiChild=HASH(0x24cb650)' ok 5 - Widget focus PASS : MainWindowsMDITest::testFocus() PASS : MainWindowsMDITest::cleanupTestCase() Totals: 4 passed, 0 failed, 0 skipped ********* Finished testing of MainWindowsMDITest ********* # Looks like you failed 1 test of 5. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/5 subtests Both tests work with focus. Maybe something is fishy with the focus. I can't replicate the failure with the helpcontextsensitivehelp test, but I can replicate the mainwindowsmdi test failure. This is fixed in c989a56d. The problem was in PerlQt's method resolution. When there are method overloads, it is supposed to determine the best method to call based on the inheritance distance between the types of the arguments supplied, and the method overloads. Specifically, consider the following two overloads: QSignalMapper::setMapping(QObject* sender, QWidget* widget) QSignalMapper::setMapping(QObject* sender, QObject* object) Calling $mapper->setMapping($myObject, $myWidget) should resolve to the first one, not the second. There were two problems. First, the function that was designed to return the inheritance distance was only returning 1 or -1, indicating a yes or no respectively. This is fixed in 3a22e526. The second problem was that even after the inheritance depth was returned correctly, the precedence order of the methods was being lost. This is fixed in 0b2b3da3. http://commits.kde.org/perlqt/c989a56da7d887feabed9d2875550173c2ceabcb Thank you for the fixes. Now both the tests pass for me. |