Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[qmlsettings] Port to qt5. #2

Merged
merged 1 commit into from Aug 22, 2013
Merged

[qmlsettings] Port to qt5. #2

merged 1 commit into from Aug 22, 2013

Conversation

locusf
Copy link
Member

@locusf locusf commented Aug 22, 2013

Porting to Qt5, USB page not working in N9 and can't test it in a VM. Is this a problem, the enums are ok though?

@rburchell
Copy link
Contributor

can you clarify what doesn't work with USB?

return a.exec();
QGuiApplication* application;
QQuickView* view;
#ifdef HAS_BOOSTER
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preprocessor directives are supposed to start at column 0, so remove indentation on this and the #else / #endif

@locusf
Copy link
Member Author

locusf commented Aug 22, 2013

(17:24:32) [ >] qrc:/qml/usb/USBModeSettings.qml:81: Unable to assign [undefined] to QString
(17:24:32) [ >] qrc:/qml/usb/USBModeSettings.qml:97: Unable to assign [undefined] to QString

@rburchell
Copy link
Contributor

add a bunch of console.log statements and see what precisely it isn't getting?

@locusf
Copy link
Member Author

locusf commented Aug 22, 2013

The code in question is this:

text: {
switch (usbSettings.currentMode) {
case USBSettings.MassStorage:
return "Mass storage in use"
case USBSettings.Developer:
return "Developer mode in use"
case USBSettings.MTP:
return "Media Transfer Protocol mode in use"
case USBSettings.ChargingOnly:
return "Charging only"
}
}
So I'm guessing that the switch is wrong and returns undefined. Was there an api change about this, if there was it didn't caught my eye.

@locusf
Copy link
Member Author

locusf commented Aug 22, 2013

Context menu works ok though, this error is probably due to the fact that there is no mode to begin with.

@rburchell
Copy link
Contributor

well, what i'm suggesting is that at the top of text: {} you add:
console.log(usbSettings.currentMode)
console.log(USBSettings.MassStorage)

.. etc

and see exactly what is going on.

it could well be the default case messing up, if so just add a return "Unknown mode" default I guess

@locusf
Copy link
Member Author

locusf commented Aug 22, 2013

I added the default case too, shouldn't be messed up now.

rburchell added a commit that referenced this pull request Aug 22, 2013
[qmlsettings] Port to qt5.
@rburchell rburchell merged commit b4e9eff into nemomobile:master Aug 22, 2013
@rburchell
Copy link
Contributor

nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants