Compare commits

..

2 Commits
2.10.1 ... 2.11

4 changed files with 26 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.14.2, 2023-03-09T22:37:54. -->
<!-- Written by QtCreator 4.14.2, 2023-03-11T18:47:01. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@ -2,7 +2,7 @@
Name: rsyncui
Summary: Client for rsync server
Version: 2.10.1
Version: 2.11
Release: %mkrel 1
License: GPLv3
Group: Networking/Remote access

View File

@ -1,5 +1,6 @@
#include "mainwindow.h"
#include <QComboBox>
#include <QTextBlock>
using namespace std;
@ -691,6 +692,8 @@ void MainWindow::on_connectButton_clicked()
// add parent in treeview
void MainWindow::addTreeItem(QString name, QString fileSize, QString fullsize, QString type, QString date, bool isDir=false, QTreeWidgetItem *parent=nullptr)
{
QFont * font = new QFont();
QTreeWidgetItem *treeItem;
if (parent != nullptr)
{
@ -707,6 +710,22 @@ void MainWindow::addTreeItem(QString name, QString fileSize, QString fullsize, Q
}else
{
// item is a file
if (QFile::exists(this->downloading.savePath + "/" + name))
{
QBrush b (Qt::red);
treeItem->setForeground(0, b);
treeItem->setFont(0, *font);
}else
{
this->settings.beginGroup("Downloaded/");
if (this->settings.contains(name))
{
QBrush b (Qt::red);
treeItem->setForeground(0, b);
treeItem->setFont(0, *font);
}
this->settings.endGroup();
}
treeItem->setText(1,type);
}
treeItem->setText(0, name);
@ -1017,6 +1036,10 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
if (retry == false)
{
QString filename = ui->listDownload->item(0)->text();
pos = filename.contains(" => ");
filename.resize(pos);
this->settings.setValue("Downloaded/" + ui->listDownload->item(0)->text(), true);
delete ui->listDownload->takeItem(0);
}
this->downloading.clear();

View File

@ -88,7 +88,7 @@ class Downloading
class About
{
public:
QString version = "2.10.1";
QString version = "2.11";
QString author = "Daniel TARTAVEL-JEANNOT";
QString licence = "GPL_V3";
QString description;