on xenial help sign in
Hook up aboutToShow for overflow menus (LP: #1676016)
1936d4bAlbert Astals Cid
qml/ApplicationMenus/MenuBar.qml+3
@@ -383,6 +383,9 @@ Item {
383 function activate(index) {
383 function activate(index) {
384 return sourceModel.activate(mapRowToSource(index));
384 return sourceModel.activate(mapRowToSource(index));
385 }
385 }
386+ function aboutToShow(index) {
387+ return sourceModel.aboutToShow(mapRowToSource(index));
388+ }
386 }
389 }
387
390
388 Connections {
391 Connections {
tests/qmltests/ApplicationMenus/tst_MenuBar.qml+8
@@ -329,6 +329,14 @@ Item {
329 return false;
329 return false;
330 }, true);
330 }, true);
331
331
332+ mouseClick(overflow);
333+ verify(overflow.__popup);
334+ var menuItem = findChild(menuBar, "overflow-menu-item0-actionItem");
335+ waitForRendering(menuItem);
336+ mouseClick(menuItem);
337+
338+ verify(findChild(menuBar, "overflow-menu-item0-menu-item0-actionItem"));
339+
332 tryCompareFunction(function() {
340 tryCompareFunction(function() {
333 menuBackend.removeRow(0);
341 menuBackend.removeRow(0);
334 wait(1);
342 wait(1);