MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / fetchMore

Method fetchMore

Plugins/FileTransfer/RemoteFileSystemModel.cpp:533–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531}
532
533void CRemoteFileSystemModel::fetchMore(const QModelIndex &parent)
534{
535 qDebug(log) << Q_FUNC_INFO << parent;
536 auto p = GetRemoteFileSystemFromIndex(parent);
537 if(!p) p = m_pRoot;
538 if(!p) {
539 qCritical(log) << "fetchMore:" << parent << "The pointer is nullptr";
540 return;
541 }
542 if(p->GetType() & CRemoteFileSystem::TYPE::FILE) {
543 qCritical(log) << "fetchMore:" << parent << "The node is file";
544 return;
545 }
546 QString szPath = p->GetPath();
547 if(szPath.isEmpty()) {
548 qCritical(log) << "fetchMore:" << parent << "The path is empty";
549 return;
550 }
551 if(p->GetState() != CRemoteFileSystem::State::No) {
552 qDebug(log) << "fetchMore:" << parent << p->GetState() << "The state is not NO";
553 return;
554 }
555 if(m_GetFolder.indexOf(p) != -1)
556 return;
557 m_GetFolder.append(p);
558 p->SetState(CRemoteFileSystem::State::Getting);
559 emit sigGetDir(p);
560 qDebug(log) << "fetchMore:" << parent << p << szPath;
561}
562
563void CRemoteFileSystemModel::slotGetDir(
564 CRemoteFileSystem *p,

Callers 1

slotTreeRemoteRefreshMethod · 0.45

Calls 5

GetPathMethod · 0.80
SetStateMethod · 0.80
GetTypeMethod · 0.45
isEmptyMethod · 0.45
GetStateMethod · 0.45

Tested by

no test coverage detected