Skip to content

Commit

Permalink
fix: Fixed an issue where Ctrl + Tab could not be used to toggle op…
Browse files Browse the repository at this point in the history
…en files

as title

Log: fix issue
  • Loading branch information
Kakueeen committed Sep 3, 2024
1 parent 39aef79 commit 57a9fee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/codeeditor/gui/workspacewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ void WorkspaceWidgetPrivate::initActions()

// add/del comment
QAction *commentAction = new QAction(tr("Add/Delete Comment"), q);
auto cmd = ActionManager::instance()->registerAction(commentAction, "TextEditor.AddAndRemoveComment");
auto cmd = ActionManager::instance()->registerAction(commentAction, "TextEditor.AddAndRemoveComment", { TextEditorContext });

Check warning on line 71 in src/plugins/codeeditor/gui/workspacewidget.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Local variable 'cmd' shadows outer variable

Check warning on line 71 in src/plugins/codeeditor/gui/workspacewidget.cpp

View workflow job for this annotation

GitHub Actions / static-check / Call-CppCheck

Local variable 'cmd' shadows outer variable
cmd->setDefaultKeySequence(Qt::CTRL | Qt::Key_Slash);
connect(commentAction, &QAction::triggered, this, &WorkspaceWidgetPrivate::handleSetComment);

// show opened files
QAction *showOpenedAction = new QAction(tr("Show opened files"), q);
cmd = ActionManager::instance()->registerAction(showOpenedAction, "TextEditor.ShowOpenedFiles");
cmd = ActionManager::instance()->registerAction(showOpenedAction, "TextEditor.ShowOpenedFiles", { TextEditorContext });
cmd->setDefaultKeySequence(Qt::CTRL | Qt::Key_Tab);
connect(showOpenedAction, &QAction::triggered, this, &WorkspaceWidgetPrivate::handleShowOpenedFiles);

Expand Down

0 comments on commit 57a9fee

Please sign in to comment.