From 7e736b524eba94016a07e0d74f7fa96fb3f1e233 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Wed, 1 Mar 2023 15:50:37 +0100 Subject: [PATCH] bug correction in making treeview --- mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 7a5e293..f281359 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -627,7 +627,7 @@ QTreeWidgetItem * MainWindow::addTreeChild(QTreeWidgetItem *parent, QString name }else { // item is a file - treeItem->setText(1,("File")); + treeItem->setText(1,tr("File")); } treeItem->setText(0, name); treeItem->setText(2, fileSize); @@ -737,6 +737,7 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD path.prepend(itemR->text(0) + "/"); }; QFileInfo info(this->downloading.savePath + "/" + path); + cout << item->text(1).toStdString() <text(1) == tr("File") or downloadDir == true) { // Item is a file