×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    2

    Qt Mobility 1.1 organizer API problems on N900

    Hi,

    I compiled QTM 1.1 in scratchbox and installed it into the Nokia Qt SDK and onto an N900.

    Now I tried to access the calendar via the organizer API:
    QOrganizerManager::availableManagers() has two elements ("memory", "maemo5"). The "maemo5" manager returns 0 items. What's my fault?
    Last edited by blakharaz; 2010-11-09 at 23:44.

  2. #2
    Nokia Developer Expert
    Join Date
    May 2010
    Posts
    65

    Re: Qt Mobility 1.1 organizer API problems on N900

    Hi,

    I cannot reproduce this issue, unfortunately. Are you able to give me more information about the versions of software you're running (is the n900 running PR1.2 or what? Which version of Qt are you using?) Does it work in your scratchbox, and not work on the device? Or does it fail to work in both Scratchbox and on device?

    Obviously, it will only return items which are already entered into the calendar backend via the Calendar application, or which you've saved manually using the calendar-backend-dev API, or the Qt Mobility Organizer API itself; so it might be worth double checking that the data you expect to be in the calendar is already there, in order to be returned by the API.

    Secondly, can you paste the exact code you're using to retrieve the items? Are you using the itemsForExport() function or the items() function? For debugging, I'd suggest using itemsForExport() since that should return all persisted items in the database, which occur during the specified time period.

    Cheers,
    Chris.

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Qt Mobility 1.1 organizer API problems on N900

    You need also maemo engine as it's explained here
    http://doc.qt.nokia.com/qtmobility-1...e-implementors

  4. #4
    Registered User
    Join Date
    Nov 2010
    Posts
    2

    Re: Qt Mobility 1.1 organizer API problems on N900

    Okay, here's what I did.

    I downloaded the QTM 1.1 package and compiled it in Scratchbox (with calendar-backend-dev installed)
    ./configure -release
    make
    fakeroot make install

    I took the files in the install directory and copied them onto an N900 with PR1.3. I copied all files in install/lib to /usr/lib and install/plugins/* to /usr/lib/qt4/plugins/.

    The maemo5 calender engine (well, kind of) works, because
    Code:
        foreach (const QString& manager, QOrganizerManager::availableManagers()) {
            if (manager != "invalid" && manager != "skeleton") {
                printf("%s\n", manager.toStdString().c_str());
            }
        }
    prints "memory" and "maemo5".


    Code:
        QList<QOrganizerItem> items = man.itemsForExport();
        printf("Found %d items\n", items.length());
    results in "Found 0 items"

    Code:
        items = man.itemsForExport(QDateTime(QDate(2010, 1, 1), QTime(0, 0, 0)),
                                      QDateTime(QDate(2010, 12, 31), QTime(23, 59, 59)));
    
        printf("Found %d items\n", items.length());
    results in "Found 0 items"


    And yes, I have entries in my calendar.

  5. #5
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Qt Mobility 1.1 organizer API problems on N900

    Did you check this page?
    http://zwong.de/?p=79

  6. #6
    Nokia Developer Expert
    Join Date
    May 2010
    Posts
    65

    Re: Qt Mobility 1.1 organizer API problems on N900

    Hi,

    Interesting. Can you do a couple of things for me:

    1) When you run your application, can you run it from the terminal, with: "QT_DEBUG_PLUGINS=1 ./yourapp" and tell me if there's any relevant output regarding the libqtorganizer_maemo5.so plugin?
    2) When you constuct your manager, how do you construct it? What does calling man.managerUri() and man.managerName() return? My thinking here is that maybe the memory engine is being chosen wrongly as the default engine, for some reason (and it won't have any items in it).

    I'm still trying to reproduce the issue on my device, but haven't been able to so far.

    Cheers,
    Chris.

    /edit: Just out of interest, are you running this as the "user" user, or as "root"? If you're running as root, it will fail to load the database file (because it looks in the current-user's home directory for the sqlite database containing the calendar entries). In that case, it should print out a warning "QOrganizerItemMaemo5Engine: error: unable to load database; instance will be invalid" or something to that effect. This may also occur if you have manually deleted the calendar file on your system.
    Last edited by chriadam; 2010-11-12 at 04:07.

Similar Threads

  1. Nokia Qt SDK and Qt Mobility - Installation Problems
    By napstar in forum [Archived] Qt SDKs and Tools
    Replies: 8
    Last Post: 2011-06-07, 13:40
  2. Porting Qt Mobility 1.1.0 on N900.
    By blueiqbal in forum [Archived] Qt Mobility Project
    Replies: 8
    Last Post: 2010-08-26, 06:12
  3. Qt Mobility + Qt 4.7 SDK is it posible on N900
    By phandangduythinh in forum [Archived] Qt Mobility Project
    Replies: 3
    Last Post: 2010-06-17, 14:28
  4. Does Qt Mobility 1.0.0 support QCamera for N900?
    By hpbrother in forum [Archived] Qt Mobility Project
    Replies: 9
    Last Post: 2010-05-19, 11:18
  5. QT Mobility Contacts - N900
    By gurmukh in forum [Archived] Qt Mobility Project
    Replies: 4
    Last Post: 2010-02-16, 11:42

Posting Permissions

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