From d02ef1d18aa637a1e18b571109c5038c748502bb Mon Sep 17 00:00:00 2001 From: liuminghang Date: Wed, 23 Jun 2021 17:56:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbug84953?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: 这里多加了一个.txt的后缀,去掉即可 Log: 与保存有关 Bug: https://pms.uniontech.com/zentao/bug-view-84953.html Change-Id: I14fa686075e55dfd08621d3d3a705b3be1f33a41 --- src/mainwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp index 74a465b..4feee30 100644 --- a/src/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -413,7 +413,8 @@ void MainWidget::slotExport() QString file_path = QFileDialog::getSaveFileName(this, "save as", download + "/" + fileName, "*.txt"); qDebug() << file_path; - QString path = file_path + ".txt"; + //这里不应该增加一个.txt,会导致有两个后缀 + QString path = file_path; QFile file(path); if (file.open(QFile::WriteOnly | QFile::Text)) { QTextStream out(&file);