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.


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

Reply via email to