minor interface improvements

This commit is contained in:
mrexodia 2017-04-09 22:36:17 +02:00
parent 0ba4c510f9
commit 24fd1577e2
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
5 changed files with 12 additions and 10 deletions

View File

@ -1073,8 +1073,8 @@ void MainWindow::add_debug_output(QString msg)
void MainWindow::on_actionNew_triggered()
{
close();
on_actionLoad_triggered();
if(close())
on_actionLoad_triggered();
}
void MainWindow::on_actionSave_triggered()
@ -1095,6 +1095,8 @@ void MainWindow::on_actionRun_Script_triggered()
QString fileName;
fileName = dialog.getOpenFileName(this, "Select radare2 script");
if(!fileName.length()) //cancel was pressed
return;
qDebug() << "Meow: " + fileName;
this->core->cmd(". " + fileName);

View File

@ -98,7 +98,7 @@ void NewFileDialog::on_loadFileButton_clicked()
QFileInfo checkfile(fname);
if (!checkfile.exists() || !checkfile.isFile())
{
QMessageBox msgBox;
QMessageBox msgBox(this);
msgBox.setText("Select a new program or a previous one\nbefore continue");
msgBox.exec();
}
@ -183,7 +183,7 @@ void NewFileDialog::on_createButton_clicked()
{
// Close dialog and open create new file dialog
close();
createNewDialog *n = new createNewDialog(this);
createNewDialog *n = new createNewDialog(nullptr);
n->exec();
}

View File

@ -273,7 +273,7 @@ void OptionsDialog::on_cancelButton_clicked()
this->core = NULL;
// Close dialog and open OptionsDialog
close();
NewFileDialog *n = new NewFileDialog(this);
NewFileDialog *n = new NewFileDialog(nullptr);
n->show();
}

View File

@ -164,7 +164,7 @@ void Dashboard::updateContents()
QFile html(":/html/stats.html");
if (!html.open(QIODevice::ReadOnly))
{
QMessageBox::information(0, "error", html.errorString());
QMessageBox::information(this, "error", html.errorString());
}
QString code = html.readAll();
html.close();
@ -177,7 +177,7 @@ void Dashboard::updateContents()
QFile html2(":/html/radar.html");
if (!html2.open(QIODevice::ReadOnly))
{
QMessageBox::information(0, "error", html2.errorString());
QMessageBox::information(this, "error", html2.errorString());
}
QString code2 = html2.readAll();
html2.close();

View File

@ -1460,7 +1460,7 @@ void MemoryWidget::fill_refs(QList<QStringList> refs, QList<QStringList> xrefs,
QFile html(":/html/fcn_graph.html");
if (!html.open(QIODevice::ReadOnly))
{
QMessageBox::information(0, "error", html.errorString());
QMessageBox::information(this, "error", html.errorString());
}
QString code = html.readAll();
html.close();
@ -1473,7 +1473,7 @@ void MemoryWidget::fill_refs(QList<QStringList> refs, QList<QStringList> xrefs,
QFile html2(":/html/fcn_radar.html");
if (!html2.open(QIODevice::ReadOnly))
{
QMessageBox::information(0, "error", html.errorString());
QMessageBox::information(this, "error", html.errorString());
}
QString code2 = html2.readAll();
html2.close();
@ -1644,7 +1644,7 @@ void MemoryWidget::setMiniGraph(QString at)
QFile html(":/html/graph.html");
if (!html.open(QIODevice::ReadOnly))
{
QMessageBox::information(0, "error", html.errorString());
QMessageBox::information(this, "error", html.errorString());
}
QString code = html.readAll();
html.close();