- fix: disable code completion doesn't correctly disable project parser
This commit is contained in:
parent
0e0a87584e
commit
6e4d36aade
1
NEWS.md
1
NEWS.md
|
@ -13,6 +13,7 @@ Red Panda C++ Version 1.0.1
|
|||
- fix: expand fold signs on the gutter are not correct
|
||||
- enhancement: auto restore mainwindow when open files in one instance
|
||||
- fix: the problem & problem set panel can't be correctly , if problem set is enabled
|
||||
- fix: disable code completion doesn't correctly disable project parser
|
||||
|
||||
Red Panda C++ Version 1.0.0
|
||||
- fix: calculation for code snippets's tab stop positions is not correct
|
||||
|
|
|
@ -1176,7 +1176,6 @@ void MainWindow::openProject(const QString &filename, bool openFiles)
|
|||
|
||||
void MainWindow::changeOptions(const QString &widgetName, const QString &groupName)
|
||||
{
|
||||
bool oldCodeCompletion = pSettings->codeCompletion().enabled();
|
||||
PSettingsDialog settingsDialog = SettingsDialog::optionDialog();
|
||||
if (!groupName.isEmpty()) {
|
||||
settingsDialog->setCurrentWidget(widgetName, groupName);
|
||||
|
@ -1188,16 +1187,13 @@ void MainWindow::changeOptions(const QString &widgetName, const QString &groupNa
|
|||
return;
|
||||
}
|
||||
|
||||
bool newCodeCompletion = pSettings->codeCompletion().enabled();
|
||||
if (!oldCodeCompletion && newCodeCompletion) {
|
||||
Editor *e = mEditorList->getEditor();
|
||||
if (mProject && !e) {
|
||||
scanActiveProject(true);
|
||||
} else if (mProject && e && e->inProject()) {
|
||||
scanActiveProject(true);
|
||||
} else if (e) {
|
||||
e->reparse();
|
||||
}
|
||||
Editor *e = mEditorList->getEditor();
|
||||
if (mProject && !e) {
|
||||
scanActiveProject(true);
|
||||
} else if (mProject && e && e->inProject()) {
|
||||
scanActiveProject(true);
|
||||
} else if (e) {
|
||||
e->reparse();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2015,6 +2011,8 @@ void MainWindow::scanActiveProject(bool parse)
|
|||
{
|
||||
if (!mProject)
|
||||
return;
|
||||
mProject->cppParser()->setEnabled(pSettings->codeCompletion().enabled());
|
||||
|
||||
//UpdateClassBrowsing;
|
||||
if (parse) {
|
||||
resetCppParser(mProject->cppParser(),mProject->options().compilerSet);
|
||||
|
|
|
@ -699,6 +699,8 @@ QString CppParser::getHeaderFileName(const QString &relativeTo, const QString &l
|
|||
|
||||
void CppParser::invalidateFile(const QString &fileName)
|
||||
{
|
||||
if (!mEnabled)
|
||||
return;
|
||||
{
|
||||
QMutexLocker locker(&mMutex);
|
||||
if (mParsing || mLockCount>0)
|
||||
|
@ -4806,7 +4808,12 @@ bool CppParser::enabled() const
|
|||
|
||||
void CppParser::setEnabled(bool newEnabled)
|
||||
{
|
||||
mEnabled = newEnabled;
|
||||
if (mEnabled!=newEnabled) {
|
||||
mEnabled = newEnabled;
|
||||
if (!mEnabled) {
|
||||
this->reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CppFileParserThread::CppFileParserThread(
|
||||
|
|
Loading…
Reference in New Issue