hi Robert, On 29 July 2015 at 12:05, Robert Helling <[email protected]> wrote: > Hi, > > as I said already on IRC, somehow, on my Mac, grantlee does not fill in the > template (no dive data is entered). In addition I get some error messages on > the console which do not tell me a lot and also the data types that come > with grantlee are also not easy for me to look into with the debugger. Here > is what happens in detail. I am single stepping through printer.cpp. > > In line 87 Grantlee::Template t = > m_engine->loadByName(PrintOptions->p_template); > > > This produces the error > > QObject: Cannot create children for a parent that is in a different thread. > (Parent is Grantlee::Parser(0x7fff5fbfb8f8), parent's thread is > QThread(0x104d2da60), current thread is QThread(0x11d4b9240) > QObject: Cannot create children for a parent that is in a different thread. > (Parent is Grantlee::Parser(0x7fff5fbfb8f8), parent's thread is > QThread(0x104d2da60), current thread is QThread(0x11d4b9240) > QObject::setParent: Cannot set parent, new parent is in a different thread > > I don’t know how threads enter here but maybe this is the progress bar? I > had a similar error before when trying to show a modal dialog from a thread > that was not the main thread. But this is how far my experience takes me. > > Then a bit later, in line 92 > > htmlContent = t->render(&c); > > > I get the error > Don't know how to handle metatype > Don't know how to handle metatype > Don't know how to handle metatype > Don't know how to handle metatype > Don't know how to handle metatype > Don't know how to handle metatype > Don't know how to handle metatype > Don't know how to handle metatype > Don't know how to handle metatype > Don't know how to handle metatype > Don't know how to handle metatype > Don't know how to handle metatype > > Where the number of repeats seems to be somehow related to which dives I try > to print and how many. Too bad I cannot step into this with the debugger and > also c fails to give any useful information beyond containing a d_ptr to > some address. > > Then I get a printout but it is just the template without any data filled > in. > > Any ideas how I can proceed from here? >
that's bad, :-( i think it throws errors in the parser and there isn't much we can do about it. what are the exact Qt / Grantlee versions? for Grantlee we are targeting 5.0.0 as the minimal version. if you are using homebrew to obtain a somehow older version, try building from source instead, with something like Qt 5.3. i doubt it's our code but you can also try commenting out these lines in qt-ui/printdialog.cpp: 194: connect(printer, SIGNAL(progessUpdated(int)), progressBar, SLOT(setValue(int))); 206: connect(printer, SIGNAL(progessUpdated(int)), progressBar, SLOT(setValue(int))); 208: progressBar->setValue(0); 209: disconnect(printer, SIGNAL(progessUpdated(int)), progressBar, SLOT(setValue(int))); lubomir -- _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
