Results 1 to 3 of 3

Thread: Webkit and Client Side Storage

  1. #1
    Join Date
    Jan 2010
    Location
    New Zealand
    Posts
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Webkit and Client Side Storage

    Hello people.

    I been having trouble getting the client side storage working with webkit.

    Here is code i'm using can anyone see what i'm doing wrong?
    Qt Code:
    1. QApplication::setApplicationName(TEXTAPPLICATION);
    2.  
    3. QApplication::setApplicationVersion(TEXTAPPVERSION);
    4.  
    5. QApplication::setOrganizationName(TEXTORG);
    6.  
    7. QApplication::setOrganizationDomain(TEXTORGDOMAIN);
    8.  
    9. QSettings settings;
    10.  
    11. QWebSettings::enablePersistentStorage(TEXTDATAPATH);
    12.  
    13. QWebSettings::setOfflineStorageDefaultQuota(MAXQUOTA);
    14.  
    15. QWebSettings::setOfflineWebApplicationCacheQuota(MAXQUOTA);
    16.  
    17. QString url = "http://webkit.org/demos/sticky-notes/index.html";
    18.  
    19. ui->setupUi(this);
    20.  
    21. this->setWindowTitle(TEXTAPPLICATION); //set application windows title
    22.  
    23. ui->webView->settings()->globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
    24.  
    25. ui->webView->settings()->globalSettings()->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, true);
    26.  
    27. ui->webView->settings()->globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
    28.  
    29. ui->webView->settings()->globalSettings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
    30.  
    31. ui->webView->setUrl(url);
    To copy to clipboard, switch view to plain text mode 



    I worked out that i'm getting this error in the inspector.

    INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable.

    Seems to have something to do with window.openDatabase()

  2. #2
    Join Date
    Feb 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Webkit and Client Side Storage

    I'm having the same issue. I get that exact error in the inspector. I can't figure it out... Could it be a bug in Qt? Because it works just fine in Safari.

  3. #3
    Join Date
    Jun 2010
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Symbian S60 Maemo/MeeGo

    Default Re: Webkit and Client Side Storage

    I know it's been a while since this question was posted.. I had the same issue and there is very little information about this error around web.
    Indeed, error happens when calling openDatabase within JS and I managed to eliminate it with

    Qt Code:
    1. QWebSettings::globalSettings()->setOfflineStoragePath("/some/writable/path/here");
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. side-by-side configuration is incorrect
    By trueqt in forum Qt Programming
    Replies: 1
    Last Post: 28th August 2009, 00:35
  2. Client side password management
    By frikkasoft in forum Qt Programming
    Replies: 2
    Last Post: 12th December 2008, 10:23
  3. Stack two QMenuBars instead of side by side?
    By killerwookie99 in forum Qt Programming
    Replies: 1
    Last Post: 16th August 2008, 06:27
  4. Replies: 5
    Last Post: 15th February 2008, 02:54
  5. What is the format of QByteArray's storage?
    By LiCodeX in forum Newbie
    Replies: 4
    Last Post: 31st October 2007, 09:21

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.