work save
This commit is contained in:
parent
f167e10c12
commit
93463c24ca
|
@ -1595,6 +1595,13 @@ void Editor::resetBreakpoints()
|
|||
invalidate();
|
||||
}
|
||||
|
||||
bool Editor::notParsed()
|
||||
{
|
||||
if (!mParser)
|
||||
return true;
|
||||
return mParser->findFileIncludes(mFilename)==nullptr;
|
||||
}
|
||||
|
||||
QChar Editor::getCurrentChar()
|
||||
{
|
||||
if (lineText().length()<caretX())
|
||||
|
|
|
@ -167,6 +167,7 @@ public:
|
|||
void exportAsRTF(const QString& rtfFilename);
|
||||
void exportAsHTML(const QString& htmlFilename);
|
||||
void resetBreakpoints();
|
||||
bool notParsed();
|
||||
|
||||
const PCppParser &parser();
|
||||
|
||||
|
|
|
@ -4774,24 +4774,22 @@ PSymbolUsageManager &MainWindow::symbolUsageManager()
|
|||
|
||||
static void updateEditorParser(QTabWidget* tabWidget,
|
||||
Editor* editor) {
|
||||
qDebug()<<"update editors";
|
||||
qDebug()<<pSettings->codeCompletion().clearWhenEditorHidden();
|
||||
if (pSettings->codeCompletion().clearWhenEditorHidden()) {
|
||||
for (int i=0;i<tabWidget->count();i++) {
|
||||
Editor * e = (Editor*)(tabWidget->widget(i));
|
||||
if (!e->inProject()) {
|
||||
if (e==editor) {
|
||||
resetCppParser(e->parser());
|
||||
e->reparse();
|
||||
} else {
|
||||
qDebug()<<"clear editor:"<<e->filename();
|
||||
//e->initParser();
|
||||
if (e!=editor && e->parser() && !e->notParsed()) {
|
||||
e->parser()->reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (editor && editor->parser() && editor->notParsed()) {
|
||||
resetCppParser(editor->parser());
|
||||
editor->reparse();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_EditorTabsLeft_currentChanged(int)
|
||||
{
|
||||
Editor * editor = mEditorList->getEditor(-1,ui->EditorTabsLeft);
|
||||
|
|
Loading…
Reference in New Issue