• QFtp编程模型(二)


    QFtp的list 命令 发射 listInfo信号,

    执行序列

    list ->commandStared

    listInfo(file1)

    listInfo(file2)

    ...

    commandFinished

    可以在commandStarted/Finished中监控 commandid 识别命令执行。

    但是 执行get命令中 地一个get启动时发射 commandstart 得到 commandid=QFt::get

    但是每个get执行后检测不到commandfinished中 commandid==QFT:get 命令

    只在最后一个get执行后,监控到 commandfinished中的 commandid==QFTP::get命令

    原因:见以下链接

    https://stackoverflow.com/questions/23698520/qftp-get-never-emits-commandfinished

    I am too late to reply, but it still may help others.

    In void Ftp::commandFinished(int i, bool error) it is always better to check for QFtp::None option also, since if your last command is get and when commandFinished() slot gets called then if (ftp->currentCommand() == QFtp::Get) will not be able to identify the last command, since your current command may not be get because it is already finished.

    You can also check with id as if(ftp->currentCommand() == QFtp::Get || 1 == id)

    commandfiished 发送的过早,没有捕捉到 命令号。但可以在ftp->currenCommand==QFtp::Get 得到 该消息

  • 相关阅读:
    Animation(三)
    布局
    AutoCommpleteText
    PHP数组中常用函数
    Animation(四)
    转:JAVA内存映射文件
    Ubuntu安装jdk
    转:Java NIO 详解
    转:长连接与短连接
    Direct or Nondirect ByteBuffer
  • 原文地址:https://www.cnblogs.com/keleman/p/14187916.html
Copyright © 2020-2023  润新知