Active Topics

 


Reply
Thread Tools
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#11
Are you sure it does crash in your QNetworkAccess slot?
For me it can not open the file "tmp.xml" when running from the
.desktop file.
I don't know what is the working directory. If you start
the program from the command line, it can create the tmp.xml
file.
I changed your code to create the file "/tmp/tmp.xml"
and then it does work even with a .desktop file.

Nicolai
 

The Following 4 Users Say Thank You to nicolai For This Useful Post:
antman8969's Avatar
Posts: 64 | Thanked: 58 times | Joined on Jul 2010 @ United States
#12
Originally Posted by nicolai View Post
Are you sure it does crash in your QNetworkAccess slot?
For me it can not open the file "tmp.xml" when running from the
.desktop file.
I don't know what is the working directory. If you start
the program from the command line, it can create the tmp.xml
file.
I changed your code to create the file "/tmp/tmp.xml"
and then it does work even with a .desktop file.

Nicolai
Oh wow... that would make sense as to why sudo fixes it too....

I'm at work now but I'll make that change when I get back home...
if that works, then I love you
 
antman8969's Avatar
Posts: 64 | Thanked: 58 times | Joined on Jul 2010 @ United States
#13
yep, that fixed it... and explains why permissions would have anything to do with it...

Thanks so much!
 

The Following User Says Thank You to antman8969 For This Useful Post:
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#14
A few notes:

I would suggest using http://doc.qt.nokia.com/4.7/qtemporaryfile.html for temporary files, it works across platforms (and avoids access issues like above) and cleans up after itself. The other suggestion is to cut down on having separate QNetworkAccessManagers. Ideally, you should have only one of those per process.
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 

The Following 2 Users Say Thank You to attila77 For This Useful Post:
antman8969's Avatar
Posts: 64 | Thanked: 58 times | Joined on Jul 2010 @ United States
#15
Originally Posted by attila77 View Post
A few notes:

I would suggest using http://doc.qt.nokia.com/4.7/qtemporaryfile.html for temporary files, it works across platforms (and avoids access issues like above) and cleans up after itself. The other suggestion is to cut down on having separate QNetworkAccessManagers. Ideally, you should have only one of those per process.
ill look into the qtemporaryfile

I just re wrote the program today actually, removed 12 instances of the network manager....
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:23.