- enhancement: support function arguments like "int (&t)[]"
- change: Don't show error dialog when bookmark/debug configuration json files are empty.
This commit is contained in:
parent
774d4193b5
commit
11bceaf972
5
NEWS.md
5
NEWS.md
|
@ -7,8 +7,9 @@ Red Panda C++ Version 2.22
|
||||||
- fix: lambda expression is not correctly handled.
|
- fix: lambda expression is not correctly handled.
|
||||||
- fix: '__extension__' should be ignored when parsing C/C++ codes.
|
- fix: '__extension__' should be ignored when parsing C/C++ codes.
|
||||||
- enhancement: show completion for return type of lambda expressions.
|
- enhancement: show completion for return type of lambda expressions.
|
||||||
- upgrade raylib to 4.5, raygui to 3.6
|
- enhancement: support function arguments like "int (&t)[]"
|
||||||
|
- change: Don't show error dialog when bookmark/debug configuration json files are empty.
|
||||||
|
- upgrade raylib to 4.5, raygui to 3.6
|
||||||
|
|
||||||
Red Panda C++ Version 2.21
|
Red Panda C++ Version 2.21
|
||||||
|
|
||||||
|
|
|
@ -809,10 +809,12 @@ PDebugConfig Debugger::load(const QString &filename, bool forProject)
|
||||||
if (!file.exists())
|
if (!file.exists())
|
||||||
return pConfig;
|
return pConfig;
|
||||||
if (file.open(QFile::ReadOnly)) {
|
if (file.open(QFile::ReadOnly)) {
|
||||||
QByteArray content = file.readAll();
|
QByteArray content = file.readAll().trimmed();
|
||||||
QJsonParseError error;
|
if (content.isEmpty())
|
||||||
|
return pConfig;
|
||||||
|
QJsonParseError error;
|
||||||
QJsonDocument doc(QJsonDocument::fromJson(content,&error));
|
QJsonDocument doc(QJsonDocument::fromJson(content,&error));
|
||||||
if (error.error != QJsonParseError::NoError) {
|
if (error.error == QJsonParseError::NoError) {
|
||||||
throw FileError(tr("Error in json file '%1':%2 : %3")
|
throw FileError(tr("Error in json file '%1':%2 : %3")
|
||||||
.arg(filename)
|
.arg(filename)
|
||||||
.arg(error.offset)
|
.arg(error.offset)
|
||||||
|
|
|
@ -307,7 +307,9 @@ QList<PBookmark> BookmarkModel::load(const QString& filename, qint64 criteriaTim
|
||||||
if (!file.exists())
|
if (!file.exists())
|
||||||
return bookmarks;
|
return bookmarks;
|
||||||
if (file.open(QFile::ReadOnly)) {
|
if (file.open(QFile::ReadOnly)) {
|
||||||
QByteArray content = file.readAll();
|
QByteArray content = file.readAll().trimmed();
|
||||||
|
if (content.isEmpty())
|
||||||
|
return bookmarks;
|
||||||
QJsonParseError error;
|
QJsonParseError error;
|
||||||
QJsonDocument doc(QJsonDocument::fromJson(content,&error));
|
QJsonDocument doc(QJsonDocument::fromJson(content,&error));
|
||||||
if (error.error != QJsonParseError::NoError) {
|
if (error.error != QJsonParseError::NoError) {
|
||||||
|
|
Loading…
Reference in New Issue