Comment 11 for bug 1604322

Revision history for this message
You-Sheng Yang (vicamo) wrote :

I did not digg into Unity8 and qmenumodel too much but in ${unity8_srctop}/qml/Wizard/Pages/30-wifi.qml,

  LocalComponents.Page {
    readonly property bool connected: Connectivity.online

    Component {
      id: accessPointComponent
      ListItem {
        readonly property bool isConnected: menuData && menuData.actionState
        onClicked: {
          unityMenuModel.activate(menuIndex);
        }
      }
    }

    Component {
      id: forwardButton
      LocalComponents.StackButton {
        text: (connected || listview.count === 0) ? i18n.tr("Next") : i18n.tr("Skip")
        onClicked: pageStack.next()
      }
    }

Many irrelevant lines removed. So from above source code you see the forwardButton becomes "Next" when `Connectivity.online` evaluates to true, but the list items become "connected" when the `menuData.actionState` is valid. The latter is obviously wrong because its state is changed by the call `unityMenuModel.activate(menuIndex)`, which is always executed on item being clicked.

Please fix the qml accordingly.