Hi Sebastian,
I would like to keep that patch local to OpenBSD as long as the real root cause is not detected. If it's just a Qt version issue a newer version of Qt should be used. If it is a general problem because OpenBSD messes up some process handling, the solution should be platform specific define that is passed to the wait method. This will be -1 for OpenBSD and 30000 for all other. I also recommend to search the code for waitForFinished(). It's used in several locations. Oliver > > On Thursday, December 29, 2011 16:24 CET, "Sebastian > Reitenbach"<[email protected]> wrote: > >> >> On Thursday, December 29, 2011 15:37 CET, Oliver >> Eichler<[email protected]> wrote: >> >>> Hi Sebastian, >>> >>> I do not like the idea of waiting for ever. The documentation says the >>> default is 30 seconds. I can't tell why this is not working for OpenBSD. >>> But can you please try to use 30000 explicitely? That would be a much >>> nicer value than -1. >> >> Setting it to 30000 doesn't help. I get the >> Warning: QProcess: Destroyed while process is still running. >> after 30 seconds. Then I tried to keep the -1 in CMainWindow::isGPSBabel and >> only change the other location to 30000, but then I can open the file, but >> get the data conversion error later. > > I just saw, its even more funnier: I get the "convert error" window, but the > waypoints are shown on the map. > >> >> I also don't know why OpenBSD is different here, maybe its the specific qt4 >> version? No idea. If you are uncomfortable with the -1 approach, then thanks >> to your help, I now know at least how to make it work on OpenBSD. I can keep >> the patch in the ports tree, that would also be fine with me. When it is >> really just this qt4 version the reason, I may be able to remove it when its >> updated in the future... >> >> Sebastian >> >>> >>> >>> Oliver >>> >>> >>>> Hi Oliver, >>>> On Thursday, December 29, 2011 13:26 CET, Oliver >>>> Eichler<[email protected]> wrote: >>>> >>>>> Hi Sebastian, >>>>> >>>>> >>>>> QLGT will test for GPSBabel in bool CMainWindow::isGPSBabel(). If that >>>>> fails a short list of supported formats is shown. You should cross check >>>>> if that method works as expected with OpenBSD. >>>> >>>> Thanks for your fast answer. >>>> >>>> It was exactly the hint I needed. Looking at it, I found QProcess is used >>>> to check availability of gpsbabel. Now on startup I recognized: >>>> >>>> Warning: QProcess: Destroyed while process is still running. >>>> >>>> So I took a closer look at its documentation and found that >>>> waitForFinished did not wait until its really finished so I added the -1 >>>> there (hunk 2) which makes it wait forever. Then it successfully detected >>>> gpsbabel and I got all the new file types to open. Now trying to open a >>>> .loc file, I got a conversion error. >>>> It turned out to be the same problem, adding -1 to waitForFinished in hunk >>>> 1 did the trick. >>>> >>>> With the changes below I was able to open a .loc file on OpenBSD. >>>> In case it matters, I have qt4-4.7.4 >>>> >>>> cheers, >>>> Sebastian >>>> >>>> --- src/CMainWindow.cpp.orig Thu Dec 29 13:40:14 2011 >>>> +++ src/CMainWindow.cpp Thu Dec 29 14:10:37 2011 >>>> @@ -935,7 +935,7 @@ bool CMainWindow::convertData(const QString& >>>> inFormat, >>>> return false; >>>> } >>>> >>>> - if (!babelProcess->waitForFinished()) >>>> + if (!babelProcess->waitForFinished(-1)) >>>> { >>>> return false; >>>> } >>>> @@ -1535,7 +1535,7 @@ bool CMainWindow::isGPSBabel() >>>> bool haveGPSBabel = false; >>>> QProcess proc1; >>>> proc1.start(GPSBABEL " -V"); >>>> - proc1.waitForFinished(); >>>> + proc1.waitForFinished(-1); >>>> haveGPSBabel = proc1.error() == QProcess::UnknownError; >>>> return haveGPSBabel; >>>> } >>>> >>> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex >> infrastructure or vast IT resources to deliver seamless, secure access to >> virtual desktops. With this all-in-one solution, easily deploy virtual >> desktops for less than the cost of PCs and save 60% on VDI infrastructure >> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox >> _______________________________________________ >> Qlandkartegt-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users > > > > > ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Qlandkartegt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
