Hi Alan I do not completely understand the need of using a mutex in the qt driver however without any change in the actual driver approach it is easy to allow the driver to work well within a qt app and also in any other c or c++ program if in the file qt.cpp function bool initQtApp( bool isGUI ) we add after the ++appCounter; line (line 90) the instruction if(appCounter == 1 && qApp != NULL) ++appCounter; this will prevent the call delete qApp; when one closes the driver within a qt application, that would crash teh application, and it does not conflict with the actual behavior of the qt driver it onnly takes account for the fact that there is a qApp that was not started by the driver.
cheers, On Mon, Dec 17, 2018 at 6:59 AM António Rodrigues Tomé <art...@gmail.com> wrote: > Hi Alan > Glad to be of some help. > Really that empty string in family name especially when the matchof name > is not an exact match could have strange results and could vary from system > to system. > In order for me to use qt drivers, as all my applications are qt based, I > still need different things as I want to be able to call any of the qt > drivers from within a qt appication. For now if I redefine two functions to > doing nothing in my main.ccp file before int main(int argc, char *argv[]) > > > bool initQtApp( bool isGUI ) > > { > > > } > > > void closeQtApp() > > { > > > } > It seems to work but i still need to check if there is not leak memory > with this approach. > In the future probably it would be nice if the drivers automatically > could work from within a qt application. > > cheers, > > > On Mon, Dec 17, 2018 at 1:41 AM Alan W. Irwin <alan.w.irwin1...@gmail.com> > wrote: > >> On 2018-12-16 10:13-0000 António Rodrigues Tomé wrote: >> >> > Hi all >> > I found no evidence of fontconfig not being working properly in my >> system. >> > so I've made a small test instead of setting font family to null string >> > I've set it to a bogus name. >> > f.setFamily( "BOUGUSTRASHFAMILY" ); // no family name, forcing Qt to >> find >> > an appropriate font by itself >> > and in x01c example as there are four plots i edited the source to add >> > the plfont(1); before plot 1, plfont(2); before plot 2, >> > plfont(3); before plot 3, plfont(4); before plot 4, I also get erase >> the >> > esc text sequence that put title always in Roman. >> > The results are what one would expected. >> >> Hi António: >> >> I agree, that one-line change seems to have solved all qt device >> driver issues on your platform. So I tried the equivalent here, and >> it solves some less obvious Qt issues here for examples 23 and 24 that >> have been around for quite a while. So congratulations on finding a >> solution to a PLplot qt device driver bug that has apparently been around >> since the >> very first development of that device! >> >> I commited a small variation (I added commentary and I replaced your >> bogus family name because it was [barely] conceivable a valid font >> might adopt that family name) of your fix as of >> plplot-5.14.0-8-gdb9d90d0b. So please test that commit (by using git >> checkout plplot-5.14.0-8-gdb9d90d0b before building PLplot from the >> git version) to make sure it answers all your qt device needs (other >> than character size). >> >> @Everybody: >> >> This fix is pretty crucial for our qt device driver because it appears >> to fix all long-standing font problems (including character alignment >> for António) for that device driver. Therefore, I intend to release >> 5.14.1 >> with this fix and any other critical fixes that show up in the next few >> weeks. >> >> More about the git process I should use to create a bug-fix release >> (such as the proposed 5.14.1) in my next post. >> >> Alan >> __________________________ >> Alan W. Irwin >> >> Programming affiliations with the FreeEOS equation-of-state >> implementation for stellar interiors (freeeos.sf.net); the Time >> Ephemerides project (timeephem.sf.net); PLplot scientific plotting >> software package (plplot.sf.net); the libLASi project >> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); >> and the Linux Brochure Project (lbproject.sf.net). >> __________________________ >> >> Linux-powered Science >> __________________________ >> > > > -- > > António Rodrigues Tomé > Universidade da Beira Interior > Instituto D. Luís (lab associado) > email address: > art...@gmail.com > art...@ubi.pt > http://www.researcherid.com/rid/A-5681-2013 > > -- António Rodrigues Tomé Universidade da Beira Interior Instituto D. Luís (lab associado) email address: art...@gmail.com art...@ubi.pt http://www.researcherid.com/rid/A-5681-2013
_______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel