resolved blocking bug when double-click on an item in file treeview

This commit is contained in:
Daniel Tartavel 2024-10-18 11:31:44 +02:00
parent fb126c8b66
commit afe4c6e9c9
2 changed files with 34 additions and 18 deletions

View File

@ -1144,7 +1144,7 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
if (item->isExpanded() == false) if (item->isExpanded() == false)
{ {
info(DEBUGMACRO, "Item is not expanded"); info(DEBUGMACRO, "Item is not expanded");
while (this->rescan) if (this->rescan)
{ {
info(DEBUGMACRO, "Re-scanning path: " + this->connexion.service + "/" + path +"/"); info(DEBUGMACRO, "Re-scanning path: " + this->connexion.service + "/" + path +"/");
scanDir(&this->connexion, item, this->connexion.service + "/" + path +"/"); scanDir(&this->connexion, item, this->connexion.service + "/" + path +"/");
@ -1606,3 +1606,15 @@ void MainWindow::on_actionHiddenService_triggered()
preparePopulateTree(); preparePopulateTree();
} }
} }
void MainWindow::on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column)
{
void();
}
void MainWindow::on_treeWidget_doubleClicked(const QModelIndex &index)
{
void();
}

View File

@ -51,7 +51,7 @@ extern QMap<int, QString> rsyncErrorStrings;
class Connexion class Connexion
{ {
public: public:
int bandwidthLimit = 0; int bandwidthLimit = 0;
int bandwidthLimitUnit; int bandwidthLimitUnit;
int contimeout = 20; int contimeout = 20;
@ -70,7 +70,7 @@ class Connexion
class Downloading class Downloading
{ {
public: public:
QString server; QString server;
QString service; QString service;
QString path; QString path;
@ -86,7 +86,7 @@ class Downloading
class About class About
{ {
public: public:
QString version; QString version;
QString author = "Daniel TARTAVEL-JEANNOT"; QString author = "Daniel TARTAVEL-JEANNOT";
QString licence = "GPL_V3"; QString licence = "GPL_V3";
@ -99,7 +99,7 @@ class MainWindow : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
public: public:
Ui::MainWindow *ui; Ui::MainWindow *ui;
MainWindow(QWidget *parent = nullptr); MainWindow(QWidget *parent = nullptr);
~MainWindow(); ~MainWindow();
@ -124,20 +124,20 @@ class MainWindow : public QMainWindow
QList<QString> UnitText QList<QString> UnitText
{ {
tr("B"), tr("B"),
tr("KB"), tr("KB"),
tr("MB"), tr("MB"),
tr("GB"), tr("GB"),
tr("TB"), tr("TB"),
tr("PB") tr("PB")
}; };
QList<QChar> bwUnitChar QList<QChar> bwUnitChar
{ {
'K', 'K',
'M', 'M',
'T', 'T',
'G', 'G',
'P' 'P'
}; };
QVector<QString> downloadProcessErrorString = QVector<QString> downloadProcessErrorString =
@ -175,7 +175,7 @@ class MainWindow : public QMainWindow
void passwordStore (QString account, QString password); void passwordStore (QString account, QString password);
QString passwordGet (QString account); QString passwordGet (QString account);
private slots: private slots:
void on_listWidget_clicked(); void on_listWidget_clicked();
@ -219,7 +219,11 @@ class MainWindow : public QMainWindow
//void on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column); //void on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);
signals: void on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);
void on_treeWidget_doubleClicked(const QModelIndex &index);
signals:
void stopDownloading(QProcess *); void stopDownloading(QProcess *);
void progressSignal(int); void progressSignal(int);
void speed(QString); void speed(QString);