- 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
|
- fix: expand fold signs on the gutter are not correct
|
||||||
- enhancement: auto restore mainwindow when open files in one instance
|
- 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: 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
|
Red Panda C++ Version 1.0.0
|
||||||
- fix: calculation for code snippets's tab stop positions is not correct
|
- 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)
|
void MainWindow::changeOptions(const QString &widgetName, const QString &groupName)
|
||||||
{
|
{
|
||||||
bool oldCodeCompletion = pSettings->codeCompletion().enabled();
|
|
||||||
PSettingsDialog settingsDialog = SettingsDialog::optionDialog();
|
PSettingsDialog settingsDialog = SettingsDialog::optionDialog();
|
||||||
if (!groupName.isEmpty()) {
|
if (!groupName.isEmpty()) {
|
||||||
settingsDialog->setCurrentWidget(widgetName, groupName);
|
settingsDialog->setCurrentWidget(widgetName, groupName);
|
||||||
|
@ -1188,16 +1187,13 @@ void MainWindow::changeOptions(const QString &widgetName, const QString &groupNa
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool newCodeCompletion = pSettings->codeCompletion().enabled();
|
Editor *e = mEditorList->getEditor();
|
||||||
if (!oldCodeCompletion && newCodeCompletion) {
|
if (mProject && !e) {
|
||||||
Editor *e = mEditorList->getEditor();
|
scanActiveProject(true);
|
||||||
if (mProject && !e) {
|
} else if (mProject && e && e->inProject()) {
|
||||||
scanActiveProject(true);
|
scanActiveProject(true);
|
||||||
} else if (mProject && e && e->inProject()) {
|
} else if (e) {
|
||||||
scanActiveProject(true);
|
e->reparse();
|
||||||
} else if (e) {
|
|
||||||
e->reparse();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2015,6 +2011,8 @@ void MainWindow::scanActiveProject(bool parse)
|
||||||
{
|
{
|
||||||
if (!mProject)
|
if (!mProject)
|
||||||
return;
|
return;
|
||||||
|
mProject->cppParser()->setEnabled(pSettings->codeCompletion().enabled());
|
||||||
|
|
||||||
//UpdateClassBrowsing;
|
//UpdateClassBrowsing;
|
||||||
if (parse) {
|
if (parse) {
|
||||||
resetCppParser(mProject->cppParser(),mProject->options().compilerSet);
|
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)
|
void CppParser::invalidateFile(const QString &fileName)
|
||||||
{
|
{
|
||||||
|
if (!mEnabled)
|
||||||
|
return;
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&mMutex);
|
QMutexLocker locker(&mMutex);
|
||||||
if (mParsing || mLockCount>0)
|
if (mParsing || mLockCount>0)
|
||||||
|
@ -4806,7 +4808,12 @@ bool CppParser::enabled() const
|
||||||
|
|
||||||
void CppParser::setEnabled(bool newEnabled)
|
void CppParser::setEnabled(bool newEnabled)
|
||||||
{
|
{
|
||||||
mEnabled = newEnabled;
|
if (mEnabled!=newEnabled) {
|
||||||
|
mEnabled = newEnabled;
|
||||||
|
if (!mEnabled) {
|
||||||
|
this->reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CppFileParserThread::CppFileParserThread(
|
CppFileParserThread::CppFileParserThread(
|
||||||
|
|
Loading…
Reference in New Issue