×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    5

    Problems with QTWebview

    Hi, I I want to integrate a web aplication(HTML5 + javascript) with maemo using webview. It uses html5 to save things in a local database. But when it loads the page it gives me this error:

    MainMenu -->
    ModelGenericEvent.errorBBDD.
    Error: There was not enough remaining storage space, or the storage quota was reached and the user declined to allow more space.

    The code that assigns the Offline quota is this:
    quint64* num = new quint64(0xFFFFFFFF);
    view->settings()->setOfflineWebApplicationCacheQuota(*num);
    view->settings()->setAttribute(QWebSettings::LocalStorageEnabled,true);
    view->settings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled,true);
    view->settings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled,true);
    view->settings()->setOfflineWebApplicationCachePath("/home/igonzalez/QTWorkspace/Browser/Cache");
    view->settings()->setLocalStoragePath("/home/igonzalez/QTWorkspace/Browser/Cache");
    view->settings()->setOfflineStoragePath("/home/igonzalez/QTWorkspace/Browser/Cache");
    view->settings()->setOfflineStorageDefaultQuota(*num);

    Is there anyway to assign more quota space? Or another way to avoid this error?

    Thank You

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

    Re: Problems with QTWebview

    Quote Originally Posted by haas85 View Post
    quint64* num = new quint64(0xFFFFFFFF);
    view->settings()->setOfflineWebApplicationCacheQuota(*num);
    Why do you create num variable dynamically?

    Quote Originally Posted by haas85 View Post
    view->settings()->setOfflineWebApplicationCachePath("/home/igonzalez/QTWorkspace/Browser/Cache");
    view->settings()->setLocalStoragePath("/home/igonzalez/QTWorkspace/Browser/Cache");
    view->settings()->setOfflineStoragePath("/home/igonzalez/QTWorkspace/Browser/Cache");
    Does /home/igonzalez/ path exist?
    What is an output of df on the device?

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    5

    Re: Problems with QTWebview

    Quote Originally Posted by divanov View Post
    Why do you create num variable dynamically?
    Becuse I am used to Java . I have change it now.


    Quote Originally Posted by divanov View Post
    Does /home/igonzalez/ path exist?
    Yes it exists, but I have change the path

    Quote Originally Posted by divanov View Post
    What is an output of df on the device?
    I don't understand this. But with this changes now it works. Thank You

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

    Re: Problems with QTWebview

    Quote Originally Posted by haas85 View Post
    I don't understand this. But with this changes now it works. Thank You
    Which changes? Open task launcher on the phone, scroll menu a bit and find X Terminal. Lauch the latter
    and type there df, it will show you disk usage.
    For example on my phone:
    Code:
    $df -h
    Filesystem                Size      Used Available Use% Mounted on
    rootfs                  227.8M    167.1M     56.5M  75% /
    ubi0:rootfs             227.8M    167.1M     56.5M  75% /
    tmpfs                     1.0M     92.0k    932.0k   9% /tmp
    tmpfs                   256.0k     88.0k    168.0k  34% /var/run
    none                     10.0M     72.0k      9.9M   1% /dev
    tmpfs                    64.0M      4.0k     64.0M   0% /dev/shm
    /dev/mmcblk0p2            2.0G    311.1M      1.6G  16% /home
    /home/opt                 2.0G    311.1M      1.6G  16% /opt
    /dev/mmcblk0p1           27.0G    427.3M     26.6G   2% /home/user/MyDocs

  5. #5
    Registered User
    Join Date
    May 2010
    Posts
    5

    Re: Problems with QTWebview

    I have put num satically and change the database path:
    Code:
    quint64 num = 0xFFFFFFFF;
    view->settings()->setOfflineWebApplicationCacheQuota(num);
    view->settings()->setOfflineStorageDefaultQuota(num);
    I am not using a phone, I am with the simulator that QT Creator has.

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

    Re: Problems with QTWebview

    There is particularly no difference between the code
    Code:
    quint64 *num = new quint64(0xFFFFFFFF);
    QWebSettings::setOfflineWebApplicationCacheQuota(*num);
    QWebSettings::setOfflineStorageDefaultQuota(*num);
    delete num;
    and
    Code:
    quint64 num = 0xFFFFFFFF;
    QWebSettings::setOfflineWebApplicationCacheQuota(num);
    QWebSettings::setOfflineStorageDefaultQuota(num);
    except the former is weird way of doing the thing.

  7. #7
    Registered User
    Join Date
    May 2010
    Posts
    5

    Re: Problems with QTWebview

    I know, but now it works.

    Quote Originally Posted by divanov View Post
    There is particularly no difference between the code
    Code:
    quint64 *num = new quint64(0xFFFFFFFF);
    QWebSettings::setOfflineWebApplicationCacheQuota(*num);
    QWebSettings::setOfflineStorageDefaultQuota(*num);
    delete num;
    and
    Code:
    quint64 num = 0xFFFFFFFF;
    QWebSettings::setOfflineWebApplicationCacheQuota(num);
    QWebSettings::setOfflineStorageDefaultQuota(num);
    except the former is weird way of doing the thing.

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

    Re: Problems with QTWebview

    Quote Originally Posted by haas85 View Post
    I know, but now it works.
    That's because you've changed something else.

  9. #9
    Registered User
    Join Date
    May 2010
    Posts
    5

    Re: Problems with QTWebview

    My code now is this, and I have not changed nothing more:

    Code:
    quint64 num = 0xFFFFFFFF;
    view->settings()->setOfflineWebApplicationCacheQuota(num);
    view->settings()->setAttribute(QWebSettings::LocalStorageEnabled,true);
    view->settings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled,true);
    view->settings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled,true);
    view->settings()->setOfflineWebApplicationCachePath("/home/igonzalez/QTWorkspace/OHA-BrowserSocket-build-maemo/Cache");
    view->settings()->setLocalStoragePath("/home/igonzalez/QTWorkspace/OHA-BrowserSocket-build-maemo/Cache");
    view->settings()->setOfflineStoragePath("/home/igonzalez/QTWorkspace/OHA-BrowserSocket-build-maemo/Cache");
    view->settings()->setOfflineStorageDefaultQuota(num);
    qDebug()<<view->settings()->offlineStorageDefaultQuota();
    qDebug()<<view->settings()->offlineWebApplicationCacheQuota();
    view->load(url);

Similar Threads

  1. Several problems with NMIT 4.1
    By jtalviva in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2006-03-10, 10:59
  2. Series 60 CustomItem implementation problems?
    By fotis.chatzinikos in forum Mobile Java General
    Replies: 2
    Last Post: 2005-03-10, 15:48
  3. Problems with Developer Suite 2.2 and PC Suite 6.41.6
    By caiox in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-02-20, 18:53
  4. NGage devkit problems
    By cambion in forum Symbian
    Replies: 3
    Last Post: 2004-12-07, 07:50

Posting Permissions

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