zoukankan      html  css  js  c++  java
  • 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 得到 该消息

  • 相关阅读:
    java-多个数的和
    大道至简第二章
    大道至简第一章感悟上
    Tools
    LruCache
    Fragment
    科普指纹识别
    Python使用MySQL数据库
    Eclipse中添加PyDev插件
    UniversalAndroidImageLoader出现异常:ImageLoader: Unable to resolve host "https": No address associated with host
  • 原文地址:https://www.cnblogs.com/keleman/p/14187916.html
Copyright © 2011-2022 走看看