Skip to content

Commit

Permalink
Modify open log configure file
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Sep 23, 2024
1 parent 4f2684e commit 4961216
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Src/Log/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ void OpenLogConfigureFile()
if(bRet)
return;

qCritical(log) << "Open configure file fail:" << f;
qDebug(log) << "Open configure file:" << f;
CDlgEdit e(QObject::tr("Log configure file"), f,
QObject::tr("Log configure file:") + f, false);
if(e.exec() != QDialog::Accepted)
Expand All @@ -496,11 +496,14 @@ void OpenLogConfigureFile()
file.close();
return;
}
qDebug(log) << file.errorString() << f;
qWarning(log) << "Save configure file fail:" << file.errorString() << f;
QFileInfo fi(f);
QString szFile
= QFileDialog::getSaveFileName(nullptr, QObject::tr("Save as..."),
QStandardPaths::writableLocation(
QStandardPaths::ConfigLocation));
QStandardPaths::ConfigLocation)
+ QDir::separator() + fi.fileName()
);
if(!szFile.isEmpty()) {
QFile f(szFile);
if(f.open(QFile::WriteOnly)) {
Expand Down

0 comments on commit 4961216

Please sign in to comment.