/srv/irclogs.ubuntu.com/2015/08/17/#ubuntu-app-devel.txt

=== chriadam|away is now known as chriadam
=== shuduo is now known as shuduo_afk
=== chihchun_afk is now known as chihchun
dale_I have an app with C++ backend which tries to access the screen service to change brightness via the system DBus, but I get apparmor errors.  Does anyone know how to write the click apparmor file to get around this?05:01
dale_appdevs ?05:01
dale_Are any appdevs here?05:09
dholbachgood morning07:16
=== _morphis is now known as morphis
=== shuduo_afk is now known as shuduo
NymereaHello guys08:07
NymereaI've ear than some expert are here in european office hours08:07
NymereaI need help with my application08:07
NymereaIf some appdevs can help me, I will be very honoured08:09
davidcalleNymerea, hi, blocking on something with your app?08:22
Nymereadavidcalle, yep I have some trouble09:29
Nymerea1) my application doesn't work on smartphone but work on desktop09:30
Nymerea2) my camera is rotated by 90° by default09:30
NymereaI want create a simple application that read barcode09:31
Nymereahttps://github.com/Nymerea/uBarcodeReader/tree/feature/autoCapture09:31
brunch875  Is there a way to make QApplication work on the device? I want to skip QML and use the graphics view framework...09:32
brunch875  Or... any non-horrible way to do qtquick on c++ entirely? :P09:32
davidcalleNymerea, let me give it a try09:33
Nymereabrunch875, http://doc.qt.io/qt-5/qtqml-cppintegration-topic.html ???09:34
Nymereadavidcalle, dont forget to use feature/autoCapture branch09:34
Nymereadavidcalle, The application run on smartphone, but when I click on image I have a referenceError09:35
brunch875I've considered that, but I thought it might be a pretty bad idea09:35
brunch875but I'm glad someone has the same second-opinion!09:35
Nymereathis error doesn't occur in desktop09:35
Nymereabrunch875, personnaly I think QML is much better than C++ for writing UI09:35
brunch875thing is I want to port one of my games from scratch09:36
brunch875feels like QML gets on the way09:36
brunch875the graphics view framework seems perfect for the job, but I can't get it to work on utouch09:37
brunch875maybe I should wait a bit for mir and convergence? :)09:37
Nymereabrunch875, scope are entierly written in c++09:38
Nymereaso it shouldn't be a problem09:38
Nymerea(use only c++)09:38
brunch875is there some source code I can peek at?09:39
brunch875I sank in information yesterday... so extense09:39
NymereaIf you run ubuntu-sdk09:41
Nymereayou have some auto-generate source code that use c++09:41
davidcalleNymerea, sorry, I'm having an issue with my QtCreator, I can't add a device kit at the moment to test on my phone. I'll get back to you if I manage to fix that and test today :)09:45
Nymereadavidcalle, lot of problem with qt creator09:46
davidcalleNymerea, in my case that's mostly a case of bleeding edge packages and SDK ones not being recent enough09:48
NymereaBut09:48
NymereaMaybe you can help me with the error09:49
NymereaI know exactly what happen09:49
Nymereabut I don't understand why09:49
davidcalleNymerea, I can try09:49
NymereaOkay, look my main.cpp : extense09:50
Nymereahttps://github.com/Nymerea/uBarcodeReader/blob/feature/autoCapture/OpenFoodFacts/main.cpp **09:50
NymereaI give to my Qml file a reference : view.rootContext()->setContextProperty("qDecoder", &decoder);09:51
NymereaIn my Main.qml file, I use this reference09:51
NymereaOn desktop it's work properly but in smartphone i have : ReferenceError with qDecoder09:52
Nymereadavidcalle, any idea why it's happen ?09:52
NymereaReferenceError : qDecoder is not defined09:53
davidcalleNymerea, that's odd. I don't see anything wrong with it. I guess someone with more cpp experience on the device can help, mzanetti? ^09:58
* mzanetti reads scrollback09:58
mzanettiview.rootContext()->setContextProperty("qDecoder", &decoder);09:59
mzanettishould be:10:00
mzanettiview.engine()->rootContext()->setContextProperty("qDecoder", &decoder);10:00
mzanettinot sure why the first works at all10:00
Nymereahum10:00
mzanettimaybe it's the same... dunno10:00
mzanettiNymerea, what does this better than Tagger?10:01
NymereaThe barcorde reader is just the proof of concept10:01
NymereaOpenFoodFacts is read barcode from food a get nutritional information10:02
NymereaI cannot use tagger as "provider of barcode"10:02
mzanettimhm...10:02
Nymereaand barcode reader is to hard to use when you haven't a lot of experience in c++ developpement10:02
mzanettiAuthenticator does10:02
Nymereawhat is authenticator ?10:03
NymereaIt's not installed by default on my device10:03
mzanettihttps://uappexplorer.com/app/com.ubuntu.developer.mzanetti.ubuntu-authenticator10:03
NymereaI don't want login by using qrcode10:04
mzanettiyou do want a QR code scanner, no?10:06
Nymereamzanetti, do you know why my camera is rotated by 90° by default ?10:06
Nymereamzanetti, no, EAN8/13 scanner10:06
mzanettiyeah well... that's the *same*10:06
mzanettifrom the scanner POV. it reads all10:06
Nymerealet me try10:09
Nymereathe problem is : authentificator is not installed by default10:09
Nymereathere is any way to install a third application as dependences ?10:11
popeyclicks don't have dependencies10:12
Nymerea popey thank you10:15
Nymereamzanetti, I've just looked your code source on launchpad10:20
NymereaI didn't understand how you provide your QZBar dependences10:20
Nymereabecause I use ZXing but it has very poor performances compare to Zbar10:21
mzanettiNymerea, I use static linking10:25
NymereaIf I kew it before10:25
NymereaI spent like 1 month with fuckin ZXing library10:26
Nymereaand tagger cmake was too complicated for me10:26
Nymerea(I mean qMake is so easy to read compare to cmake)10:27
mzanettiauthenticator uses qmake10:30
Nymereamzanetti, is it normal the camera is rotated by default ?10:44
mzanettidunno10:44
mzanettiNymerea, seems yes: http://bazaar.launchpad.net/~mzanetti/authenticator/trunk/view/head:/app/qml/ubuntu-authenticator.qml#L44410:46
Nymereamzanetti,  no, if the smartphone is in portrait mode you rotate by 90°10:47
Nymereathat normal10:47
Nymereabut for me, by default it's rotated by 90°10:48
mzanettiI rotate -90, to compensate the 9010:48
Nymereayes, if it's in portrait mode10:49
Nymereabut by default i'm in "normal" mode10:49
Nymereaisn't ?10:49
mzanettiisn't portrait the normal one?10:49
Nymereahum10:50
Nymereamaybe my english the problem :-D10:50
Nymereamzanetti, you're rith : http://www.geckogeek.fr/wp-content/uploads/2010/09/LandscapePortrait.png10:51
NymereaI'm very sorry10:51
mzanetti:)10:51
mzanettino problem10:51
NymereaI will check you're trick this afternoon10:51
NymereaThank you for you're help10:51
NymereaMaybe I will re-use your code for reading barcode10:52
Nymereabecause I didn't success to use zbar10:52
Nymereamzanetti, I just tryed -90°10:56
Nymereadevice.naturalOrientation === "portrait"  ? -90 : 010:56
Nymereaand now it's rotated by -90°10:57
brunch875urrrgh I'm still unable to paint a qtquick rectangle entirely on c++10:58
brunch875this api is harsh10:58
Nymereaactually, what ever the number is, the screen is rotated -90°10:58
mzanettibrunch875, not sure what you're trying to do11:03
mzanettibut wouldn't it just be subclassing QQuickPaintedItem and then just painRect() inside the paint() or update() method?11:04
brunch875that's a great hint, thanks! I'm kinda lost11:05
Nymereamzanetti, Okay I got it, I have "ReferenceError : screen is not defined"11:05
mzanettiyou're missing an import I guess11:05
Nymereamzanetti, you're right11:08
NymereaThank you for you're precious help11:08
Nymereayou're always right11:08
=== chriadam is now known as chriadam|away
mzanetti:D11:14
mzanettino problem, you're welcome11:14
=== _salem is now known as salem_
=== om26er_ is now known as om26er
dholbachdavidcalle, how are things in the deployment department? :)12:18
davidcalledholbach, reverted everything to r122 :( Sent an email for help.12:40
davidcaller122 because it's the one that deploys.12:40
dholbach:-/12:41
dholbachdavidcalle, r122 is without the mojo changes?12:41
davidcalledholbach, yep, but it also has a bunch of extra files, like a db dump (it's not a clean pull from trunk at r122). Ideally, I should try to extract it, merge manually evertyhing we have done and try again with a tarball based on it. Haven't found time to do it yet.12:44
dholbachdavidcalle, can Caio or anyone from webops help?12:46
dholbachit looks a bit like we're fishing in the dark :-(12:47
davidcalledholbach, I know. Emailed caio, mike and jacek12:48
dholbachcool *crossing fingers*12:50
=== om26er_ is now known as om26er
mcphailjhodapp: I think I'm going to have to give up chasing that media-hub bug with the # symbols in the path13:48
jhodappmcphail, alright no worries, just make sure all of what you discovered is on the comment log for that bug13:49
jhodappmcphail, learned a few things I'm sure :)13:49
mcphailjhodapp: absolutely :) Most of all, I learned that C++ and debuggers are a deadly mix :)13:50
jhodapplol13:50
jhodappindeed, C++ feels very insane at times13:50
=== charles_ is now known as chalres
=== chalres is now known as charles
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
ubik__Helo, how can I detect screen rotation with QML?15:42
ubik__(if it is vertical or horizontal)15:42
ahayzenhttps://developer.ubuntu.com/api/apps/qml/sdk-15.04/QtSensors.OrientationReading/ or just measure the width vs height of the page15:43
ubik__thx15:43
ubik__uhm15:59
ubik__my app crashes, when i add the code from this page15:59
ubik__isn't it possible to use accelerometer and OrientationSensor at the same time?16:00
ahayzenubik__, what is the error it crashes with ?16:01
ubik__Sdk-Launcher> Application started: 94716:02
ubik__Sdk-Launcher> Received a failed event16:03
ubik__Sdk-Launcher> The Application exited, cleaning up16:03
ubik__Sdk-Launcher> Finished16:03
ahayzenubik__, there should be the actual apps output somewhere, maybe in one of the other panels16:03
ahayzenyou have .. import QtSensors 5.0 .. at the top of the file right?16:04
ubik__I have import QtSensors 5.216:04
ahayzenyup that should be ok16:05
ubik__i try to uncomment my accelerometer16:05
ahayzenubik__, if its a pure qml app have you tried running $ qmlscene path/to/app.qml  ?16:05
ubik__nope16:07
ubik__I dont know how to debug16:10
ubik__because im a newbie to ubuntu-sdk16:10
ubik__but maybe my code is just wrong16:10
ahayzenif your using Qt Creator is there anything in the "application output" panel at the bottom?16:11
ubik__http://pastebin.com/BYztNsED16:11
ubik__yes, thats what i posted already16:11
ahayzenhmm you'd usually get something more useful than that16:12
ubik__I just need to set colums = 1 and rows = 2 of the Grid when I rotate my device16:13
ubik__It's something stupid, but I don't know how to do it16:13
ahayzenubik__, when running the code you provided me... property string teststring: 0 .. fails with Invalid property assignment: string expected16:14
ubik__oh16:14
ubik__lol16:14
ubik__:D16:14
ahayzen:-)16:15
ubik__now my application starts16:15
ubik__thx16:15
ahayzenyey no problem16:15
=== fred_ is now known as Guest58567
=== karni is now known as karni-away
taiebotmzanetti cool update for kodimote. Would it be possible to put a next playing on this screen? http://i.imgur.com/h1hmm51.png it would be nice to have this info here.20:23
mzanettitaiebot, longpress20:52
taiebotmzanetti: i already know for this is just it would be intersting to know what will play next on this screen.20:52
mzanettiah, i see20:53
mzanettiok, will think about it20:53
taiebotmzanetti: yeah the long press shows me what play next but it starts a day in the past for me20:56
mzanettitaiebot, right... that's a bit odd. I can't really know where to scroll the list to without lots of fancy maths and I never found the motivation to do that20:57
taiebotmzanetti: yeah i do understand. If i had the skills would do a tvheadend scope (backend PVR for Kodi)  it would be much more appropriate for TV channels21:00
=== karni-away is now known as karni
=== salem_ is now known as _salem

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!