Yes, there is a way to abort the long-playing command. When you call QFtp::list() it starts execution command on Ftp server, and if command finds an entry, QFtp emits QFtp::listInfo(const QUrlInfo &)
signal. You can handle that signal, and check, whether the QUrlInfo::lastModified()
returned time is too old. If yes, you can call QFtp::abort()
function to abort the list command's execution on the server. Here is the sample code:
Establish connection to handle the ftp signals
connect(ftp, SIGNAL(listInfo(const QUrlInfo &)),
this, SLOT(onNewEntry(const QUrlInfo &)));
Implementation of the listInfo signal handling slot:
void MyFtp::onNewEntry(const QUrlInfo &url)
{
// If url.lastModified() is less than some time
// ftp->abort();
}