Merge branch 'master' of github.com:royqh1979/RedPanda-CPP

This commit is contained in:
royqh1979@gmail.com 2022-01-17 08:48:21 +08:00
commit 682c81265e
13 changed files with 39 additions and 11 deletions

View File

@ -22,6 +22,8 @@ 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: 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: 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 - 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 Red Panda C++ Version 0.13.1
- enhancement: suppoort localization info in project templates - enhancement: suppoort localization info in project templates

View File

@ -176,6 +176,7 @@ void ProjectCompiler::writeMakeDefines(QFile &file)
// Get windres file // Get windres file
QString ObjResFile; QString ObjResFile;
#ifdef Q_OS_WIN
if (!mProject->options().privateResource.isEmpty()) { if (!mProject->options().privateResource.isEmpty()) {
if (!mProject->options().objectOutput.isEmpty()) { if (!mProject->options().objectOutput.isEmpty()) {
ObjResFile = includeTrailingPathDelimiter(mProject->options().objectOutput) + ObjResFile = includeTrailingPathDelimiter(mProject->options().objectOutput) +
@ -183,6 +184,7 @@ void ProjectCompiler::writeMakeDefines(QFile &file)
} else } else
ObjResFile = changeFileExt(mProject->options().privateResource, RES_EXT); ObjResFile = changeFileExt(mProject->options().privateResource, RES_EXT);
} }
#endif
// Mention progress in the logs // Mention progress in the logs
if (!ObjResFile.isEmpty()) { if (!ObjResFile.isEmpty()) {
@ -204,7 +206,9 @@ void ProjectCompiler::writeMakeDefines(QFile &file)
} }
writeln(file,"CPP = " + extractFileName(compilerSet()->cppCompiler())); writeln(file,"CPP = " + extractFileName(compilerSet()->cppCompiler()));
writeln(file,"CC = " + extractFileName(compilerSet()->CCompiler())); writeln(file,"CC = " + extractFileName(compilerSet()->CCompiler()));
#ifdef Q_OS_WIN
writeln(file,"WINDRES = " + extractFileName(compilerSet()->resourceCompiler())); writeln(file,"WINDRES = " + extractFileName(compilerSet()->resourceCompiler()));
#endif
if (!ObjResFile.isEmpty()) { if (!ObjResFile.isEmpty()) {
writeln(file,"RES = " + genMakePath1(ObjResFile)); writeln(file,"RES = " + genMakePath1(ObjResFile));
writeln(file,"OBJ = " + Objects + " $(RES)"); writeln(file,"OBJ = " + Objects + " $(RES)");
@ -381,6 +385,7 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file)
} }
} }
#ifdef Q_OS_WIN
if (!mProject->options().privateResource.isEmpty()) { if (!mProject->options().privateResource.isEmpty()) {
// Concatenate all resource include directories // Concatenate all resource include directories
@ -433,6 +438,7 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file)
} }
writeln(file); writeln(file);
} }
#endif
} }
void ProjectCompiler::writeln(QFile &file, const QString &s) void ProjectCompiler::writeln(QFile &file, const QString &s)

View File

@ -1017,6 +1017,8 @@ bool Editor::event(QEvent *event)
break; break;
case TipType::None: case TipType::None:
cancelHint(); cancelHint();
mCurrentWord = "";
mCurrentTipType = TipType::None;
event->ignore(); event->ignore();
return true; return true;
} }
@ -1080,6 +1082,9 @@ bool Editor::event(QEvent *event)
} else if (cursor() == Qt::PointingHandCursor) { } else if (cursor() == Qt::PointingHandCursor) {
updateMouseCursor(); updateMouseCursor();
} }
if (pMainWindow->functionTip()->isVisible()) {
pMainWindow->functionTip()->hide();
}
QToolTip::showText(mapToGlobal(helpEvent->pos()),hint); QToolTip::showText(mapToGlobal(helpEvent->pos()),hint);
event->ignore(); event->ignore();
} else { } else {
@ -2577,6 +2582,9 @@ void Editor::exportAsHTML(const QString &htmlFilename)
void Editor::showCompletion(const QString& preWord,bool autoComplete) void Editor::showCompletion(const QString& preWord,bool autoComplete)
{ {
if (pMainWindow->functionTip()->isVisible()) {
pMainWindow->functionTip()->hide();
}
if (!pSettings->codeCompletion().enabled()) if (!pSettings->codeCompletion().enabled())
return; return;
if (!mParser->enabled()) if (!mParser->enabled())
@ -3060,8 +3068,8 @@ void Editor::cancelHint()
// disable editor hint // disable editor hint
QToolTip::hideText(); QToolTip::hideText();
mCurrentWord = ""; //mCurrentWord = "";
mCurrentTipType = TipType::None; //mCurrentTipType = TipType::None;
updateMouseCursor(); updateMouseCursor();
} }
@ -3129,6 +3137,9 @@ void Editor::showDebugHint(const QString &s, int line)
} }
if (pMainWindow->debugger()->commandRunning()) if (pMainWindow->debugger()->commandRunning())
return; return;
if (pMainWindow->functionTip()->isVisible()) {
pMainWindow->functionTip()->hide();
}
connect(pMainWindow->debugger(), &Debugger::evalValueReady, connect(pMainWindow->debugger(), &Debugger::evalValueReady,
this, &Editor::onTipEvalValueReady); this, &Editor::onTipEvalValueReady);
mCurrentDebugTipWord = s; mCurrentDebugTipWord = s;
@ -3358,6 +3369,7 @@ void Editor::updateFunctionTip()
pMainWindow->functionTip()->setParamIndex( pMainWindow->functionTip()->setParamIndex(
paramPos paramPos
); );
cancelHint();
pMainWindow->functionTip()->show(); pMainWindow->functionTip()->show();
} }

View File

@ -585,7 +585,7 @@ void CppTokenizer::skipToNextToken()
bool CppTokenizer::isIdentChar(const QChar &ch) bool CppTokenizer::isIdentChar(const QChar &ch)
{ {
return ch.isLetter(); return ch=='_' || ch.isLetter() ;
} }
void CppTokenizer::advance() void CppTokenizer::advance()

View File

@ -2422,8 +2422,10 @@ static void setDebugOptions(Settings::PCompilerSet pSet) {
} }
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
pSet->setCustomCompileParams("--sanitize=address"); pSet->setCustomCompileParams("-fsanitize=address");
pSet->setUseCustomCompileParams(true); pSet->setUseCustomCompileParams(true);
pSet->setCustomLinkParams("-fsanitize=address");
pSet->setUseCustomLinkParams(true);
#endif #endif
// pOption = pSet->findOption("-static"); // pOption = pSet->findOption("-static");

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
TMP_FOLDER=/tmp/redpandaide TMP_FOLDER=/tmp/redpandaide
version=0.12.6 version=0.13.2
make install make install
mkdir $TMP_FOLDER mkdir $TMP_FOLDER
mkdir $TMP_FOLDER/DEBIAN mkdir $TMP_FOLDER/DEBIAN

View File

@ -1,5 +1,5 @@
Package: RedPanda-IDE Package: RedPanda-IDE
Version: 0.12.6 Version: 0.13.2
Section: devel Section: devel
Priority: optional Priority: optional
Architecture: amd64 Architecture: amd64

View File

@ -1,3 +1,9 @@
redpanda-cpp (0.13.2-1) unstable; urgency=medium
* Update to 0.13.2
-- Roy Qu (瞿华) <royqh1979@gmail.com> Thu, 6 Jan 2022 14:52:00 +0800
redpanda-cpp (0.12.6-1) unstable; urgency=medium redpanda-cpp (0.12.6-1) unstable; urgency=medium
* Initial release * Initial release

View File

@ -4,7 +4,7 @@ Name=GLUT
Icon=CL_GLUT.ico Icon=CL_GLUT.ico
Description=A simple GLUT program Description=A simple GLUT program
Description[zh_CN]=一个简单的GLUT程序 Description[zh_CN]=一个简单的GLUT程序
Category=Multimedia Category=3D
Category[zh_CN]=3D Category[zh_CN]=3D
[Unit0] [Unit0]

View File

@ -4,7 +4,7 @@ Name=GLFW
Description=A simple GLFW program Description=A simple GLFW program
Description[zh_CN]=一个简单的GLFW程序 Description[zh_CN]=一个简单的GLFW程序
Icon=GLFW.ico Icon=GLFW.ico
Category=Multimedia Category=3D
Category[zh_CN]=3D Category[zh_CN]=3D
[Unit0] [Unit0]

View File

@ -6,7 +6,7 @@ Icon=Communication.ico
Description=A classic Hello World program Description=A classic Hello World program
Description[zh_CN]=一个经典的“世界,你好!”程序 Description[zh_CN]=一个经典的“世界,你好!”程序
Category=Console Category=Console
Category=控制台 Category[zh_CN]=控制台
[Unit0] [Unit0]
CName=main.c CName=main.c

View File

@ -4,7 +4,7 @@ Name=OpenGL
Icon=Pizza.ico Icon=Pizza.ico
Description=A basic OpenGL program Description=A basic OpenGL program
Description[zh_CN]=一个基本的OpenGL程序 Description[zh_CN]=一个基本的OpenGL程序
Category=Multimedia Category=3D
Category[zh_CN]=3D Category[zh_CN]=3D
[Unit0] [Unit0]

View File

@ -5,7 +5,7 @@ Name[zh_CN]=raylib 3D
Icon=raylib.ico Icon=raylib.ico
Description=A simple 3D program using raylib ( https://raylib.com ) Description=A simple 3D program using raylib ( https://raylib.com )
Description[zh_CN]=简单的raylib 3D程序 ( https://raylib.com ) Description[zh_CN]=简单的raylib 3D程序 ( https://raylib.com )
Category=Multimedia Category=3D
Category[zh_CN]=3D Category[zh_CN]=3D
[Unit0] [Unit0]