Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Upgraded from 4.7.1 to 4.8.2 libs. Now getting weird behavior.
Qt 6.11 is out! See what's new in the release blog

Upgraded from 4.7.1 to 4.8.2 libs. Now getting weird behavior.

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 1 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Using Qt for embedded linux with webkit for UI.

    For some reason during a particular javascript function execution a message box is being displayed: "JavaScript Problem" . Message box contains Yes, No buttons asking to stop the script execution.

    QWebPage::javaScriptConsoleMessage is being called and states, "JavaScript execution exceeded timeout.".

    First, I'm not even certain why this is happening. The script does take a while to complete however. Second, why is the message box even appearing? I am re-implementing QWebPages just as before (4.7.1). javaScriptConsoleMessage is being re-implemented properly, but it doesn't appear javaScriptAlert is. Was there a change that I am not aware of?

    @#include "adiwebpage.h"
    #include <QDebug>

    AdiWebPage::AdiWebPage(QObject *parent) :
    QWebPage(parent)
    {
    }

    void AdiWebPage::javaScriptAlert ( QWebFrame * frame, const QString & msg )
    {
    Q_UNUSED(frame);
    if (logger()->isDebugEnabled())
    logger()->debug() << msg;
    }

    bool AdiWebPage::javaScriptConfirm ( QWebFrame * frame, const QString & msg )
    {
    Q_UNUSED(frame);
    if (logger()->isDebugEnabled())
    logger()->debug() << msg;
    return false;
    }

    void AdiWebPage::javaScriptConsoleMessage ( const QString & message, int lineNumber, const QString & sourceID )
    {
    if (logger()->isDebugEnabled())
    {
    logger()->debug() << message;
    logger()->debug() << lineNumber << ":" << sourceID;
    }
    }

    bool AdiWebPage::javaScriptPrompt ( QWebFrame * frame, const QString & msg, const QString & defaultValue, QString * result )
    {
    Q_UNUSED(frame);
    Q_UNUSED(result);
    if (logger()->isDebugEnabled())
    logger()->debug() << defaultValue << " " << msg;
    return false;
    }
    @

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      I just saw javaScriptAlert reimplemented. So I am not sure what is sending an alert to create a message box, but this is something I will really need to suppress.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Ok..it looks like I need to re-implement shouldInterruptJavaScript (). It looks like it wasn't being properly being called in Qt 4.7.1 for whatever reason.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved