From 86bea53a2a84944b89cf0922a6b05f30fd672f28 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Fri, 8 Mar 2024 09:41:14 +0800 Subject: [PATCH 1/5] update NEWS.md --- NEWS.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 257d791a..9f794165 100644 --- a/NEWS.md +++ b/NEWS.md @@ -41,8 +41,7 @@ Red Panda C++ Version 2.27 - fix: Using alias for global symbols are not correctly handled. - enhancement: Support "enum struct" Scoped enumerations. - fix: Function tips contains functions that not in the scope. - - fix: Hint for bold text () are not correctly handled in the function tips. - + - fix: Hint for bold text () are not correctly handled in the function tips. Red Panda C++ Version 2.26 From ebe64b65b4b7e3228f75dd951cc870c1a4fc1413 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Fri, 8 Mar 2024 10:38:21 +0800 Subject: [PATCH 2/5] update version --- version.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.inc b/version.inc index efee97ba..4abd60fb 100644 --- a/version.inc +++ b/version.inc @@ -1,2 +1,2 @@ APP_VERSION="2.27" -APP_VERSION_SUFFIX="alpha" +APP_VERSION_SUFFIX="beta" From 0e5d666c67038a8e6ff8394e2e5dedf2b36a3fd3 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Fri, 8 Mar 2024 18:20:49 +0800 Subject: [PATCH 3/5] - fix: Full scope typed variables in lambda expressions is not correctly parsed. --- NEWS.md | 4 ++-- RedPandaIDE/parser/cppparser.cpp | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index 9f794165..b5cff84d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -41,8 +41,8 @@ Red Panda C++ Version 2.27 - fix: Using alias for global symbols are not correctly handled. - enhancement: Support "enum struct" Scoped enumerations. - fix: Function tips contains functions that not in the scope. - - fix: Hint for bold text () are not correctly handled in the function tips. - + - fix: Hint for bold text () are not correctly handled in the function tips. + - fix: Full scope typed variables in lambda expressions is not correctly parsed. Red Panda C++ Version 2.26 - enhancement: Code suggestion for embedded std::vectors. diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index feea4c49..4beb3e2c 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -2953,15 +2953,25 @@ void CppParser::handleLambda(int index, int endIndex) scanMethodArgs(lambdaBlock,argStart); addSoloScopeLevel(lambdaBlock,mTokenizer[bodyStart]->line); int i=bodyStart+1; // start after '{'; - while (i+2text) + QString sType; + while (itext=="::") { + sType="::"; + i++; + } + while (i+1text) + && mTokenizer[i+1]->text=="::") { + sType+=mTokenizer[i]->text; + sType+="::"; + i+=2; + } + if (i+1text) && !mTokenizer[i]->text.endsWith('.') && !mTokenizer[i]->text.endsWith("->") && (mTokenizer[i+1]->text.startsWith('*') || mTokenizer[i+1]->text.startsWith('&') || tokenIsTypeOrNonKeyword(mTokenizer[i+1]->text))) { - QString sType; QString sName; while (i+1text==':' @@ -2973,7 +2983,7 @@ void CppParser::handleLambda(int index, int endIndex) ) break; else { - if (!sType.isEmpty()) + if (!sType.isEmpty() && !sType.endsWith("::")) sType+=' '; sType+=mTokenizer[i]->text; } @@ -3038,6 +3048,7 @@ void CppParser::handleLambda(int index, int endIndex) } } i=moveToEndOfStatement(i, true, bodyEnd); + sType=""; } removeScopeLevel(mTokenizer[bodyEnd]->line); } From 0328a36893dc639f19c006eae0b946a59a22f070 Mon Sep 17 00:00:00 2001 From: Cyano Hao Date: Sun, 10 Mar 2024 08:04:41 +0800 Subject: [PATCH 4/5] fix wayland icon by matching desktop file with window class (#257) --- .gitattributes | 2 +- Red_Panda_CPP.pro | 4 ++-- packages/appimage/01-in-docker.sh | 2 +- packages/fedora/redpanda-cpp-git.spec.in | 2 +- packages/opensuse/redpanda-cpp-git.spec.in | 2 +- .../linux/{redpandaide.desktop.in => RedPandaIDE.desktop.in} | 0 platform/linux/install.sh | 2 +- xmake.lua | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) rename platform/linux/{redpandaide.desktop.in => RedPandaIDE.desktop.in} (100%) diff --git a/.gitattributes b/.gitattributes index a44d14b3..0fe1f6f5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,7 +21,7 @@ /packages/debian/control eol=lf /packages/debian/copyright eol=lf /platform/linux/install.sh eol=lf -/platform/linux/redpandaide.desktop.in eol=lf +/platform/linux/RedPandaIDE.desktop.in eol=lf /platform/linux/redpandaide.svg eol=lf /platform/linux/templates/*/*.txt eol=lf /platform/linux/templates/*/*.template eol=lf diff --git a/Red_Panda_CPP.pro b/Red_Panda_CPP.pro index 42994c54..96fb0ca0 100644 --- a/Red_Panda_CPP.pro +++ b/Red_Panda_CPP.pro @@ -43,7 +43,7 @@ unix:!macos: { LIBEXECDIR = $${PREFIX}/libexec } - QMAKE_SUBSTITUTES += platform/linux/redpandaide.desktop.in + QMAKE_SUBSTITUTES += platform/linux/RedPandaIDE.desktop.in resources.path = $${PREFIX}/share/$${APP_NAME} resources.files += platform/linux/templates @@ -60,7 +60,7 @@ unix:!macos: { INSTALLS += xdgicons desktop.path = $${PREFIX}/share/applications - desktop.files += platform/linux/redpandaide.desktop + desktop.files += platform/linux/RedPandaIDE.desktop INSTALLS += desktop mime.path = $${PREFIX}/share/mime/packages diff --git a/packages/appimage/01-in-docker.sh b/packages/appimage/01-in-docker.sh index 902d97d1..be230e52 100755 --- a/packages/appimage/01-in-docker.sh +++ b/packages/appimage/01-in-docker.sh @@ -29,7 +29,7 @@ rm /RedPandaIDE.AppDir/usr/libexec/RedPandaCPP/redpanda-git-askpass # setup AppImage resource cd /RedPandaIDE.AppDir -ln -s usr/share/applications/redpandaide.desktop redpandaide.desktop +ln -s usr/share/applications/RedPandaIDE.desktop RedPandaIDE.desktop ln -s usr/share/icons/hicolor/scalable/apps/redpandaide.svg redpandaide.svg # following files may come from Windows filesystem, use `install` to preseve file permission install -m755 "$SRC_DIR/packages/appimage/AppRun.sh" AppRun diff --git a/packages/fedora/redpanda-cpp-git.spec.in b/packages/fedora/redpanda-cpp-git.spec.in index c79d2597..b6421fb0 100644 --- a/packages/fedora/redpanda-cpp-git.spec.in +++ b/packages/fedora/redpanda-cpp-git.spec.in @@ -39,7 +39,7 @@ make INSTALL_ROOT="%{buildroot}" install /usr/libexec/RedPandaCPP/* /usr/share/RedPandaCPP/* /usr/share/doc/RedPandaCPP/* -/usr/share/applications/redpandaide.desktop +/usr/share/applications/RedPandaIDE.desktop /usr/share/icons/hicolor/scalable/apps/redpandaide.svg /usr/share/mime/packages/redpandaide.xml diff --git a/packages/opensuse/redpanda-cpp-git.spec.in b/packages/opensuse/redpanda-cpp-git.spec.in index 15d2ebf3..2c7f144f 100644 --- a/packages/opensuse/redpanda-cpp-git.spec.in +++ b/packages/opensuse/redpanda-cpp-git.spec.in @@ -39,7 +39,7 @@ make INSTALL_ROOT="%{buildroot}" install /usr/libexec/RedPandaCPP/* /usr/share/RedPandaCPP/* /usr/share/doc/RedPandaCPP/* -/usr/share/applications/redpandaide.desktop +/usr/share/applications/RedPandaIDE.desktop /usr/share/icons/hicolor/scalable/apps/redpandaide.svg /usr/share/mime/packages/redpandaide.xml diff --git a/platform/linux/redpandaide.desktop.in b/platform/linux/RedPandaIDE.desktop.in similarity index 100% rename from platform/linux/redpandaide.desktop.in rename to platform/linux/RedPandaIDE.desktop.in diff --git a/platform/linux/install.sh b/platform/linux/install.sh index 7324152d..d27ae4ec 100755 --- a/platform/linux/install.sh +++ b/platform/linux/install.sh @@ -1,6 +1,6 @@ #!/bin/sh echo Copying desktop files... -sudo cp -f /opt/RedPandaIDE/redpandaide.desktop /usr/share/applications +sudo cp -f /opt/RedPandaIDE/RedPandaIDE.desktop /usr/share/applications echo Done! diff --git a/xmake.lua b/xmake.lua index 7a7dab48..0192098d 100644 --- a/xmake.lua +++ b/xmake.lua @@ -230,13 +230,13 @@ target("resources") -- desktop entry if is_xdg() then - add_configfiles("platform/linux/redpandaide.desktop.in", { + add_configfiles("platform/linux/RedPandaIDE.desktop.in", { pattern = "$${(.-)}", variables = { PREFIX = get_config("prefix"), }, }) - add_installfiles("$(buildir)/redpandaide.desktop", {prefixdir = "$(prefix)/share/applications"}) + add_installfiles("$(buildir)/RedPandaIDE.desktop", {prefixdir = "$(prefix)/share/applications"}) end -- mime type From f996426916508186efaa3d8582541121be48f141 Mon Sep 17 00:00:00 2001 From: Cyano Hao Date: Sun, 10 Mar 2024 08:05:09 +0800 Subject: [PATCH 5/5] fix static and shared makefile (#258) --- RedPandaIDE/compiler/projectcompiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RedPandaIDE/compiler/projectcompiler.cpp b/RedPandaIDE/compiler/projectcompiler.cpp index fcc7769c..88c17bca 100644 --- a/RedPandaIDE/compiler/projectcompiler.cpp +++ b/RedPandaIDE/compiler/projectcompiler.cpp @@ -75,7 +75,7 @@ void ProjectCompiler::createStaticMakeFile() QString executable = extractRelativePath(mProject->makeFileName(), mProject->executable()); QString exeTarget = escapeFilenameForMakefileTarget(executable); QString exeCommand = escapeArgumentForMakefileRecipe(executable, false); - writeln(file, exeTarget + ": $(LINKOBJ)"); + writeln(file, exeTarget + ": $(OBJ)"); writeln(file, "\tar r " + exeCommand + " $(LINKOBJ)"); writeln(file, "\tranlib " + exeCommand); writeMakeObjFilesRules(file); @@ -88,7 +88,7 @@ void ProjectCompiler::createDynamicMakeFile() QString executable = extractRelativePath(mProject->makeFileName(), mProject->executable()); QString exeTarget = escapeFilenameForMakefileTarget(executable); QString exeCommand = escapeArgumentForMakefileRecipe(executable, false); - writeln(file, exeTarget + ": $(LINKOBJ)"); + writeln(file, exeTarget + ": $(OBJ)"); if (mProject->options().isCpp) { writeln(file, "\t$(CXX) -mdll $(LINKOBJ) -o " + exeCommand + " $(LIBS) -Wl,--output-def,$(DEF),--out-implib,$(STATIC)"); } else {