Fix regression introduced in 0317cf2663

* Graphs are working again
* Multiple instances not working
* MainWindow was creating a new core, as well as OptionDialog
This commit is contained in:
pancake 2017-04-03 23:02:47 +02:00
parent a8f644dcf4
commit 360407f453
3 changed files with 5 additions and 5 deletions

View File

@ -58,12 +58,13 @@ static void appendRow(QTreeWidget *tw, const QString &str, const QString &str2=N
tw->insertTopLevelItem(0, tempItem); tw->insertTopLevelItem(0, tempItem);
} }
MainWindow::MainWindow(QWidget *parent) : MainWindow::MainWindow(QWidget *parent, QRCore *kore) :
QMainWindow(parent), QMainWindow(parent),
core(new QRCore()), core(kore),
ui(new Ui::MainWindow), ui(new Ui::MainWindow),
webserverThread(core, this) webserverThread(core, this)
{ {
this->start_web_server();
ui->setupUi(this); ui->setupUi(this);
doLock = false; doLock = false;

View File

@ -56,7 +56,7 @@ public:
bool responsive; bool responsive;
explicit MainWindow(QWidget *parent = 0); explicit MainWindow(QWidget *parent = 0, QRCore *kore = nullptr);
~MainWindow(); ~MainWindow();
void start_web_server(); void start_web_server();

View File

@ -84,8 +84,7 @@ void OptionsDialog::on_okButton_clicked()
//ui->progressBar->setValue(5); //ui->progressBar->setValue(5);
// Close dialog and open OptionsDialog // Close dialog and open OptionsDialog
this->w = new MainWindow(nullptr); this->w = new MainWindow(0, this->core);
this->w->core = this->core;
// Fill asm plugins in hexdump combo // Fill asm plugins in hexdump combo
this->w->memoryDock->fillPlugins(this->asm_plugins); this->w->memoryDock->fillPlugins(this->asm_plugins);