compile:修正linux编译通过。

This commit is contained in:
taynpg 2024-05-29 10:06:28 +08:00
parent 488f0b45b7
commit 2f119e8273
4 changed files with 13 additions and 9 deletions

View File

@ -20,7 +20,7 @@
},
"cmake.environment": {
"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.generator": "Ninja",

View File

@ -5,6 +5,7 @@ project(OneLevelXmlOpr VERSION 0.1 LANGUAGES CXX)
set(CMAKE_PREFIX_PATH
"C:/Qt/Qt6.6.3/6.6.3/msvc2019_64"
"/opt/homebrew/Cellar/qt@5/5.15.13_1"
"/home/typ/Qt5.14.2/5.14.2/gcc_64"
)
set(CMAKE_AUTOUIC ON)
@ -24,7 +25,7 @@ set(PROJECT_SOURCES
MainWidget.h
MainWidget.ui 3rd/tinyxml2.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
src/attribute_edit.cpp flatgray.qrc
src/data_edit.h src/data_edit.cpp src/data_edit.ui

View File

@ -10,9 +10,9 @@ int main(int argc, char *argv[])
QFont font("Microsoft YaHei", 9);
a.setFont(font);
//a.setStyle("fusion");
a.setStyle("windows");
#endif
a.setStyle("windows");
MainWidget w;
w.set_work_exe(argv[0]);
w.show();

View File

@ -77,6 +77,14 @@ std::string CUtil::utf8_to_gbk(const std::string& utf8_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> tokens;
@ -94,9 +102,4 @@ std::vector<std::string> CUtil::splitString(const std::string& input, const std:
return tokens;
}
#else
std::string CUtil::utf8_to_gbk(const std::string& utf8_str)
{
return utf8_str;
}
#endif