Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
4c52276882 | |||
38c25450ed | |||
6c19dccf2e | |||
ad3b44b3f4 |
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!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>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: rsyncui
|
Name: rsyncui
|
||||||
Summary: Client for rsync server
|
Summary: Client for rsync server
|
||||||
Version: 2.10.1
|
Version: 2.11.1
|
||||||
Release: %mkrel 1
|
Release: %mkrel 1
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
Group: Networking/Remote access
|
Group: Networking/Remote access
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
|
#include <QTextBlock>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -691,6 +692,8 @@ void MainWindow::on_connectButton_clicked()
|
|||||||
// add parent in treeview
|
// add parent in treeview
|
||||||
void MainWindow::addTreeItem(QString name, QString fileSize, QString fullsize, QString type, QString date, bool isDir=false, QTreeWidgetItem *parent=nullptr)
|
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;
|
QTreeWidgetItem *treeItem;
|
||||||
if (parent != nullptr)
|
if (parent != nullptr)
|
||||||
{
|
{
|
||||||
@ -707,6 +710,22 @@ void MainWindow::addTreeItem(QString name, QString fileSize, QString fullsize, Q
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
// item is a file
|
// item is a file
|
||||||
|
if (QFile::exists(this->downloading.savePath + "/" + name))
|
||||||
|
{
|
||||||
|
QBrush b (Qt::green);
|
||||||
|
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(1,type);
|
||||||
}
|
}
|
||||||
treeItem->setText(0, name);
|
treeItem->setText(0, name);
|
||||||
@ -1017,6 +1036,10 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
|||||||
|
|
||||||
if (retry == false)
|
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);
|
delete ui->listDownload->takeItem(0);
|
||||||
}
|
}
|
||||||
this->downloading.clear();
|
this->downloading.clear();
|
||||||
|
@ -88,7 +88,7 @@ class Downloading
|
|||||||
class About
|
class About
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QString version = "2.10.1";
|
QString version = "2.11.1";
|
||||||
QString author = "Daniel TARTAVEL-JEANNOT";
|
QString author = "Daniel TARTAVEL-JEANNOT";
|
||||||
QString licence = "GPL_V3";
|
QString licence = "GPL_V3";
|
||||||
QString description;
|
QString description;
|
||||||
|
Reference in New Issue
Block a user