10 volunteer study prepare fix.
This commit is contained in:
@@ -167,13 +167,14 @@ void AboutWidget::initUi()
|
||||
|
||||
void AboutWidget::openHelpFile()
|
||||
{
|
||||
QString userManulFile = QCoreApplication::applicationDirPath() + "/userManual.pdf";
|
||||
|
||||
QFileInfo file(userManulFile);
|
||||
if (file.exists())
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(userManulFile));
|
||||
}
|
||||
qApp->exit();
|
||||
// QString userManulFile = QCoreApplication::applicationDirPath() + "/userManual.pdf";
|
||||
//
|
||||
// QFileInfo file(userManulFile);
|
||||
// if (file.exists())
|
||||
// {
|
||||
// QDesktopServices::openUrl(QUrl::fromLocalFile(userManulFile));
|
||||
// }
|
||||
//else
|
||||
//{
|
||||
// EQ9MessageBox box;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <QTranslator>
|
||||
#include <QDebug>
|
||||
#include <QApplication>
|
||||
#include <iostream>
|
||||
#include "json/cJSON.h"
|
||||
const char* strProductFileName = "./cfgs/usct-product.json";
|
||||
const char* strProductFileNameDefault = "./cfgs/usct-product";
|
||||
@@ -338,11 +339,19 @@ bool JsonObject::savecfg()
|
||||
}
|
||||
|
||||
char* strJsonData = cJSON_Print((cJSON*)json_root);
|
||||
if (strlen(strJsonData)>1){
|
||||
std::stringstream ss;
|
||||
ss << strJsonData;
|
||||
outFile << ss.rdbuf();
|
||||
outFile.flush();
|
||||
outFile.close();
|
||||
m_bLoaded = false;
|
||||
}
|
||||
else{
|
||||
std::cout<<"===========================================app want write empty content to cfg json============================================="<<std::endl;
|
||||
|
||||
}
|
||||
delete strJsonData;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user