compile:修正linux编译通过。
This commit is contained in:
parent
488f0b45b7
commit
2f119e8273
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -20,7 +20,7 @@
|
|||||||
},
|
},
|
||||||
"cmake.environment": {
|
"cmake.environment": {
|
||||||
"PATH": "${env:PATH};C:/Qt/Qt6.6.3/6.6.3/msvc2019_64/bin",
|
"PATH": "${env:PATH};C:/Qt/Qt6.6.3/6.6.3/msvc2019_64/bin",
|
||||||
"LD_LIBRARY_PATH": "$LD_LIBRARY_PATH:/home/xxx"
|
"LD_LIBRARY_PATH": "$LD_LIBRARY_PATH:/home/typ/Qt5.14.2/5.14.2/gcc_64/bin"
|
||||||
},
|
},
|
||||||
"cmake.options.statusBarVisibility": "visible",
|
"cmake.options.statusBarVisibility": "visible",
|
||||||
"cmake.generator": "Ninja",
|
"cmake.generator": "Ninja",
|
||||||
|
@ -5,6 +5,7 @@ project(OneLevelXmlOpr VERSION 0.1 LANGUAGES CXX)
|
|||||||
set(CMAKE_PREFIX_PATH
|
set(CMAKE_PREFIX_PATH
|
||||||
"C:/Qt/Qt6.6.3/6.6.3/msvc2019_64"
|
"C:/Qt/Qt6.6.3/6.6.3/msvc2019_64"
|
||||||
"/opt/homebrew/Cellar/qt@5/5.15.13_1"
|
"/opt/homebrew/Cellar/qt@5/5.15.13_1"
|
||||||
|
"/home/typ/Qt5.14.2/5.14.2/gcc_64"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
set(CMAKE_AUTOUIC ON)
|
||||||
@ -24,7 +25,7 @@ set(PROJECT_SOURCES
|
|||||||
MainWidget.h
|
MainWidget.h
|
||||||
MainWidget.ui 3rd/tinyxml2.cpp
|
MainWidget.ui 3rd/tinyxml2.cpp
|
||||||
src/xml_opr.h src/xml_opr.cpp
|
src/xml_opr.h src/xml_opr.cpp
|
||||||
src/config.h src/config.cpp public_def.cpp resource.qrc
|
src/config.h src/config.cpp public_def.cpp resource.qrc public_def.h
|
||||||
resource/ico.rc src/attribute_edit.ui src/attribute_edit.h
|
resource/ico.rc src/attribute_edit.ui src/attribute_edit.h
|
||||||
src/attribute_edit.cpp flatgray.qrc
|
src/attribute_edit.cpp flatgray.qrc
|
||||||
src/data_edit.h src/data_edit.cpp src/data_edit.ui
|
src/data_edit.h src/data_edit.cpp src/data_edit.ui
|
||||||
|
2
main.cpp
2
main.cpp
@ -10,9 +10,9 @@ int main(int argc, char *argv[])
|
|||||||
QFont font("Microsoft YaHei", 9);
|
QFont font("Microsoft YaHei", 9);
|
||||||
a.setFont(font);
|
a.setFont(font);
|
||||||
//a.setStyle("fusion");
|
//a.setStyle("fusion");
|
||||||
a.setStyle("windows");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
a.setStyle("windows");
|
||||||
MainWidget w;
|
MainWidget w;
|
||||||
w.set_work_exe(argv[0]);
|
w.set_work_exe(argv[0]);
|
||||||
w.show();
|
w.show();
|
||||||
|
@ -77,6 +77,14 @@ std::string CUtil::utf8_to_gbk(const std::string& utf8_str)
|
|||||||
|
|
||||||
return gbk_str;
|
return gbk_str;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
std::string CUtil::utf8_to_gbk(const std::string& utf8_str)
|
||||||
|
{
|
||||||
|
return utf8_str;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
std::vector<std::string> CUtil::splitString(const std::string& input, const std::string& delimiter)
|
std::vector<std::string> CUtil::splitString(const std::string& input, const std::string& delimiter)
|
||||||
{
|
{
|
||||||
std::vector<std::string> tokens;
|
std::vector<std::string> tokens;
|
||||||
@ -94,9 +102,4 @@ std::vector<std::string> CUtil::splitString(const std::string& input, const std:
|
|||||||
|
|
||||||
return tokens;
|
return tokens;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
std::string CUtil::utf8_to_gbk(const std::string& utf8_str)
|
|
||||||
{
|
|
||||||
return utf8_str;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user