| 152 | } |
| 153 | |
| 154 | int CBackendFileTransfer::SetConnect(COperateFileTransfer *pOperate) |
| 155 | { |
| 156 | int nRet = 0; |
| 157 | bool check = false; |
| 158 | CFrmFileTransfer* pForm = qobject_cast<CFrmFileTransfer*>(pOperate->GetViewer()); |
| 159 | Q_ASSERT(pForm); |
| 160 | check = connect(pForm, SIGNAL(sigGetDir(CRemoteFileSystem*)), |
| 161 | this, SLOT(slotGetDir(CRemoteFileSystem*)), |
| 162 | Qt::DirectConnection); |
| 163 | Q_ASSERT(check); |
| 164 | check = connect(this, SIGNAL(sigGetDir(CRemoteFileSystem*, QVector<QSharedPointer<CRemoteFileSystem> >, bool)), |
| 165 | pForm, SIGNAL(sigGetDir(CRemoteFileSystem*, QVector<QSharedPointer<CRemoteFileSystem> >, bool))); |
| 166 | Q_ASSERT(check); |
| 167 | check = connect(pForm, SIGNAL(sigMakeDir(const QString&)), |
| 168 | this, SLOT(slotMakeDir(const QString&))); |
| 169 | Q_ASSERT(check); |
| 170 | check = connect(pForm, SIGNAL(sigRemoveDir(const QString&)), |
| 171 | this, SLOT(slotRemoveDir(const QString&))); |
| 172 | Q_ASSERT(check); |
| 173 | check = connect(pForm, SIGNAL(sigRemoveFile(const QString&)), |
| 174 | this, SLOT(slotRemoveFile(const QString&))); |
| 175 | Q_ASSERT(check); |
| 176 | check = connect(pForm, SIGNAL(sigRename(const QString&, const QString&)), |
| 177 | this, SLOT(slotRename(const QString&, const QString&))); |
| 178 | Q_ASSERT(check); |
| 179 | check = connect(pForm, SIGNAL(sigStartFileTransfer(QSharedPointer<CFileTransfer>)), |
| 180 | this, SLOT(slotStartFileTransfer(QSharedPointer<CFileTransfer>))); |
| 181 | Q_ASSERT(check); |
| 182 | check = connect(pForm, SIGNAL(sigStopFileTransfer(QSharedPointer<CFileTransfer>)), |
| 183 | this, SLOT(slotStopFileTransfer(QSharedPointer<CFileTransfer>))); |
| 184 | Q_ASSERT(check); |
| 185 | check = connect(this, SIGNAL(sigFileTransferUpdate(QSharedPointer<CFileTransfer>)), |
| 186 | pForm, SLOT(slotFileTransferUpdate(QSharedPointer<CFileTransfer>))); |
| 187 | Q_ASSERT(check); |
| 188 | return nRet; |
| 189 | } |
| 190 | |
| 191 | CBackendFileTransfer::OnInitReturnValue CBackendFileTransfer::InitSFTP() |
| 192 | { |