[texworks] now r596 breaks compilation on Xubuntu 8.10 w. Qt 4.4.3

Jonathan Kew jfkthame at googlemail.com
Mon Apr 5 15:27:27 CEST 2010

On 5 Apr 2010, at 13:51, Stefan Löffler wrote:

> Hi again,
> Am 2010-04-05 14:38, schrieb Peter Wüsten:
>> thank you so much for your quick responses :-) However, new evil lurks
>> around the corner.
>> While trying to compile r597 make stops giving me this (these) errors:
>> src/TWApp.cpp:800: Error: »class QVariant« has no element named »toHash«
>> I suppose it's revision 596 that caused the error as that's where
>> TWApp.ccp was changed.
> No, it's r597. The QHash functionality was added to QVariant only in Qt
> 4.5.


> For the time being I'd suggest to use r596 which should build
> correctly for you (you can use `svn up -r 596` to backdate your working
> copy) until these experimental issues are resolved.
> @Jonathan: I haven't had time to look at your approach for window
> position saving, yet, but I experimented some time ago with registering
> my own struct for QVariant via Q_DECLARE_METATYPE. This worked well for
> me at the time, and it's supposed to be supported since (before?) Qt
> 4.3. Plus it has the advantage of presenting us with a simple,
> expandable data structure directly. Back then, I also added a "line"
> property to reopen files at the line last selected. Unfortunately, I
> never got around to flattening out all issues (in particular race
> conditions when re-opening a document, when one part of the code tries
> to restore the window layout and another part tries to save the current
> settings to the recent docs list). But if you're interested I could send
> you what I have some time.

Yes, I considered creating a struct, and maybe this would be better in some ways. For now, after a bit of experimentation I felt that using a hash provided most flexibility for least effort, as source and PDF windows need different fields, and keys can be added or omitted without breaking compatibility or requiring us to maintain a "version" field, etc. But I'd be willing to consider a different approach; this is definitely experimental at the moment.


More information about the texworks mailing list