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