- fix: mainwindow action's short cut doesn't work, if the action is not in menu or toolbar
This commit is contained in:
parent
0c2d569cb9
commit
f298cc7b47
1
NEWS.md
1
NEWS.md
|
@ -5,6 +5,7 @@ Red Panda C++ Version 0.14.0
|
|||
- enhancement: greatly speed up code completion
|
||||
- fix: code folding calcuation not correct when some codes are folded and editing after them
|
||||
- enhancement: code completion ui redesigned
|
||||
- fix: mainwindow action's short cut doesn't work, if the action is not in menu or toolbar
|
||||
|
||||
Red Panda C++ Version 0.13.4
|
||||
- fix: when copy comments, don't auto indent
|
||||
|
|
|
@ -97,6 +97,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
mSystemTurnedOff(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
addActions( this->findChildren<QAction *>(QString(), Qt::FindChildrenRecursively));
|
||||
// status bar
|
||||
mFileInfoStatus=new QLabel();
|
||||
mFileEncodingStatus = new LabelWithMenu();
|
||||
|
@ -167,6 +168,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
mMenuNew->addAction(ui->actionNew_Project);
|
||||
ui->menuFile->insertMenu(ui->actionOpen,mMenuNew);
|
||||
|
||||
|
||||
mMenuExport = new QMenu(tr("Export"));
|
||||
mMenuExport->addAction(ui->actionExport_As_RTF);
|
||||
mMenuExport->addAction(ui->actionExport_As_HTML);
|
||||
|
@ -5664,6 +5666,7 @@ void MainWindow::on_actionExport_As_HTML_triggered()
|
|||
|
||||
void MainWindow::on_actionMove_To_Other_View_triggered()
|
||||
{
|
||||
qDebug()<<"test";
|
||||
Editor * editor = mEditorList->getEditor();
|
||||
if (editor) {
|
||||
mEditorList->swapEditor(editor);
|
||||
|
|
|
@ -2297,6 +2297,9 @@
|
|||
<property name="shortcut">
|
||||
<string>Ctrl+B</string>
|
||||
</property>
|
||||
<property name="shortcutContext">
|
||||
<enum>Qt::ApplicationShortcut</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpen_Terminal">
|
||||
<property name="icon">
|
||||
|
@ -2448,6 +2451,9 @@
|
|||
<property name="shortcut">
|
||||
<string>Ctrl+M</string>
|
||||
</property>
|
||||
<property name="shortcutContext">
|
||||
<enum>Qt::ApplicationShortcut</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionC_C_Reference">
|
||||
<property name="text">
|
||||
|
|
|
@ -64,6 +64,16 @@ void EnvironmentShortcutModel::reload()
|
|||
continue;
|
||||
loadShortCutsOfMenu(menu, actions);
|
||||
}
|
||||
foreach (QAction* action,actions) {
|
||||
if (!action->text().isEmpty()) {
|
||||
PEnvironmentShortcut item = std::make_shared<EnvironmentShortcut>();
|
||||
item->name = action->objectName();
|
||||
item->fullPath = QString("%1 : %2").arg(tr("action"),action->text());
|
||||
item->action = action;
|
||||
item->shortcut = action->shortcut().toString().trimmed();
|
||||
mShortcuts.append(item);
|
||||
}
|
||||
}
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue