"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/dialogs/OpenFileDialog.cpp" between
cutter-1.10.2.tar.gz and cutter-1.10.3.tar.gz

About: cutter is a Qt and C++ GUI for radare2 reverse engineering framework.

OpenFileDialog.cpp  (cutter-1.10.2):OpenFileDialog.cpp  (cutter-1.10.3)
#include "OpenFileDialog.h" #include "MapFileDialog.h"
#include "ui_OpenFileDialog.h" #include "ui_MapFileDialog.h"
#include "common/Configuration.h" #include "common/Configuration.h"
#include <QFileDialog> #include <QFileDialog>
OpenFileDialog::OpenFileDialog(QWidget *parent): MapFileDialog::MapFileDialog(QWidget *parent):
QDialog(parent), QDialog(parent),
ui(new Ui::OpenFileDialog) ui(new Ui::MapFileDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
} }
OpenFileDialog::~OpenFileDialog() {} MapFileDialog::~MapFileDialog() {}
void OpenFileDialog::on_selectFileButton_clicked() void MapFileDialog::on_selectFileButton_clicked()
{ {
QString currentDir = Config()->getRecentFolder(); QString currentDir = Config()->getRecentFolder();
QString fileName = QFileDialog::getOpenFileName(this, tr("Select file"), cur rentDir); QString fileName = QFileDialog::getOpenFileName(this, tr("Select file"), cur rentDir);
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
ui->filenameLineEdit->setText(fileName); ui->filenameLineEdit->setText(fileName);
Config()->setRecentFolder(QFileInfo(fileName).absolutePath()); Config()->setRecentFolder(QFileInfo(fileName).absolutePath());
} }
} }
void OpenFileDialog::on_buttonBox_accepted() void MapFileDialog::on_buttonBox_accepted()
{ {
const QString &filePath = QDir::toNativeSeparators(ui->filenameLineEdit->tex t()); const QString &filePath = QDir::toNativeSeparators(ui->filenameLineEdit->tex t());
RVA mapAddress = RVA_INVALID; RVA mapAddress = RVA_INVALID;
QString mapAddressStr = ui->mapAddressLineEdit->text(); QString mapAddressStr = ui->mapAddressLineEdit->text();
if (!mapAddressStr.isEmpty()) { if (!mapAddressStr.isEmpty()) {
mapAddress = Core()->math(mapAddressStr); mapAddress = Core()->math(mapAddressStr);
} }
if (!Core()->openFile(filePath, mapAddress)) { if (!Core()->mapFile(filePath, mapAddress)) {
QMessageBox::critical(this, tr("Open file"), tr("Failed to open file")); QMessageBox::critical(this, tr("Map new file file"), tr("Failed to map a
new file"));
return; return;
} }
close(); close();
} }
void OpenFileDialog::on_buttonBox_rejected() void MapFileDialog::on_buttonBox_rejected()
{ {
close(); close();
} }
 End of changes. 8 change blocks. 
10 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)