[11:32] <nik90> mzanetti: ping
[12:00] <mzanetti> nik90: pong
[12:08] <nik90> mzanetti: hey I am hitting a weird issue with our base timezone model
[12:08] <nik90> mzanetti: I created a C++ plugin just to send back the local date and time using QDateTime since it keeps track of the timezone change unlike the javascript date object.
[12:09] <nik90> mzanetti: Everything seems to work except for one thing which is the localCityTime.offsetFromUtc() - worldCityTime.offsetFromUtc() value. We return this value in the timezone base model class. On changing the system timezone and then returning to the clock app, I notice that this value changes in the c++ side of things, however it doesn't update the value in
[12:09] <nik90> the qml listview.
[12:09] <nik90>  mzanetti: any thoughts as to why that might happen?
[12:09] <nik90> mzanetti: I am working on this at https://code.launchpad.net/~nik90/ubuntu-clock-app/implement-change-time-settings
[12:09] <mzanetti> nik90: isn't that the same issue again?
[12:10] <mzanetti> that returning QDateTime to qml doesn't keep timezone informations
[12:10] <nik90> mzanetti: no because the localCityTime.offsetFromUtc() - worldCityTime.offsetFromUtc() value is a int64 value. On c++ when qDebug() it returns the correct value, however on qml that value is different
[12:10] <nik90> mzanetti: so I am not interacting with qDateTime but rather just an int
[12:11] <mzanetti> hmm, ok... need to check the code
[12:12] <nik90> mzanetti: in the timer update() function, we only do this roles << RoleTimeString;
[12:12] <nik90> mzanetti: may be we need to add other stuff that also change like the RoleTimeTo, RoleDayTo
[12:12] <mzanetti> nik90: ah, yeah, true, you need to add each role you change
[12:13] <nik90> mzanetti: do I do it like roles << RoleTimeString << RoleTimeTo; ?
[12:13] <mzanetti> yep
[12:13] <nik90> thnx
[12:14] <mzanetti> nik90: if you're changing all of the roles, or most of them, you could remove the whole last argument in dataChanged, then it would always update all roles
[12:14] <mzanetti> its up to you to decide if you can affort refreshing also unchanged fields or not
[12:15] <nik90> I am changing 3 out of 6, so I will do roles << RoleTimeString << RoleTimeTo to save on performance
[12:16] <nik90> mzanetti: yay that worked
[12:16] <mzanetti> :)
[14:54] <Diogo> hi guys
[14:59] <Diogo> does some one know how to make MYSQL database conection with QML??
[15:19] <Diogo> does some one know how to make MYSQL database conection with QML??
[15:33] <nik90> Diogo: Check out http://qt-project.org/doc/qt-5/qtquick-localstorage-qmlmodule.html
[16:08] <Diogo> nike90: i have c++ code, but i just dont understand it
[16:25] <qtros> Hi all
[16:26] <qtros> Which component should I use instead of standard WebView in UP?
[16:35] <nik90> Diogo: I always wonder you change nik90 to nike90 :D...I don't get a notification if you type nike90
[16:36] <Diogo> nik90: ok
[16:37] <nik90> Diogo: I am not sure about accessing sql in c++, i haven't done it before
[16:37] <Diogo> nik90: i have a project with some code
[16:37] <nik90> Diogo: but I am sure QT should have that in some form or the other
[16:38] <qtros> nik90 Hello) Can you please help me with using of "Ubuntu.Web" on desktop?
[16:38] <Diogo> nik90: the question is, that i dont understand the code
[16:38] <Diogo> nik90: look http://paste.ubuntu.com/7876122/
[16:38] <nik90> qtros: Hi
[16:39] <Diogo> nik90: http://paste.ubuntu.com/7876128/
[16:40] <Diogo> nik90: i just needed some one to explain me what the code means, so i could move on and modify the way i need him
[16:40] <nik90> qtros: I am guessing you have looked at http://developer.ubuntu.com/api/qml/sdk-14.10/Ubuntu.Web/
[16:40] <nik90> qtros: I haven't used it yet, so sry I don't know much about it
[16:40] <qtros> nik90 yep
[16:40] <nik90> Diogo: ah ok,
[16:40]  * nik90 takes a look
[16:41] <qtros> nik90 hmm... standard WebView is deprecated and nobody knows how to use new :D
[16:41] <nik90> qtros: yeah, however the documentation at http://developer.ubuntu.com/api/qml/sdk-14.10/Ubuntu.Web/ seems quite limited. I would love to see some examples there :/
[16:42] <nik90> Diogo: ok so your code creates a mysql object in c++. Do you want to access the mysql object in c++ or in qml?
[16:43] <nik90> Diogo: If you want to do all the sql commands in qml, it is better to look at the link I pasted earlier
[16:43] <nik90> Diogo: on the other hand, if you want to use it in your c++ code, it seems ok
[16:44] <nik90> Diogo: you will still need to add some functions for additonal functionality
[16:45] <Diogo> nik90: i dont understand c++ thats why i asked help
[16:45] <qtros> Diogo and what do you want to do with this code?
[16:46] <nik90> Diogo: as qtros where do you want to use this code? In qml or c++ ?
[16:46] <Diogo> nik90: i've found out that the only possible way you can make the mysql contection in qml is using c++
[16:46] <Diogo> qml
[16:46] <Diogo> nik90: qml
[16:46] <nik90> Diogo: ok then check out http://qt-project.org/doc/qt-5/qtquick-localstorage-qmlmodule.html
[16:46] <nik90> Diogo: that is sql in qml
[16:46] <nik90>  <Diogo> nik90: i've found out that the only possible way you can make the mysql contection in qml is using c++
[16:46] <nik90> ^^ that is plain wrong
[16:47] <Diogo> nik90: is it??
[16:47] <nik90> yes
[16:47] <Diogo> nik90: javascript cant make the conection
[16:47] <nik90> Diogo: Did you read  http://qt-project.org/doc/qt-5/qtquick-localstorage-qmlmodule.html ?
[16:48] <Diogo> nik90:i'm going to read it
[16:48] <nik90> Diogo: they are using javascript to make the connection
[16:49] <Diogo> nik90: they are using sqlite
[16:49] <Diogo> nik90: imagin you have an app that requires you to do the login
[16:50] <Diogo> nik90: and the database with you data is on the server
[16:51] <Diogo> nik90: what type of DB woudl you use?
[16:51] <qtros> Diogo yes, remote connection only with cpp
[16:51] <nik90> Diogo: then I would use MySQL since it is in a remote server
[16:51] <nik90> Diogo: you didn't specify the remote server part earlier :)
[16:51] <Diogo> nik90: sorry
[16:52] <Diogo> nik90: about that
[16:52] <nik90> Diogo: In that case, you will have to create a C++ plugin that you can import in your qml code.
[16:52] <nik90> Diogo: However you will need to also set up cmakelists to ensure that the c++ gets built rproperly when running your app
[16:53] <Diogo> nik90: i have a huge problem now
[16:53] <nik90> Diogo: In Qtcreator, in the create project wizard, you will have to choose "App with QML Extension Library"
[16:54] <Diogo> nik90: because i dont know how to program in c++
[16:54] <nik90> Diogo: you will have to learn I am afraid
[16:55] <nik90> Diogo: I was in the same boat 2-3 weeks ago where I had to develop C++ plugins for the clock app.
[16:55] <nik90> Diogo: I did some reading and eventually am getting used to it
[16:55] <Diogo> nik90: any good pleaces to learn it?
[16:56] <nik90> Diogo: well if you want to learn C++, then http://www.learncpp.com/ should be good
[16:56] <nik90> Diogo: however after that you will have to know how to develop with Qt C++
[16:57] <Diogo> nik90: and did you see the voidream tutorials??
[16:57] <nik90> Diogo: ?
[16:57] <nik90> Diogo: I knew a bit of c++ from high school, so I started to work straight on the Qt C++ part
[16:58] <Diogo> nik90: look https://www.youtube.com/watch?v=6KtOzh0StTc&list=PL2D1942A4688E9D63
[16:59] <nik90> Diogo: ooh yes, I saw some of his videos
[17:01] <Diogo> nik90: i've created the "App with QML Extension Library" to see the files
[17:01] <Diogo> and i see the backed.cpp
[17:01] <nik90> backend.cpp
[17:02] <Diogo> nik90: and i see the backed.cpp in Myapp folder
[17:02] <Diogo> nik90: etc..
[17:02] <nik90> yup
[17:03] <nik90> so basically the backend folder holds your c++ plugin stuff
[17:03] <nik90> while your main qml code is in the app folder
[17:03] <Diogo> nik90: the new thing for me to is now the app folder and the .. folder
[17:03] <nik90> Diogo: dont worry about the .. folder. It is part of cmake
[17:03] <Diogo> nik90: what is cmake?
[17:04] <nik90> Diogo: it is sort of like an instruction list which tells the compiler what to do before running your app
[17:06] <Diogo> nik90: so i'll develope my c++ plugins in  the Myapp folder right?
[17:07] <nik90> Diogo: there should be already a sample C++ plugin class
[17:07] <nik90> Diogo: you can just change that with your own class
[17:08] <Diogo> nik90: so i'll change mytype.cpp and mytype.h for that right?
[17:09] <nik90> Diogo: yeah
[17:10] <Diogo> nik90: you are the best man
[17:10] <Diogo> nik90: for a hole day i've asked on forms and no one did say anything
[17:12] <Diogo> nik90: and now when i ask to the community of the OS i love so muhc they help me
[17:12] <nik90> Diogo: make sure you accordingly change the CMakeList.txt file when you rename the mytype.cpp or mytype.h files
[17:12] <nik90> Diogo: no worries
[17:13] <nik90> Diogo: just push this to your github or launchpad branch and then we can better help with debugging
[17:15] <Diogo> nik90: i'm going to study c++ for a day or 2 and then i'll begin to put everything in github
[17:15] <nik90> ok
[17:18] <Diogo> nik90: and then i'll tell you :)
[17:18] <Diogo> nik90: thanks for everything :D
[17:19] <nik90> Diogo: yw
[17:37] <qtros> Hi all
[17:37] <qtros> Can someone tell how to use QML package "Ubuntu.Web" on desktop?
[17:54] <qtros> Can someone tell how to use QML package "Ubuntu.Web" on desktop
[19:47] <mhall119> qtros: http://developer.ubuntu.com/api/qml/sdk-14.10/Ubuntu.Web.WebView/
[19:47] <mhall119> qtros: you probably need to be running Utopic on the desktop to use it though
[19:48] <mhall119> qtros: also make sure you have qtdeclarative5-ubuntu-web-plugin installed
[19:50] <mhall119> hope that helps, /me is going afk for a bit
[20:29] <qtros> mhall119 ping
[20:58] <mhall119> qtros: pong
[20:59] <qtros> mhall119 "you probably need to be running Utopic on the desktop to use it though" - does it mean that I always must develop for UP only on latest version of Ubuntu? ...
[20:59] <qtros> mhall119 what if I prefer stable releases?
[21:00] <mhall119> qtros: once we have phones on the market there will be a stable release, right now "stable" (Trusty) is missing some many needed features that you'd be hurting yourself to target it
[21:01] <mhall119> I don't know if anybody even still runs it on a phone
[21:01] <qtros> mhall119 no no, I mean desktop version of Ubuntu)
[21:01] <mhall119> if you're only interested in targeting desktops, then there's a case to be made for using only the sdk-14.04 framework, but Ubuntu.Web isn't in it
[21:01] <mhall119> qtros: you can run the stable desktop version and target Utopic in an emulator
[21:02] <mhall119> that's still not 100% smooth, but it works
[21:02] <qtros> mhall119 but if I interested to target both, I should use 14.10 for now?
[21:02] <mhall119> my "not smooth" I mean QtCreator won't recognize the newer API elements, so some of the help if offers won't work
[21:02] <mhall119> qtros: if you use the sdk-14.10 framework, you'll only be able to target utopic and future releases, not trusty
[21:03] <mhall119> that goes for phone and desktop
[21:04] <qtros> mhall119 I just want to write apps for UP and have ability to test them on desktop like before)
[21:09] <qtros> mhall119 is it possible on Utopic?)
[21:12] <mhall119> only if you have Utopic on the desktop
[21:12] <mhall119> if you have trusty on the desktop, you can only run your app locally if it's using the sdk-14.04 framework APIs
[21:15] <mhall119> basically sdk-14.04 means "Trusty and above", sdk-14.10 means "Utopic and above"
[21:15] <mhall119> so you can use an sdk-14.04 app in Utopic, but not an sdk-14.10 app in Trusty