From 89cc44bcf6a06d23634da00cad47cf7f238d2a3c Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Tue, 30 May 2023 11:33:41 +0800 Subject: [PATCH] - 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. --- NEWS.md | 4 +++- RedPandaIDE/compiler/compilerinfo.cpp | 2 ++ RedPandaIDE/utils.cpp | 12 ++++++++++++ RedPandaIDE/utils.h | 2 ++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 59b553d7..793dad20 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,8 @@ Red Panda C++ Version 2.22 - enhancement: support function arguments like "int (&t)[]" - change: Don't show error dialog when bookmark/debug configuration json files are empty. - 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 @@ -1062,7 +1064,7 @@ Red Panda C++ Version 0.13.2 - fix: in linux, projects no need of winres to be built 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 - fix: .rc file shouldn't be syntax checked - enhancement: auto save/restore size of the new project dialog diff --git a/RedPandaIDE/compiler/compilerinfo.cpp b/RedPandaIDE/compiler/compilerinfo.cpp index 98350d15..ed3d00ae 100644 --- a/RedPandaIDE/compiler/compilerinfo.cpp +++ b/RedPandaIDE/compiler/compilerinfo.cpp @@ -75,11 +75,13 @@ void CompilerInfo::prepareCompilerOptions() sl.append(QPair("ISO C++14","c++14")); sl.append(QPair("ISO C++17","c++17")); sl.append(QPair("ISO C++20","c++2a")); + sl.append(QPair("ISO C++23","c++2b")); sl.append(QPair("GNU C++","gnu++98")); sl.append(QPair("GNU C++11","gnu++11")); sl.append(QPair("GNU C++14","gnu++14")); sl.append(QPair("GNU C++17","gnu++17")); sl.append(QPair("GNU C++20","gnu++2a")); + sl.append(QPair("GNU C++23","gnu++2b")); addOption(CC_CMD_OPT_STD, QObject::tr("C++ Language standard (-std)"), groupName, false, true, false, "-std=", sl); sl.clear(); diff --git a/RedPandaIDE/utils.cpp b/RedPandaIDE/utils.cpp index 8480fa24..b2c72d55 100644 --- a/RedPandaIDE/utils.cpp +++ b/RedPandaIDE/utils.cpp @@ -145,12 +145,24 @@ FileType getFileType(const QString &filename) if (filename.endsWith(".txt",PATH_SENSITIVITY)) { 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)) { return FileType::Text; } if (filename.endsWith(".lua",PATH_SENSITIVITY)) { return FileType::LUA; } + if (filename.endsWith(".fs",PATH_SENSITIVITY)) { + return FileType::FragmentShader; + } + if (filename.endsWith(".vs",PATH_SENSITIVITY)) { + return FileType::VerticeShader; + } QFileInfo info(filename); if (info.suffix().isEmpty()) { return FileType::Other; diff --git a/RedPandaIDE/utils.h b/RedPandaIDE/utils.h index 926fcb01..5218fa79 100644 --- a/RedPandaIDE/utils.h +++ b/RedPandaIDE/utils.h @@ -45,6 +45,8 @@ enum class FileType{ WindowsResourceSource, // resource source (.res) Project, //Red Panda C++ Project (.dev) Text, // text file + FragmentShader, + VerticeShader, Other // any others };