- fix: astyle.exe can't correctly format files that using non-ascii identifier
This commit is contained in:
parent
70bf0c9eb7
commit
a165efa7cf
1
NEWS.md
1
NEWS.md
|
@ -5,6 +5,7 @@ Red Panda C++ Version 1.4
|
||||||
- fix: can't open text project file in the editor
|
- fix: can't open text project file in the editor
|
||||||
- change: when create non-text project file, don't auto open it
|
- change: when create non-text project file, don't auto open it
|
||||||
- fix: the project compiler options is not correctly read when open old dev-c++ project
|
- fix: the project compiler options is not correctly read when open old dev-c++ project
|
||||||
|
- fix: astyle.exe can't correctly format files that using non-ascii identifier
|
||||||
|
|
||||||
Red Panda C++ Version 1.3
|
Red Panda C++ Version 1.3
|
||||||
|
|
||||||
|
|
|
@ -4291,6 +4291,7 @@ void Editor::reformat()
|
||||||
onLinesDeleted(1,document()->count());
|
onLinesDeleted(1,document()->count());
|
||||||
QByteArray content = text().toUtf8();
|
QByteArray content = text().toUtf8();
|
||||||
QStringList args = pSettings->codeFormatter().getArguments();
|
QStringList args = pSettings->codeFormatter().getArguments();
|
||||||
|
qDebug()<<args;
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QByteArray newContent = runAndGetOutput("astyle.exe",
|
QByteArray newContent = runAndGetOutput("astyle.exe",
|
||||||
pSettings->dirs().appDir(),
|
pSettings->dirs().appDir(),
|
||||||
|
|
|
@ -714,8 +714,10 @@ bool ASBase::isLegalNameChar(char ch) const
|
||||||
{
|
{
|
||||||
if (isWhiteSpace(ch))
|
if (isWhiteSpace(ch))
|
||||||
return false;
|
return false;
|
||||||
if ((unsigned char) ch > 127)
|
// if ((unsigned char) ch > 127)
|
||||||
return false;
|
// return false;
|
||||||
|
if ((unsigned char) ch > 127)
|
||||||
|
return true;
|
||||||
return (isalnum((unsigned char) ch)
|
return (isalnum((unsigned char) ch)
|
||||||
|| ch == '.' || ch == '_'
|
|| ch == '.' || ch == '_'
|
||||||
|| (isJavaStyle() && ch == '$')
|
|| (isJavaStyle() && ch == '$')
|
||||||
|
|
Loading…
Reference in New Issue