- fix: Enum value defines is not correctly parsed.
- enhancement: Use differenct source file for each language in project templates
This commit is contained in:
parent
3ede3e4ce6
commit
f03c25a672
5
NEWS.md
5
NEWS.md
|
@ -1,7 +1,8 @@
|
|||
Red Panda C++ Version 2.13
|
||||
Red Panda C++ Version 2.14
|
||||
|
||||
- change: Remove all breakpoints of the current non-project file, when it is closed.
|
||||
|
||||
- fix: Enum value defines is not correctly parsed.
|
||||
- enhancement: Use differenct source file for each language in project templates
|
||||
|
||||
Red Panda C++ Version 2.13
|
||||
|
||||
|
|
|
@ -1275,7 +1275,7 @@ void Editor::mouseReleaseEvent(QMouseEvent *event)
|
|||
// if ctrl+clicked
|
||||
if ((event->modifiers() == Qt::ControlModifier)
|
||||
&& (event->button() == Qt::LeftButton)) {
|
||||
|
||||
if (!mCurrentWord.isEmpty()) {
|
||||
QSynedit::BufferCoord p;
|
||||
if (mParser && pointToCharLine(event->pos(),p)) {
|
||||
QString s = document()->getLine(p.line - 1);
|
||||
|
@ -1293,6 +1293,7 @@ void Editor::mouseReleaseEvent(QMouseEvent *event)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
QSynedit::QSynEdit::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
|
|
|
@ -5389,6 +5389,7 @@ int CppParser::indexOfNextPeriodOrSemicolon(int index, int endIndex)
|
|||
switch(mTokenizer[index]->text[0].unicode()) {
|
||||
case ';':
|
||||
case ',':
|
||||
case '}':
|
||||
return index;
|
||||
case '(':
|
||||
index = mTokenizer[index]->matchIndex+1;
|
||||
|
|
|
@ -38,17 +38,26 @@ PTemplateUnit ProjectTemplate::unit(int index)
|
|||
return PTemplateUnit();
|
||||
QString section = QString("Unit%1").arg(index);
|
||||
PTemplateUnit unit = std::make_shared<TemplateUnit>();
|
||||
QString lang = pSettings->environment().language();
|
||||
if (!lang.isEmpty()) {
|
||||
unit->Source = fromByteArray(mIni->GetValue(toByteArray(section), QString("Source[%1]").arg(lang).toUtf8(), ""));
|
||||
unit->CText = fromByteArray(mIni->GetValue(toByteArray(section), QString("C[%1]").arg(lang).toUtf8(), ""));
|
||||
unit->CppText = fromByteArray(mIni->GetValue(toByteArray(section), QString("Cpp[%1]").arg(lang).toUtf8(), ""));
|
||||
}
|
||||
if (unit->Source.isEmpty())
|
||||
unit->Source = fromByteArray(mIni->GetValue(toByteArray(section), "Source", ""));
|
||||
unit->Target = fromByteArray(mIni->GetValue(toByteArray(section), "Target", ""));
|
||||
if (unit->CText.isEmpty())
|
||||
unit->CText = fromByteArray(mIni->GetValue(toByteArray(section), "C", ""));
|
||||
if (unit->CppText.isEmpty())
|
||||
unit->CppText = fromByteArray(mIni->GetValue(toByteArray(section), "Cpp", ""));
|
||||
if (unit->CppText.isEmpty())
|
||||
unit->CppText = unit->CText;
|
||||
|
||||
unit->CName = fromByteArray(mIni->GetValue(toByteArray(section), "CName", ""));
|
||||
unit->CppName = fromByteArray(mIni->GetValue(toByteArray(section), "CppName", ""));
|
||||
if (unit->CppName.isEmpty())
|
||||
unit->CppName = unit->CName;
|
||||
unit->Target = fromByteArray(mIni->GetValue(toByteArray(section), "Target", ""));
|
||||
|
||||
return unit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue