Skip to content

Commit

Permalink
V 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Porter committed Jul 16, 2024
1 parent 71ea6f6 commit f40fc56
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
20 changes: 16 additions & 4 deletions SyncThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,7 @@ void SyncThread::readCloudDirectory(const QString &cloudpath)
shouldListen = true;
}

void SyncThread::fileSystemChanged(struct event e)
{
qDebug() << e.path_name;
}


void SyncThread::addSynctask(const QFileInfo &info)
{
Expand All @@ -209,6 +206,16 @@ void SyncThread::addSynctask(const QFileInfo &info)
}
}

void SyncThread::deleteSynctask(const QString &path)
{

}

void SyncThread::updateSynctask(const QString &path)
{

}

bool SyncThread::isTheSameFile(const QString &localPath, const QString &cloudPath = "")
{
QString _cloudPath = cloudPath;
Expand Down Expand Up @@ -241,6 +248,11 @@ bool SyncThread::isTheSameFile(const QString &localPath, const QString &cloudPat
return result;
}

bool SyncThread::isRemoteFileExist(const QString &cloudPath)
{

}

void SyncThread::onTaskCanceled(int fileTaskId)
{
}
1 change: 0 additions & 1 deletion SyncThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public slots:
void readDirectory(const QString &path);
void recursiveRead(const QString &path);
void readCloudDirectory(const QString &cloudpath);
void fileSystemChanged(struct event e);
void addSynctask(const QFileInfo &info);//添加同步任务,把本地未上传文件添加入任务
void deleteSynctask(const QString &path);//删除同步任务,把本地已上传文件删除任务
void updateSynctask(const QString &path);//更新同步任务,把本地已上传文件更新任务
Expand Down
3 changes: 3 additions & 0 deletions ext/1.0.3-CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### QSyncUi 1.0.3
- 修复了若干问题
- 新增多设备同步功能
6 changes: 4 additions & 2 deletions synccore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,12 @@ void SyncCore::doTask(SyncTask *task)
if (!shouldSkip)
requestManager->addDeleteObjectRequest(cloudPath,versionId,fileTaskId);
},Qt::BlockingQueuedConnection);

QString taskRemotePath=task->getRemotePath();
connect(this,&SyncCore::cloudDirectoryChanged,thread,[=](const QString &cloudPath){
if(cloudPath.compare(task->getRemotePath())==0)
if(cloudPath.compare(taskRemotePath)==0){
qDebug()<<"cloud directory changed";
thread->readCloudDirectory(cloudPath);
}
},Qt::BlockingQueuedConnection);
thread->start();
}
Expand Down

0 comments on commit f40fc56

Please sign in to comment.