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