}
void Mainwindow::open() {
- QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), "",
- tr("Binaries (*)"));
- manager->reset(fileName.toStdString());
+ QFileDialog dialog(this, tr("Open bianry"), "", tr("Binaries (*)"));
+
+ if (dialog.exec()) {
+ QStringList files = dialog.selectedFiles();
+ if(1 != files.size()) {
+ LOG4CXX_ERROR(logger, "Needs exactly one file name")
+ } else {
+ manager->reset(files[0].toStdString());
+ }
+ }
}
void Mainwindow::load() {
- QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), "",
- tr("Frida Archives (*.frida)"));
- manager->load(fileName.toStdString());
+ QFileDialog dialog(this, tr("Open saved FrIDa file"), "", tr("Frida Archives (*.frida)"));
+
+ if (dialog.exec()) {
+ QStringList files = dialog.selectedFiles();
+ if(1 != files.size()) {
+ LOG4CXX_ERROR(logger, "Needs exactly one file name")
+ } else {
+ manager->load(files[0].toStdString());
+ }
+ }
}
void Mainwindow::save() {