@@ -112,24 +112,24 @@ CFrmFileTransfer::~CFrmFileTransfer()
112112 delete ui;
113113}
114114
115- void CFrmFileTransfer::SetRemoteConnecter (CRemoteFileSystemModel *p )
115+ void CFrmFileTransfer::SetRemoteConnecter (CRemoteFileSystemModel *pRfs )
116116{
117- bool check = connect (p , SIGNAL (sigGetDir (CRemoteFileSystem*)),
117+ bool check = connect (pRfs , SIGNAL (sigGetDir (CRemoteFileSystem*)),
118118 this , SIGNAL (sigGetDir (CRemoteFileSystem*)));
119119 Q_ASSERT (check);
120120 check = connect (this , SIGNAL (sigGetDir (CRemoteFileSystem*, QVector<QSharedPointer<CRemoteFileSystem> > , bool )),
121- p , SLOT (slotGetDir (CRemoteFileSystem*, QVector<QSharedPointer<CRemoteFileSystem> > , bool )));
121+ pRfs , SLOT (slotGetDir (CRemoteFileSystem*, QVector<QSharedPointer<CRemoteFileSystem> > , bool )));
122122 Q_ASSERT (check);
123- check = connect (p , SIGNAL (sigRemoveDir (const QString&)),
123+ check = connect (pRfs , SIGNAL (sigRemoveDir (const QString&)),
124124 this , SIGNAL (sigRemoveDir (const QString&)));
125125 Q_ASSERT (check);
126- check = connect (p , SIGNAL (sigRemoveFile (const QString&)),
126+ check = connect (pRfs , SIGNAL (sigRemoveFile (const QString&)),
127127 this , SIGNAL (sigRemoveFile (const QString&)));
128128 Q_ASSERT (check);
129- check = connect (p , SIGNAL (sigRename (const QString&, const QString&)),
129+ check = connect (pRfs , SIGNAL (sigRename (const QString&, const QString&)),
130130 this , SIGNAL (sigRename (const QString&, const QString&)));
131131 Q_ASSERT (check);
132- check = connect (p , SIGNAL (sigMakeDir (const QString&)),
132+ check = connect (pRfs , SIGNAL (sigMakeDir (const QString&)),
133133 this , SIGNAL (sigMakeDir (const QString&)));
134134 Q_ASSERT (check);
135135}
@@ -309,6 +309,7 @@ void CFrmFileTransfer::on_tabLocal_customContextMenuRequested(const QPoint &pos)
309309
310310void CFrmFileTransfer::slotTabLocalCopyToClipboard ()
311311{
312+ if (!m_pModelLocalDir) return ;
312313 auto idx = ui->tabLocal ->currentIndex ();
313314 if (!idx.isValid ()) return ;
314315 QString szPath = m_pModelLocalDir->filePath (idx);
@@ -319,9 +320,11 @@ void CFrmFileTransfer::slotTabLocalCopyToClipboard()
319320
320321void CFrmFileTransfer::slotTabLocalUpload ()
321322{
323+ if (!m_pModelLocalDir) return ;
322324 auto idx = ui->tabLocal ->currentIndex ();
323325 if (!idx.isValid ()) return ;
324- QString szPath = m_pModelLocalDir->filePath (idx);
326+ QString szPath;
327+ szPath = m_pModelLocalDir->filePath (idx);
325328 if (szPath.isEmpty ()) return ;
326329}
327330
@@ -476,7 +479,7 @@ void CFrmFileTransfer::slotTreeRemoteDownload()
476479{
477480}
478481
479- int CFrmFileTransfer::EnumRemoteDirectory (CRemoteFileSystem *p , const QString &szLocal)
482+ int CFrmFileTransfer::EnumRemoteDirectory (CRemoteFileSystem *pRfs , const QString &szLocal)
480483{
481484 int nRet = 0 ;
482485
0 commit comments