Answering to myself, for the record:

I found where the problem laid:

I was using QGuiApplication in my main for the Qt5 port, but since
QtWebKitWidgets is QtWidgets based, a QApplication is needed. I
realized this when I tried to create a QWebView to see if that was
needed. That triggered an assert indicating that QtWebKitWidgets
requires a QApplication.

Now my application is ported and working. It will need tweaks here and
there, but the functionality is there.

The good news is that most of the components I had to add to have my
application look "native" in Harmattan are not needed in Sailfish OS,
and the QML files are much simpler.

The C++ part needed a few tweaks to build with Qt5, but not as many as
I expected. I should be able to build with both Qt5 and Qt4 (for
Harmattan and Maemo5) without problems.

Best regards,

Luciano


On Mon, Nov 4, 2013 at 11:24 PM, Luciano Montanaro <mikel...@gmail.com> wrote:
> Hi Everybody,
> I finally managed to build my application, my problems were probably
> due to the Virtual machines being out of sync with QtCreator.
>
> Now I have an application that is still quite rough around the edges,
> but it runs, and displays the first SilicaUI components.
>
> However, I have found another stumbling block, in QtWebKit:
>
> I am using a QWebPage to access the DOM of a web page to scrape the
> information I need to display, but as soon as the QWebPage variable is
> created, I get a segmentation violation.
>
> My code is as follows:
>
>     QWebPage page;
>     page.mainFrame()->setContent(htmlReply, "text/html", baseUrl);
>     QWebElement doc = page.mainFrame()->documentElement();
>
> I tried putting a breakpoint at the "QWebPage page;" line, and I get a
> sigsegv as soon as the constructor is called. The problem is I don't
> even get a proper stack trace, to make sense of what is going on... Is
> there some debug package I can install on the target (or the SDK?) to
> make some progress?
>
> By the way... I need to catch up with this WAyland stuff, but my
> understanding was that it supersedes X11. However, I still see libX11
> and most of the X libraries linked with my application, is this
> normal?
>
> Thank you in advance,
> Luciano
> --
> Luciano Montanaro
>
> Anyone who is capable of getting themselves made President should on
> no account be allowed to do the job. -- Douglas Adams



-- 
Luciano Montanaro

Anyone who is capable of getting themselves made President should on
no account be allowed to do the job. -- Douglas Adams
_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to