mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-19 10:58:51 +00:00
Fix dont open any file option
This commit is contained in:
parent
125006b1c2
commit
c0fe9e2c3f
@ -36,7 +36,7 @@ void AnalTask::runTask()
|
|||||||
|
|
||||||
// Do not reload the file if already loaded
|
// Do not reload the file if already loaded
|
||||||
QJsonArray openedFiles = Core()->getOpenedFiles();
|
QJsonArray openedFiles = Core()->getOpenedFiles();
|
||||||
if (!openedFiles.size()) {
|
if (!openedFiles.size() && options.filename.length()) {
|
||||||
bool fileLoaded = Core()->loadFile(options.filename,
|
bool fileLoaded = Core()->loadFile(options.filename,
|
||||||
options.binLoadAddr,
|
options.binLoadAddr,
|
||||||
options.mapAddr,
|
options.mapAddr,
|
||||||
@ -47,7 +47,7 @@ void AnalTask::runTask()
|
|||||||
if (!fileLoaded) {
|
if (!fileLoaded) {
|
||||||
// Something wrong happened, fallback to open dialog
|
// Something wrong happened, fallback to open dialog
|
||||||
emit openFileFailed();
|
emit openFileFailed();
|
||||||
AsyncTask::interrupt();
|
interrupt();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,8 +60,8 @@ void AnalTask::runTask()
|
|||||||
Core()->cmd("e asm.os=" + options.os);
|
Core()->cmd("e asm.os=" + options.os);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load PDB and/or scripts
|
|
||||||
if (!options.pdbFile.isNull()) {
|
if (!options.pdbFile.isNull()) {
|
||||||
|
log(tr("Loading PDB file...\n"));
|
||||||
Core()->loadPDB(options.pdbFile);
|
Core()->loadPDB(options.pdbFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,6 +70,7 @@ void AnalTask::runTask()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!options.script.isNull()) {
|
if (!options.script.isNull()) {
|
||||||
|
log(tr("Executing script...\n"));
|
||||||
Core()->loadScript(options.script);
|
Core()->loadScript(options.script);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
#include "widgets/HeadersWidget.h"
|
#include "widgets/HeadersWidget.h"
|
||||||
#include "widgets/ZignaturesWidget.h"
|
#include "widgets/ZignaturesWidget.h"
|
||||||
|
|
||||||
// graphics
|
// Graphics
|
||||||
#include <QGraphicsEllipseItem>
|
#include <QGraphicsEllipseItem>
|
||||||
#include <QGraphicsScene>
|
#include <QGraphicsScene>
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
|
Loading…
Reference in New Issue
Block a user