- enhancement: add 'run all problem cases' / 'run current problem case' / 'batch set cases' to the option dialog's shortcut panel
This commit is contained in:
parent
1e865a775b
commit
fb18a1f1a3
1
NEWS.md
1
NEWS.md
|
@ -11,6 +11,7 @@ Red Panda C++ Version 1.1.0
|
|||
- fix: undo doesn't work correctly after rename symbole & reformat
|
||||
- fix: can't remove a shortcut
|
||||
- enhancement: hide all menu actions in the option dialog's shortcut panel
|
||||
- enhancement: add 'run all problem cases' / 'run current problem case' / 'batch set cases' to the option dialog's shortcut panel
|
||||
|
||||
Red Panda C++ Version 1.0.10
|
||||
- fix: modify watch doesn't work
|
||||
|
|
|
@ -6898,6 +6898,17 @@ bool MainWindow::openningFiles() const
|
|||
return mOpenningFiles;
|
||||
}
|
||||
|
||||
QList<QAction *> MainWindow::listShortCutableActions()
|
||||
{
|
||||
QList<QAction*> actions = findChildren<QAction *>(QString(), Qt::FindDirectChildrenOnly);
|
||||
actions.append(mProblem_RunAllCases);
|
||||
actions.append(mProblem_RunCurrentCase);
|
||||
actions.append(mProblem_batchSetCases);
|
||||
actions.append(mProblem_Properties);
|
||||
return actions;
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_actionTool_Window_Bars_triggered()
|
||||
{
|
||||
bool state = ui->tabExplorer->isVisible();
|
||||
|
@ -6907,7 +6918,6 @@ void MainWindow::on_actionTool_Window_Bars_triggered()
|
|||
ui->actionTool_Window_Bars->setChecked(state);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_actionStatus_Bar_triggered()
|
||||
{
|
||||
bool state = ui->statusbar->isVisible();
|
||||
|
@ -6916,7 +6926,6 @@ void MainWindow::on_actionStatus_Bar_triggered()
|
|||
ui->actionStatus_Bar->setChecked(state);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_actionProject_triggered()
|
||||
{
|
||||
bool state = ui->actionProject->isChecked();
|
||||
|
|
|
@ -189,6 +189,8 @@ public:
|
|||
|
||||
bool openningFiles() const;
|
||||
|
||||
QList<QAction*> listShortCutableActions();
|
||||
|
||||
public slots:
|
||||
void logToolsOutput(const QString& msg);
|
||||
void onCompileIssue(PCompileIssue issue);
|
||||
|
|
|
@ -463,7 +463,7 @@
|
|||
<enum>QTabWidget::West</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="usesScrollButtons">
|
||||
<bool>true</bool>
|
||||
|
|
|
@ -64,7 +64,7 @@ void EnvironmentShortcutModel::reload()
|
|||
beginResetModel();
|
||||
mShortcuts.clear();
|
||||
QList<QMenu*> menus = pMainWindow->menuBar()->findChildren<QMenu*>();
|
||||
QList<QAction*> actions = pMainWindow->findChildren<QAction*>(QString(), Qt::FindDirectChildrenOnly);
|
||||
QList<QAction*> actions = pMainWindow->listShortCutableActions();
|
||||
foreach( const QMenu* menu, menus) {
|
||||
if (menu->title().isEmpty())
|
||||
continue;
|
||||
|
|
|
@ -22,8 +22,3 @@ CustomFileSystemModel::CustomFileSystemModel(QObject *parent) : QFileSystemModel
|
|||
{
|
||||
}
|
||||
|
||||
QVariant CustomFileSystemModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
return QFileSystemModel::data(index,role);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include <QFileSystemModel>
|
||||
|
||||
|
||||
class GitRepository;
|
||||
class GitManager;
|
||||
class CustomFileSystemModel : public QFileSystemModel
|
||||
|
@ -28,9 +27,6 @@ class CustomFileSystemModel : public QFileSystemModel
|
|||
public:
|
||||
explicit CustomFileSystemModel(QObject *parent = nullptr);
|
||||
|
||||
// QAbstractItemModel interface
|
||||
public:
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
};
|
||||
|
||||
#endif // CUSTOMFILESYSTEMMODEL_H
|
||||
|
|
Loading…
Reference in New Issue