Basically that is the output of the rsync command from a remote host, it runs in dry-run mode to checks for changed files which needs to be synchronized.
# rsync -anuv /tmp/2/ /tmp/1
sending incremental file list
./
file
file2
dir1/
dir1/file1
dir1/file2
dir1/file3
dir2/
dir2/file1
dir2/file2
dir2/file3
sent 257 bytes received 47 bytes 608.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
The stdout is properly formatted and stored in a QStringList which is then used to set the QStringListModel:
// get list of files on the remote host which needs to be synchronized
QStringList destList
= remote
->newOnDest
(remoteHost, srcDir, destDir, type
);
if (!srcList.isEmpty()) { // initialize model only if there is something new
destModel->setStringList(destList);
ui->listView_dest->setModel(destModel);
// get list of files on the remote host which needs to be synchronized
QStringList destList = remote->newOnDest(remoteHost, srcDir, destDir, type);
if (!srcList.isEmpty()) { // initialize model only if there is something new
QStringListModel *destModel = new QStringListModel;
destModel->setStringList(destList);
ui->listView_dest->setModel(destModel);
To copy to clipboard, switch view to plain text mode
As said I would like to use QFileSystemModel so that 1)the view is much more nice and 2) user can browse through folders. Let me know if I could provide further info.
Thanks,
Jan
Bookmarks