/srv/irclogs.ubuntu.com/2014/07/20/#ubuntu-app-devel.txt

=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
nik90mzanetti: hey, I am having trouble including the u1db class in the timezonemodel12:26
mzanettinik90: hi12:26
nik90mzanetti: I was told to install libu1db-qt5-dev and libu1db-qt5-doc12:26
nik90mzanetti: hi12:26
mzanettiyeah, that sounds about right12:26
mzanettinik90: have a branch I could look at?12:27
nik90mzanetti: the docs say that I should import #include <Query>, however qtc says that it cannot be found12:27
nik90mzanetti: sure, https://code.launchpad.net/~nik90/ubuntu-clock-app/15-world-clocks12:27
mzanettinik90: mist likely you're missing some pkg_config stuff in CMakeLists.txt12:27
nik90mzanetti: yeah I never figured how to determine what to put in pkg_config stuff12:28
nik90mzanetti: like the DBus issue I had earlier12:28
mzanettinik90: well, for qt modules its quite easy12:28
mzanettinik90: you just use qt5_use_module(<target> module ... )12:28
mzanettinik90: and each qt doc page should tell you in which module a class is12:29
nik90mzanetti: ah12:29
nik90mzanetti: for dbus, i see the module name at http://qt-project.org/doc/qt-5/qdbus.html12:29
nik90cool12:29
mzanettinik90: in /usr/lib/x86_64-linux-gnu/cmake/ you see the installed ones12:30
mzanettiand their names12:30
* nik90 looks12:31
mzanettinik90: in the example of u1db I'd do this:12:32
mzanettifirst, check out the contents of the -dev pacakge with dpkg -L libu1db-qt5-dev12:33
mzanettiand see if there's some cmake module file or a pkgconfig file (.pc)12:33
mzanettiin this case, yes, there is: /usr/lib/x86_64-linux-gnu/pkgconfig/libu1db-qt5.pc12:33
nik90mzanetti: ah..there it says I should put lu1db-qt5 in the cmake12:34
nik90I mean u1db-qt512:34
mzanettinik90: and then find another CMakeLists.txt that uses some pkgconfig  stuff :), I mostly use unity812:35
mzanettigrepping for pkgconfig over the CMakeLists.txt files gives me a few results, lets check the one in plugins/Unity/Launcher/CMakeLists.txt for example12:36
mzanettiso, looks like you need this to include PkgConfig in general, if you don't have it yet:12:37
mzanettiinclude(FindPkgConfig)12:37
mzanettiand then you can use pkg_check_modules to include the modules you need12:37
nik90sorry but I am not sure I follow the last few lines from the grepping part12:37
mzanettihehe... ok let me try again12:38
nik90so you grep pkgconfig in the unity8 cmake files?12:38
mzanettiyeah, like this: grep -ri pkgconfig *12:38
nik90ok12:38
mzanettijust to find all usages of pkgconfig in there12:38
mzanettiand get some examples12:38
nik90ah12:38
mzanettithat gives you, amongs others, this file: plugins/Unity/Launcher/CMakeLists.txt12:39
mzanettiI just picked this randomly12:39
* nik90 branches the unity8 code to try this out12:39
mzanettithat one has nice examples how to include stuff using pkgconfig12:40
mzanettiright at the top of the file12:40
mzanettiI'm sure you can figure how to adapt this for libu1db-qt5-dev12:40
mzanettiif not, ping me again12:40
nik90will do .. thnx12:41
nik90mzanetti: I did http://paste.ubuntu.com/7824803/12:54
nik90same error though12:55
mzanettilet me try12:55
mzanettinik90: I guess that gives you a cmake error/warning13:01
nik90mzanetti: I got query.h: no file or folder found13:02
mzanettinik90: just try running cmake alone13:02
mzanettidoesn't that tell you:13:03
mzanetti-- checking for module 'lu1db-qt5'13:03
mzanetti--   package 'lu1db-qt5' not found13:03
* nik90 checks13:03
nik90mzanetti: yup13:04
mzanettinik90: so that's the first thing... you misspelled the package name13:04
mzanettiits libu1db-qt5, not lu1db-qt513:04
nik90mzanetti: I copied the library name from http://paste.ubuntu.com/7824851/ (the .pc file)13:05
* mzanetti can't find lu1db-qt5 in there13:06
mzanettiah right... the -l call13:06
nik90Libs: -L${libdir} -lu1db-qt513:06
mzanettiyou need to give the name of that .pc file, not what it does inside13:06
nik90ah13:06
mzanettinik90: next issue:13:07
mzanettinik90: the pkgconfig seems to work a bit different, unlike other cmake files you don't give the target where you want to include the stuff, you give a variable prefix (don't ask me why)13:07
mzanettinik90: so you'd do something like that:13:07
mzanettinik90: pkg_check_modules(LIBU1DB libu1db-qt5)13:08
mzanettinik90: that would then prepare a bunch of variables for you.13:08
mzanettiall of them starting with LIBU1DB13:08
mzanettione of them is LIBU1DB_INCLUDE_DIRS13:09
mzanettiyou can add that in include_directories()13:09
nik90ah ok13:09
mzanettinik90: and another is LIBU1DB_LDFLAGS which you should pass to target_link_libraries13:10
mzanettinik90: check out that unity8/plugins/Unity/Launcher/CMakeLists.txt and what it does with the GSETTINGS_QT_* vars13:11
nik90mzanetti: yeah i see it13:11
mzanettinik90: so there's one more problem though :(13:11
mzanettinik90: libu1db-qt5.pc seems to have an issue preparing the _INCLUDE_DIRS var correctly :/13:12
mzanettinik90: so it still won't work. and I believe that's a bug of that .pc file. But I'm not entirely sure13:12
* mzanetti is not a cmake/pkgconfig expert13:12
mzanettinik90: you can print each of these variables with13:13
nik90ah :/13:13
mzanettimessage("${LUBU1DB_INCLUDE_DIRS}")13:13
mzanettithat would then print the contents of that var during the cmake step13:13
mzanettiand the correct include path (/usr/include/libu1db-qt5/) is not contained in there13:14
mzanettiwhile I think it should13:14
mzanettinik90: so as a workaround, you can use this:13:14
mzanetti#include "libu1db-qt5/query.h"13:15
mzanettierr13:15
mzanetti#include <libu1db-qt5/query.h>13:15
mzanettibut please ask libu1db devs if that's a bug or I just got something wrong13:15
nik90will do13:16
nik90when I did message the INCLUDE_DIRS variables, it was empty13:16
mzanettihmm..  its not empty for me13:16
nik90message("TEST: Lib name: ${LUBU1DB_INCLUDE_DIRS}")13:17
nik90I got TEST:Lib name:13:17
mzanettihow does you pkg_check_module entry look like?13:17
nik90pkg_check_modules(LIBU1DB libu1db-qt5)13:18
nik90include_directories(13:18
nik90    ${CMAKE_CURRENT_SOURCE_DIR}13:18
nik90    ${LIBU1DB_INCLUDE_DIRS}13:18
nik90)13:18
mzanettisame mistake: LU1DB vs LIBU1DB13:18
nik90oh god ... :P13:18
mzanettiah no... slightly different13:18
mzanettithere's a typo13:18
mzanettiLUB vs LIB13:18
nik90yeah13:19
nik90that returned it now properly13:19
nik90lib name13:19
nik90/usr/;/usr/include/x86_64-linux-gnu/qt5/QtQuick;/usr/include/x86_64-linux-gnu/qt5;/usr/include/x86_64-linux-gnu/qt5/QtGui;/usr/include/x86_64-linux-gnu/qt5;/usr/include/x86_64-linux-gnu/qt5/QtQml;/usr/include/x86_64-linux-gnu/qt5;/usr/include/x86_64-linux-gnu/qt5/QtNetwork;/usr/include/x86_64-linux-gnu/qt5;/usr/include/x86_64-linux-gnu/qt5/QtSql;/usr/include13:19
nik90/x86_64-linux-gnu/qt5;/usr/include/x86_64-linux-gnu/qt5/QtCore;/usr/include/x86_64-linux-gnu/qt513:19
mzanettiyeah, but still the wanted path isn't in there, is it?13:19
mzanettiyeah... IMO it should also have /usr/inlclude/libuqdb-qt5/ too13:19
nik90ok, I will let the u1db developer kalikiana know about this13:20
mzanettinik90: this is what I did to make it compile: http://paste.ubuntu.com/782492513:21
mzanettinik90: I think the fact that I had to manually add the Sql module to qt5_use_modules isn't correct either.13:21
mzanettinik90: that should be done by the included .pc file too13:21
nik90should I add Network too? or including Sql is sufficient?13:22
nik90suprisingly it compiles for me without the Sql line13:22
mzanettioh.... right... maybe an issue here13:22
mzanettinik90: if you look at the print above,13:23
mzanettiyou'll see that the path's for QtNetwork and QtSql are included in the LIBU1DB_INCLUDE_DIRS13:23
nik90yes13:23
nik90I did target_link_libraries(timezone ${LIBU1DB_INCLUDE_DIRS}), but I will change that similar to yours13:24
mzanettinik90: my paste is totally wrong, close that immediately :D13:24
nik90ok :P13:24
nik90mzanetti: thnx, now that the include is working, I will start working on building the model itself. Should be fun :)13:26
mzanettinik90: this should be better: http://paste.ubuntu.com/782495613:26
nik90mzanetti: I would still need to do the target library link?13:27
mzanettinik90: right... yeah... you'll get the undefined reference thing later without that13:36
=== digi_ is now known as digitaldrowning
is0xbhhi. please say, how i can install netbeans package with ext. ".sh" ?15:44
is0xbhallowed to "run application as programm"15:45
is0xbhthis action don't help me15:46
gerlowskijaDoes anyone know what the 'recommended' way to run autopilot tests on an emulator are?  I'm trying to verify some tests I've made some changes to.19:18
gerlowskijaI've tried using adt-run, without much luck.  I've also tried ssh-ing to the emulator instance and installing/running the tests locally.19:19
nik90gerlowskija: Did you talk to balloons about this? He wrote a blog post about using adt-run to run tests and should be delighted to hear your feedback and issues.19:26
nik90gerlowskija: http://www.theorangenotebook.com/2014/07/a-new-test-runner-approaches.html19:26
gerlowskijaThanks nik90 that's actually where I heard about adt-run initially.  And no I haven't talked to balloons about my adt-run struggles..I tried yesterday, and wasn't sure if he's around on the weekends.19:29
gerlowskija"I tried yesterday" = "I initially ran into my adt-run issues yesterday"19:29
gerlowskijaand "issues" = "I probably am just doing something wrong"19:30
nik90:)19:34
nik90gerlowskija: yeah best to wait until tomorrow to ask him.19:34
nik90I don't anyone is in this channel during the weekends19:34
nik90think*19:34
gerlowskijaYeah, that makes sense.  I'll bug him about it tomorrow, thanks nik9019:39
nik90np19:44
nik90mzanetti: Do you know how to iterate through a QVariant object and output the values?19:51
nik90mzanetti: I have the following QVariant,19:51
nik90QVariant(QVariantMap, QMap(("city", QVariant(QString, "Amsterdam") ) ( "country" ,  QVariant(QString, "Netherlands") ) ( "timezone" ,  QVariant(QString, "Europe/Amsterdam") ) ) )19:51
=== renato is now known as Guest89836
=== Guest89836 is now known as renato___
nik90mzanetti: never mind, I think I figured it out :)20:10
=== Julian is now known as Guest33497

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