Allow UI Running through MainWindow
Required for Unit testing to be able to trigger test running via the
run-dialog
MODIFY
src/mainwindow.cpp
src/mainwindow.cpp
@@ -60,6 +60,11 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), m_ui(new Ui::Main
connect(m_ui->stackedWidget, &QStackedWidget::currentChanged, m_ui->memorytab, &MemoryTab::update);
}
+void MainWindow::run() {
+ // Function for triggering the run dialog from unit tests
+ m_ui->processortab->on_run_clicked();
+}
+
MainWindow::~MainWindow() {
delete m_ui;
}

MODIFY
src/mainwindow.h
src/mainwindow.h
@@ -19,6 +19,8 @@ public:
void loadBinaryFile(QString fileName);
void loadAssemblyFile(QString fileName);
+ void run();
+
private slots:
void on_actionexit_triggered();

MODIFY
src/processortab.h
src/processortab.h
@@ -29,11 +29,11 @@ public:
public slots:
void restart();
+ void on_run_clicked();
private slots:
void on_expandView_clicked();
void on_displayValues_toggled(bool checked);
- void on_run_clicked();
void on_reset_clicked();
void on_step_clicked();
void toggleTimer(bool state);

Allow UI Running through MainWindow

Required for Unit testing to be able to trigger test running via the
run-dialog