mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +00:00
Fix #146
This commit is contained in:
parent
b331dfd083
commit
e4fe1e180d
@ -310,7 +310,9 @@ void MainWindow::openNewFile(const QString &fn, int anal_level, QList<QString> a
|
||||
o->show();
|
||||
|
||||
if (anal_level >= 0)
|
||||
{
|
||||
o->setupAndStartAnalysis(anal_level, advanced);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::openProject(const QString &project_name)
|
||||
|
@ -311,8 +311,6 @@ void NewFileDialog::loadFile(const QString &filename)
|
||||
// Close dialog and open MainWindow/OptionsDialog
|
||||
MainWindow *main = new MainWindow();
|
||||
main->openNewFile(filename);
|
||||
//OptionsDialog *o = new OptionsDialog(fname);
|
||||
//o->exec();
|
||||
|
||||
close();
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ OptionsDialog::OptionsDialog(MainWindow *main):
|
||||
//this->layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
connect(&analThread, SIGNAL(finished()), this, SLOT(anal_finished()));
|
||||
connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
|
||||
ui->programLineEdit->setText(main->getFilename());
|
||||
QFileInfo fi(this->main->getFilename());
|
||||
@ -149,11 +150,6 @@ void OptionsDialog::updateProgress(const QString &status)
|
||||
ui->statusLabel->setText(status);
|
||||
}
|
||||
|
||||
void OptionsDialog::on_closeButton_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void OptionsDialog::on_okButton_clicked()
|
||||
{
|
||||
QList<QString> advanced = QList<QString>();
|
||||
@ -225,17 +221,6 @@ void OptionsDialog::anal_finished()
|
||||
close();
|
||||
}
|
||||
|
||||
void OptionsDialog::on_cancelButton_clicked()
|
||||
{
|
||||
//delete this->core;
|
||||
//this->core = NULL;
|
||||
// Close dialog and open OptionsDialog
|
||||
delete main;
|
||||
close();
|
||||
NewFileDialog *n = new NewFileDialog(nullptr);
|
||||
n->show();
|
||||
}
|
||||
|
||||
QString OptionsDialog::analysisDescription(int level)
|
||||
{
|
||||
//TODO: replace this with meaningful descriptions
|
||||
@ -326,3 +311,11 @@ void OptionsDialog::on_pdbSelectButton_clicked()
|
||||
ui->pdbLineEdit->setText(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
void OptionsDialog::reject()
|
||||
{
|
||||
delete main;
|
||||
done(0);
|
||||
NewFileDialog *n = new NewFileDialog(nullptr);
|
||||
n->show();
|
||||
}
|
||||
|
@ -25,9 +25,7 @@ public:
|
||||
public slots:
|
||||
void updateProgress(const QString &str);
|
||||
private slots:
|
||||
void on_closeButton_clicked();
|
||||
void on_okButton_clicked();
|
||||
void on_cancelButton_clicked();
|
||||
void on_analSlider_valueChanged(int value);
|
||||
void on_AdvOptButton_clicked();
|
||||
void on_analCheckBox_clicked(bool checked);
|
||||
@ -53,6 +51,7 @@ public:
|
||||
QString getSelectedCPU();
|
||||
int getSelectedBits();
|
||||
QString getSelectedOS();
|
||||
void reject() override;
|
||||
};
|
||||
|
||||
#endif // OPTIONSDIALOG_H
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>1143</height>
|
||||
<height>1179</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -859,13 +859,6 @@
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="closeButton">
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
@ -914,8 +907,6 @@
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
Loading…
Reference in New Issue
Block a user