PDA

View Full Version : Qftp example code question ... hello everyone



jrandles
7th January 2008, 07:14
Hi there I'm new to the group and started playing with Qt last week, its pretty impressive. As a test I am modifying the Qftp example code delivered with Qt4.3.3 to connect to a non Unix system who's return from the ftp->list(); function can not be parsed by the QUrlInfo class to populate the QTreeWidgetItem. Anyone got any ideas how I can fake it out and parse the ftp->list() output manually ?

Any help appreciated, John

przemoc
8th February 2008, 21:57
Unfortunately, there is no simple solution.
QFtp supports only Unix & DOS style FTP servers and doesn't provide any way to extend its capabilities in this area by subclassing or anything else.
I see only 2 possibilities:

Modify Qt sources at network/qftp.cpp adding your own parsing method and changing QFtpDTP's parseDir() to detect your special server and use that method in this case.
Then your application will be incompatible with standard Qt (network) library and you will have to provide your version with it or build it statically.
Write your own ftp client.

First one is definitely a lot faster approach.