fix #297 : Filename that contains '&' doesn't correctly displayed in the editor tab.
This commit is contained in:
parent
5b328f1e1a
commit
1ae60fa7ed
1
NEWS.md
1
NEWS.md
|
@ -71,6 +71,7 @@ Red Panda C++ Version 2.27
|
|||
- fix: Can't correctly retrieve function parameters type.
|
||||
- fix: Auto type induction for expression contains '[]' are not correct.
|
||||
- fix: Option 'Pause after run in console' for tools doesn't work.
|
||||
- fix: Filename that contains '&' doesn't correctly displayed in the editor tab.
|
||||
|
||||
Red Panda C++ Version 2.26
|
||||
- enhancement: Code suggestion for embedded std::vectors.
|
||||
|
|
|
@ -5467,17 +5467,18 @@ void Editor::updateCaption(const QString& newCaption) {
|
|||
int index = mParentPageControl->indexOf(this);
|
||||
if (index==-1)
|
||||
return;
|
||||
QString caption;
|
||||
if (newCaption.isEmpty()) {
|
||||
QString caption = QFileInfo(mFilename).fileName();
|
||||
caption = QFileInfo(mFilename).fileName();
|
||||
if (this->modified()) {
|
||||
caption.append("[*]");
|
||||
}
|
||||
if (this->readOnly()) {
|
||||
caption.append("["+tr("Readonly")+"]");
|
||||
}
|
||||
mParentPageControl->setTabText(index,caption);
|
||||
}
|
||||
} else {
|
||||
mParentPageControl->setTabText(index,newCaption);
|
||||
caption = newCaption;
|
||||
}
|
||||
|
||||
caption = caption.replace("&","&&");
|
||||
mParentPageControl->setTabText(index,caption);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue