bugs resolution

This commit is contained in:
Daniel Tartavel 2023-10-10 23:14:31 +02:00
parent 1fa3ec00bc
commit cf0216e02a
4 changed files with 33 additions and 10 deletions

View File

@ -61,13 +61,12 @@ void MainWindow::download()
param << "-aXP";
param << this->downloading.server + "::" + this->downloading.service + "/" + this->downloading.path << this->downloading.savePath + "/";
this->downloading.process->start(cmd, param);
connect(this->downloading.process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(downloadFinished(int, QProcess::ExitStatus)));
//connect(this->downloading.process, SIGNAL(errorOccurred(QProcess::ProcessError error)), this, SLOT(downloadProcessError(QProcess::ProcessError error)));
//connect(this->downloading.process, SIGNAL(readyReadStandardError()), this, SLOT(downloadProcessStderr()));
connect(this->downloading.process, SIGNAL(readyReadStandardOutput()), this, SLOT(readRsyncOutput()));
this->downloading.process->start(cmd, param);
}
void MainWindow::readRsyncOutput()

View File

@ -311,7 +311,13 @@ void MainWindow::populateList(int item)
int port;
int i;
server = ui->khistorycombobox->itemText(item);
if (item == -1)
{
server = ui->khistorycombobox->currentText();
}else
{
server = ui->khistorycombobox->itemText(item);
}
port = ui->portEdit->text().toUInt();
if ((server != this->connexion.server) or (port != this->connexion.port))
{
@ -493,7 +499,6 @@ bool MainWindow::scanDir(QString server, int portN, QTreeWidgetItem *parent, QSt
bool readOk = false;
bool passwdOk = false;
int nChild = 0;
bool r;
static uint looping;
QStringList dirs;
@ -541,7 +546,7 @@ bool MainWindow::scanDir(QString server, int portN, QTreeWidgetItem *parent, QSt
if (line.contains("auth failed"))
{
myProcess->readAllStandardOutput();
r = getUserPassword(&this->connexion);
getUserPassword(&this->connexion);
if (looping <= 1)
{
this->rescan = true;
@ -882,6 +887,12 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
QMessageBox::StandardButton reply;
int sizeFromRsync;
if (treeviewClicked == true)
{
return;
}
treeviewClicked = true;
itemR = item;
this->rescan = true;
@ -906,7 +917,7 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
// saving path do not exists, asking for it
if(!on_DefaultSaveFolder_triggered())
{
cout << "no directory selectioned, ignoring download request";
cout << "no directory selectioned, ignoring download request" << endl;
return;
}
}else
@ -985,11 +996,14 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
}else
{
//Item is a Directory
while (this->rescan)
if (item->isExpanded() == false)
{
scanDir(this->connexion.server, this->connexion.port, item, this->connexion.service + "/" + path +"/");
item->setExpanded(true);
while (this->rescan)
{
scanDir(this->connexion.server, this->connexion.port, item, this->connexion.service + "/" + path +"/");
item->setExpanded(true);
}
}
}
@ -997,6 +1011,7 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
{
saveDownloadList();
}
treeviewClicked = false;
}
// Launch the thread which download the file
@ -1414,3 +1429,9 @@ void MainWindow::on_actionHiddenService_triggered()
}
}
void MainWindow::on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column)
{
cout << "double-clicked" << endl;
}

View File

@ -119,6 +119,7 @@ class MainWindow : public QMainWindow
QString icon = "/usr/share/icons/RsyncUI.png";
bool rescan = false;
bool stopDlAsked;
bool treeviewClicked;
QList<QString> UnitText
{
@ -217,6 +218,8 @@ class MainWindow : public QMainWindow
void on_actionHiddenService_triggered();
void on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);
signals:
void stopDownloading(QProcess *);
void progressSignal(int);

View File

@ -3,6 +3,6 @@
#include <QString>
QString version = "2.11.5";
QString version = "2.11.8";
#endif // VERSION_H