×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    45

    QtSparql request works only when application started from QtCreator

    Hi,

    I have a code that issues this QtSparql request (
    Code:
    "SELECT nie:url(?urn) AS ?url tracker:id(?urn) AS ?trackerid " \
        "WHERE { ?urn rdf:type nfo:Image ; tracker:available \"true\"^^xsd:boolean . " \
        "OPTIONAL { ?urn nie:contentCreated ?created } . } ORDER BY DESC (?created)"
    )
    and it works fine if I start the application from QtCreator (either debug or just run), but when I run it from terminal I get this error:
    Code:
    QTrackerDirectSelectResult: QSparqlError(9, "GDBus.Error: org.freedesktop.Dbus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.574" (uid=29999 pid=10265 comm="./cuteBoxQml ") interface="org.freedesktop.Tracker1.Steroids" member="Query" error name="(unset)" requested_reply=0 destination="org.freedesktop.Tracker1 (uid=29999 pid=1314 com="/usr/lib/tracker/tracker-store "))", 4) "SELECT nie:url(?urn) AS ?url tracker:id(?urn) AS ? trackerid WHERE { ?urn rdf:type nfo:Image ; tracker:available "true"^^xsd:boolean . OPTIONAL { ?urn nie:contentCreated ?created } . } ORDER BY DESC (?created)"
    Does anyone know what this problem might be. From the error code I could figure out that the request was denied. Do MeeGo applications need to have some certificates and capabilities set like Symbian ones or am I missing something?

  2. #2
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: QtSparql request works only when application started from QtCreator

    Yes. You need to use aegis credentials for access. In developer mode you can use aegis-su tool to enable security mode with tokens required for using tracker queries

    Please check this link -

    https://projects.maemo.org/trac/meeg...rovided-tokens

    Check the credentials, tokens for Data management in that.
    TrackerReadAccess - Allows to use Query

    Hope this helps!

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    45

    Re: QtSparql request works only when application started from QtCreator

    Thanks kusumk,

    I cannot access that link, it requires credentials (from maemo.org only managed to create account for garage projects), but based on the information you provided I ran a search on the net and found the info I needed.
    Thanks again

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: QtSparql request works only when application started from QtCreator

    Hi
    for the record, here is the public version of that link; http://www.developer.nokia.com/Commu...ecurity_Tokens
    Last edited by gnuton; 2011-12-01 at 09:07.

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    45

    Re: QtSparql request works only when application started from QtCreator

    I've managed to make the application run from the terminal, I don't get the QSparqlError(9, "GDBus.Error: org.freedesktop.Dbus.Error.AccessDenied: Rejected send message, 2 matched rules...
    error, but I can't still run the application by tapping the icon in the application launcher (I've triple checked the packaging files and they seem ok). Is there a way to see application launcher logs maybe I can get some hints why it doesn't start?

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: QtSparql request works only when application started from QtCreator

    Can I see your Aegis manifest file?
    you app doesn't need aegis file if you run it from SSH or you launch it from QtCreator.
    Last edited by gnuton; 2011-12-02 at 13:24.

  7. #7
    Registered User
    Join Date
    Aug 2005
    Posts
    45

    Re: QtSparql request works only when application started from QtCreator

    Finally I've managed to get it working, in fact someone on Twitter gave me a hint to change the launch params in the .desktop file from "--type=d" to "--type=e". I don't know what's the difference between them, but it works now.

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: QtSparql request works only when application started from QtCreator

    Here is what "e" and "d" stand for:
    Usage: invoker [options] [--type=TYPE] [file] [args]

    Launch m, qt, or qdeclarative application compiled as a shared library (-shared) or
    a position independent executable (-pie) through applauncherd.

    TYPE chooses the type of booster used. Qt-booster may be used to
    launch anything. Possible values for TYPE:
    m Launch a MeeGo Touch application.
    q (or qt) Launch a Qt application.
    d Launch a Qt Declarative (QML) application.
    e Launch any application, even if it's not a library.
    Can be used if only splash screen is wanted.

Similar Threads

  1. Replies: 5
    Last Post: 2011-06-22, 13:06
  2. Way to increase max size of Application Output scroll under QtCreator?
    By danhicksbyron in forum [Archived] Qt SDKs and Tools
    Replies: 1
    Last Post: 2011-04-25, 17:06
  3. Replies: 0
    Last Post: 2011-02-22, 06:56
  4. Replies: 3
    Last Post: 2009-01-08, 10:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •