优化段注释
This commit is contained in:
parent
522da385d1
commit
fbe03a8e5e
|
@ -173,7 +173,7 @@ void MdiChild::keyPressEvent(QKeyEvent *e)
|
|||
}
|
||||
} else if ((e->modifiers() & Qt::ControlModifier) && e->key() == Qt::Key_Asterisk) { // Ctrl+* 注释选中段
|
||||
QString s = textCursor().selection().toPlainText();
|
||||
if (s.startsWith(QString("/*").trimmed()) && s.endsWith(QString("*/").trimmed())) {
|
||||
if (s.trimmed().startsWith(QString("/*")) && s.trimmed().endsWith(QString("*/"))) {
|
||||
s = s.replace("/*", "").replace("*/", "");
|
||||
} else {
|
||||
if (s.contains("\n"))
|
||||
|
|
Loading…
Reference in New Issue