fix : menu items for editors are disabled.

This commit is contained in:
Roy Qu 2024-03-22 19:37:13 +08:00
parent 325f3ca5ce
commit 0782994f95
3 changed files with 0 additions and 11 deletions

View File

@ -594,11 +594,6 @@ void MainWindow::updateEncodingActions(const Editor *e)
}
}
void MainWindow::disableEncodingActions()
{
updateEncodingActions(nullptr);
}
void MainWindow::updateEditorActions(const Editor *e)
{
//it's not a compile action, but put here for convinience
@ -3639,8 +3634,6 @@ void MainWindow::buildEncodingMenu()
}
mMenuEncoding = new QMenu(this);
connect(mMenuEncoding, &QMenu::aboutToHide,
this, &MainWindow::disableEncodingActions);
mMenuEncoding->setTitle(tr("File Encoding"));
mMenuEncoding->addAction(ui->actionAuto_Detect);
mMenuEncoding->addAction(ui->actionEncode_in_ANSI);
@ -4022,8 +4015,6 @@ void MainWindow::onDebugConsoleContextMenu(const QPoint &pos)
void MainWindow::onFileEncodingContextMenu(const QPoint &pos)
{
Editor * e = mEditorList->getEditor();
updateEncodingActions(e);
if (mMenuEncoding->isEnabled())
mMenuEncoding->exec(mFileEncodingStatus->mapToGlobal(pos));
}

View File

@ -132,7 +132,6 @@ public:
void updateEditorBreakpoints();
void updateEditorActions();
void updateEncodingActions(const Editor *e);
void disableEncodingActions();
void updateEditorActions(const Editor *e);
void updateProjectActions();
void updateCompileActions();

View File

@ -2916,7 +2916,6 @@ void CppParser::handleLambda(int index, int maxIndex)
StatementProperty::spHasDefinition);
scanMethodArgs(lambdaBlock,argStart);
addSoloScopeLevel(lambdaBlock,mTokenizer[bodyStart]->line);
qDebug()<<">?>>>>>";
int oldIndex = mIndex;
mIndex = bodyStart+1;
while (handleStatement(bodyEnd));