From bf17e494fd2047c5fe4224d53dc8b473f28bc0e2 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 15 Jan 2022 11:01:01 +0800 Subject: [PATCH 1/4] fix: variable names containing '_' are not correctly handled --- RedPandaIDE/parser/cpptokenizer.cpp | 2 +- templates/CL_GLUT.template | 2 +- templates/GLFW.template | 2 +- templates/Hello.template | 2 +- templates/OpenGL.template | 2 +- templates/raylib_3d.template | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RedPandaIDE/parser/cpptokenizer.cpp b/RedPandaIDE/parser/cpptokenizer.cpp index 61084112..f4d35aa1 100644 --- a/RedPandaIDE/parser/cpptokenizer.cpp +++ b/RedPandaIDE/parser/cpptokenizer.cpp @@ -585,7 +585,7 @@ void CppTokenizer::skipToNextToken() bool CppTokenizer::isIdentChar(const QChar &ch) { - return ch.isLetter(); + return ch=='_' || ch.isLetter() ; } void CppTokenizer::advance() diff --git a/templates/CL_GLUT.template b/templates/CL_GLUT.template index e244b924..e9c79c5f 100644 --- a/templates/CL_GLUT.template +++ b/templates/CL_GLUT.template @@ -4,7 +4,7 @@ Name=GLUT Icon=CL_GLUT.ico Description=A simple GLUT program Description[zh_CN]=一个简单的GLUT程序 -Category=Multimedia +Category=3D Category[zh_CN]=3D [Unit0] diff --git a/templates/GLFW.template b/templates/GLFW.template index 5560e0f1..e577055e 100644 --- a/templates/GLFW.template +++ b/templates/GLFW.template @@ -4,7 +4,7 @@ Name=GLFW Description=A simple GLFW program Description[zh_CN]=一个简单的GLFW程序 Icon=GLFW.ico -Category=Multimedia +Category=3D Category[zh_CN]=3D [Unit0] diff --git a/templates/Hello.template b/templates/Hello.template index 904a6fb8..522f468e 100644 --- a/templates/Hello.template +++ b/templates/Hello.template @@ -6,7 +6,7 @@ Icon=Communication.ico Description=A classic Hello World program Description[zh_CN]=一个经典的“世界,你好!”程序 Category=Console -Category=控制台 +Category[zh_CN]=控制台 [Unit0] CName=main.c diff --git a/templates/OpenGL.template b/templates/OpenGL.template index bdabbb3a..3e2f82ee 100644 --- a/templates/OpenGL.template +++ b/templates/OpenGL.template @@ -4,7 +4,7 @@ Name=OpenGL Icon=Pizza.ico Description=A basic OpenGL program Description[zh_CN]=一个基本的OpenGL程序 -Category=Multimedia +Category=3D Category[zh_CN]=3D [Unit0] diff --git a/templates/raylib_3d.template b/templates/raylib_3d.template index 54c24389..176257e7 100644 --- a/templates/raylib_3d.template +++ b/templates/raylib_3d.template @@ -5,7 +5,7 @@ Name[zh_CN]=raylib 3D Icon=raylib.ico Description=A simple 3D program using raylib ( https://raylib.com ) Description[zh_CN]=简单的raylib 3D程序 ( https://raylib.com ) -Category=Multimedia +Category=3D Category[zh_CN]=3D [Unit0] From 04770a6fd881775e66abfe17f949d9c05beb50d8 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 15 Jan 2022 11:22:20 +0800 Subject: [PATCH 2/4] - enhancement: better behavior of mouse tips --- NEWS.md | 1 + RedPandaIDE/editor.cpp | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index edaf3d0c..1bf37f97 100644 --- a/NEWS.md +++ b/NEWS.md @@ -22,6 +22,7 @@ Red Panda C++ Version 0.13.2 - fix: If project's compiler set is not the same with the default compiler set, auto openned project's file will use wrong compiler set to do syntax check. - fix: open a project file through "File"->"Open" will not correctly connect it with the project internally - fix: wrong project program directory parameter is sent to the debugger + - enhancement: better behavior of mouse tips Red Panda C++ Version 0.13.1 - enhancement: suppoort localization info in project templates diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 38ace815..474bcb4c 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -1080,6 +1080,9 @@ bool Editor::event(QEvent *event) } else if (cursor() == Qt::PointingHandCursor) { updateMouseCursor(); } + if (pMainWindow->functionTip()->isVisible()) { + pMainWindow->functionTip()->hide(); + } QToolTip::showText(mapToGlobal(helpEvent->pos()),hint); event->ignore(); } else { @@ -2577,6 +2580,9 @@ void Editor::exportAsHTML(const QString &htmlFilename) void Editor::showCompletion(const QString& preWord,bool autoComplete) { + if (pMainWindow->functionTip()->isVisible()) { + pMainWindow->functionTip()->hide(); + } if (!pSettings->codeCompletion().enabled()) return; if (!mParser->enabled()) @@ -3060,8 +3066,8 @@ void Editor::cancelHint() // disable editor hint QToolTip::hideText(); - mCurrentWord = ""; - mCurrentTipType = TipType::None; + //mCurrentWord = ""; + //mCurrentTipType = TipType::None; updateMouseCursor(); } @@ -3129,6 +3135,9 @@ void Editor::showDebugHint(const QString &s, int line) } if (pMainWindow->debugger()->commandRunning()) return; + if (pMainWindow->functionTip()->isVisible()) { + pMainWindow->functionTip()->hide(); + } connect(pMainWindow->debugger(), &Debugger::evalValueReady, this, &Editor::onTipEvalValueReady); mCurrentDebugTipWord = s; @@ -3358,6 +3367,7 @@ void Editor::updateFunctionTip() pMainWindow->functionTip()->setParamIndex( paramPos ); + cancelHint(); pMainWindow->functionTip()->show(); } From 6be9190a8a403517d6e78db69bcccbe74c05ad58 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 15 Jan 2022 11:33:41 +0800 Subject: [PATCH 3/4] - enhancement: better behavior of mouse tips --- RedPandaIDE/editor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 474bcb4c..2f626896 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -1017,6 +1017,8 @@ bool Editor::event(QEvent *event) break; case TipType::None: cancelHint(); + mCurrentWord = ""; + mCurrentTipType = TipType::None; event->ignore(); return true; } From 6209b1ff05c7ca6efb16e672a024d5f2b8072e53 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 15 Jan 2022 12:25:30 +0800 Subject: [PATCH 4/4] - fix: in linux, projects no need of winres to be built update debian pacakges files --- NEWS.md | 1 + RedPandaIDE/compiler/projectcompiler.cpp | 6 ++++++ RedPandaIDE/settings.cpp | 4 +++- packages/deb/builddeb.sh | 2 +- packages/deb/control | 2 +- packages/debian/changelog | 6 ++++++ 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 1bf37f97..146a5b59 100644 --- a/NEWS.md +++ b/NEWS.md @@ -23,6 +23,7 @@ Red Panda C++ Version 0.13.2 - fix: open a project file through "File"->"Open" will not correctly connect it with the project internally - fix: wrong project program directory parameter is sent to the debugger - enhancement: better behavior of mouse tips + - 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 diff --git a/RedPandaIDE/compiler/projectcompiler.cpp b/RedPandaIDE/compiler/projectcompiler.cpp index 8c2bd060..381f0eb0 100644 --- a/RedPandaIDE/compiler/projectcompiler.cpp +++ b/RedPandaIDE/compiler/projectcompiler.cpp @@ -176,6 +176,7 @@ void ProjectCompiler::writeMakeDefines(QFile &file) // Get windres file QString ObjResFile; +#ifdef Q_OS_WIN if (!mProject->options().privateResource.isEmpty()) { if (!mProject->options().objectOutput.isEmpty()) { ObjResFile = includeTrailingPathDelimiter(mProject->options().objectOutput) + @@ -183,6 +184,7 @@ void ProjectCompiler::writeMakeDefines(QFile &file) } else ObjResFile = changeFileExt(mProject->options().privateResource, RES_EXT); } +#endif // Mention progress in the logs if (!ObjResFile.isEmpty()) { @@ -204,7 +206,9 @@ void ProjectCompiler::writeMakeDefines(QFile &file) } writeln(file,"CPP = " + extractFileName(compilerSet()->cppCompiler())); writeln(file,"CC = " + extractFileName(compilerSet()->CCompiler())); +#ifdef Q_OS_WIN writeln(file,"WINDRES = " + extractFileName(compilerSet()->resourceCompiler())); +#endif if (!ObjResFile.isEmpty()) { writeln(file,"RES = " + genMakePath1(ObjResFile)); writeln(file,"OBJ = " + Objects + " $(RES)"); @@ -381,6 +385,7 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file) } } +#ifdef Q_OS_WIN if (!mProject->options().privateResource.isEmpty()) { // Concatenate all resource include directories @@ -433,6 +438,7 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file) } writeln(file); } +#endif } void ProjectCompiler::writeln(QFile &file, const QString &s) diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 4acfd35a..d8266d66 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -2422,8 +2422,10 @@ static void setDebugOptions(Settings::PCompilerSet pSet) { } #ifdef Q_OS_LINUX - pSet->setCustomCompileParams("--sanitize=address"); + pSet->setCustomCompileParams("-fsanitize=address"); pSet->setUseCustomCompileParams(true); + pSet->setCustomLinkParams("-fsanitize=address"); + pSet->setUseCustomLinkParams(true); #endif // pOption = pSet->findOption("-static"); diff --git a/packages/deb/builddeb.sh b/packages/deb/builddeb.sh index 2099a497..fa955387 100755 --- a/packages/deb/builddeb.sh +++ b/packages/deb/builddeb.sh @@ -1,7 +1,7 @@ #!/bin/sh TMP_FOLDER=/tmp/redpandaide -version=0.12.6 +version=0.13.2 make install mkdir $TMP_FOLDER mkdir $TMP_FOLDER/DEBIAN diff --git a/packages/deb/control b/packages/deb/control index 1df3ac17..86ef0b0f 100644 --- a/packages/deb/control +++ b/packages/deb/control @@ -1,5 +1,5 @@ Package: RedPanda-IDE -Version: 0.12.6 +Version: 0.13.2 Section: devel Priority: optional Architecture: amd64 diff --git a/packages/debian/changelog b/packages/debian/changelog index 67b024ea..913747cf 100644 --- a/packages/debian/changelog +++ b/packages/debian/changelog @@ -1,3 +1,9 @@ +redpanda-cpp (0.13.2-1) unstable; urgency=medium + + * Update to 0.13.2 + + -- Roy Qu (瞿华) Thu, 6 Jan 2022 14:52:00 +0800 + redpanda-cpp (0.12.6-1) unstable; urgency=medium * Initial release