bugs resolution

This commit is contained in:
2023-10-10 23:14:31 +02:00
parent 1fa3ec00bc
commit cf0216e02a
4 changed files with 33 additions and 10 deletions
+28 -7
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;
}