- enhancement: support -std=c++2d gcc parameter

- fix: vertice shader(.vs) and fragment shader(.fs) files can't be openned by double click in the project browser.
This commit is contained in:
Roy Qu 2023-05-30 11:33:41 +08:00
parent 43e0057cf4
commit 89cc44bcf6
4 changed files with 19 additions and 1 deletions

View File

@ -10,6 +10,8 @@ Red Panda C++ Version 2.22
- enhancement: support function arguments like "int (&t)[]" - enhancement: support function arguments like "int (&t)[]"
- change: Don't show error dialog when bookmark/debug configuration json files are empty. - change: Don't show error dialog when bookmark/debug configuration json files are empty.
- upgrade raylib to 4.5, raygui to 3.6 - upgrade raylib to 4.5, raygui to 3.6
- enhancement: support -std=c++2d gcc parameter
- fix: vertice shader(.vs) and fragment shader(.fs) files can't be openned by double click in the project browser.
Red Panda C++ Version 2.21 Red Panda C++ Version 2.21
@ -1062,7 +1064,7 @@ Red Panda C++ Version 0.13.2
- fix: in linux, projects no need of winres to be built - fix: in linux, projects no need of winres to be built
Red Panda C++ Version 0.13.1 Red Panda C++ Version 0.13.1
- enhancement: suppoort localization info in project templates - enhancement: support localization info in project templates
- change: template / project files use utf-8 encoding instead of ANSI - change: template / project files use utf-8 encoding instead of ANSI
- fix: .rc file shouldn't be syntax checked - fix: .rc file shouldn't be syntax checked
- enhancement: auto save/restore size of the new project dialog - enhancement: auto save/restore size of the new project dialog

View File

@ -75,11 +75,13 @@ void CompilerInfo::prepareCompilerOptions()
sl.append(QPair<QString,QString>("ISO C++14","c++14")); sl.append(QPair<QString,QString>("ISO C++14","c++14"));
sl.append(QPair<QString,QString>("ISO C++17","c++17")); sl.append(QPair<QString,QString>("ISO C++17","c++17"));
sl.append(QPair<QString,QString>("ISO C++20","c++2a")); sl.append(QPair<QString,QString>("ISO C++20","c++2a"));
sl.append(QPair<QString,QString>("ISO C++23","c++2b"));
sl.append(QPair<QString,QString>("GNU C++","gnu++98")); sl.append(QPair<QString,QString>("GNU C++","gnu++98"));
sl.append(QPair<QString,QString>("GNU C++11","gnu++11")); sl.append(QPair<QString,QString>("GNU C++11","gnu++11"));
sl.append(QPair<QString,QString>("GNU C++14","gnu++14")); sl.append(QPair<QString,QString>("GNU C++14","gnu++14"));
sl.append(QPair<QString,QString>("GNU C++17","gnu++17")); sl.append(QPair<QString,QString>("GNU C++17","gnu++17"));
sl.append(QPair<QString,QString>("GNU C++20","gnu++2a")); sl.append(QPair<QString,QString>("GNU C++20","gnu++2a"));
sl.append(QPair<QString,QString>("GNU C++23","gnu++2b"));
addOption(CC_CMD_OPT_STD, QObject::tr("C++ Language standard (-std)"), groupName, false, true, false, "-std=", sl); addOption(CC_CMD_OPT_STD, QObject::tr("C++ Language standard (-std)"), groupName, false, true, false, "-std=", sl);
sl.clear(); sl.clear();

View File

@ -145,12 +145,24 @@ FileType getFileType(const QString &filename)
if (filename.endsWith(".txt",PATH_SENSITIVITY)) { if (filename.endsWith(".txt",PATH_SENSITIVITY)) {
return FileType::Text; return FileType::Text;
} }
if (filename.endsWith(".md",PATH_SENSITIVITY)) {
return FileType::Text;
}
if (filename.endsWith(".info",PATH_SENSITIVITY)) {
return FileType::Text;
}
if (filename.endsWith(".dat",PATH_SENSITIVITY)) { if (filename.endsWith(".dat",PATH_SENSITIVITY)) {
return FileType::Text; return FileType::Text;
} }
if (filename.endsWith(".lua",PATH_SENSITIVITY)) { if (filename.endsWith(".lua",PATH_SENSITIVITY)) {
return FileType::LUA; return FileType::LUA;
} }
if (filename.endsWith(".fs",PATH_SENSITIVITY)) {
return FileType::FragmentShader;
}
if (filename.endsWith(".vs",PATH_SENSITIVITY)) {
return FileType::VerticeShader;
}
QFileInfo info(filename); QFileInfo info(filename);
if (info.suffix().isEmpty()) { if (info.suffix().isEmpty()) {
return FileType::Other; return FileType::Other;

View File

@ -45,6 +45,8 @@ enum class FileType{
WindowsResourceSource, // resource source (.res) WindowsResourceSource, // resource source (.res)
Project, //Red Panda C++ Project (.dev) Project, //Red Panda C++ Project (.dev)
Text, // text file Text, // text file
FragmentShader,
VerticeShader,
Other // any others Other // any others
}; };