Merge branch 'master' into dap

# Conflicts:
#	NEWS.md
This commit is contained in:
Roy Qu 2024-03-11 17:29:15 +08:00
commit f5db3144f5
12 changed files with 28 additions and 16 deletions

2
.gitattributes vendored
View File

@ -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

View File

@ -43,6 +43,7 @@ Red Panda C++ Version 2.27
- fix: Function tips contains functions that not in the scope.
- fix: Hint for bold text (<b></b>) are not correctly handled in the function tips.
- enhancement: Improve lldb-mi compatibility.
- 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.

View File

@ -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 {

View File

@ -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+2<bodyEnd) {
if (tokenIsTypeOrNonKeyword(mTokenizer[i]->text)
QString sType;
while (i<bodyEnd) {
if (mTokenizer[i]->text=="::") {
sType="::";
i++;
}
while (i+1<bodyEnd && tokenIsTypeOrNonKeyword(mTokenizer[i]->text)
&& mTokenizer[i+1]->text=="::") {
sType+=mTokenizer[i]->text;
sType+="::";
i+=2;
}
if (i+1<bodyEnd && tokenIsTypeOrNonKeyword(mTokenizer[i]->text)
&& !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+1<bodyEnd) {
if (mTokenizer[i+1]->text==':'
@ -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);
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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!

View File

@ -1,2 +1,2 @@
APP_VERSION="2.27"
APP_VERSION_SUFFIX="alpha"
APP_VERSION_SUFFIX="beta"

View File

@ -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