@@ -196,13 +196,15 @@ Fhex::Fhex(QWidget *parent, QApplication *app, QString filepath)
196196 QAction *escapeHex = new QAction (" Hex Strin&g Manipulation" , this );
197197 escapeHex->setShortcut (QKeySequence (Qt::Key_F3));
198198 tools->addAction (escapeHex);
199+ #ifndef MINIMAL
199200 QAction *fasm = new QAction (QIcon::fromTheme (" map-flat" ), " &Assembler/Disassembler" , this );
200201 fasm->setShortcut (QKeySequence (Qt::Key_F4));
201202 tools->addAction (fasm);
202-
203+ connect (fasm, &QAction::triggered, this , &Fhex::on_menu_fasm_click);
204+ #endif
203205 connect (hexDec, &QAction::triggered, this , &Fhex::on_menu_hex_dec_converter_click);
204206 connect (escapeHex, &QAction::triggered, this , &Fhex::on_menu_escape_hex_click);
205- connect (fasm, &QAction::triggered, this , &Fhex::on_menu_fasm_click);
207+
206208
207209 QMenu *help;
208210 help = menuBar ()->addMenu (" &Help" );
@@ -351,8 +353,9 @@ Fhex::Fhex(QWidget *parent, QApplication *app, QString filepath)
351353
352354 this ->statusBar .setText (" Fhex loaded" );
353355 this ->setCentralWidget (mainWidget);
356+ #ifndef MINIMAL
354357 this ->fasm = nullptr ;
355-
358+ # endif
356359 // If a filepath was passed as argument, open it
357360 if (filepath != " " ) {
358361 this ->loadFile (filepath);
@@ -368,9 +371,11 @@ Fhex::Fhex(QWidget *parent, QApplication *app, QString filepath)
368371Fhex::~Fhex ()
369372{
370373 delete this ->hexEditor ;
374+ #ifndef MINIMAL
371375 if (this ->fasm != nullptr ) {
372376 delete this ->fasm ;
373377 }
378+ #endif
374379}
375380
376381void Fhex::on_menu_find_patterns_click () {
@@ -499,6 +504,7 @@ void Fhex::on_menu_about_click() {
499504 newWindow->show ();
500505}
501506
507+ #ifndef MINIMAL
502508void Fhex::on_menu_fasm_click () {
503509 if (fasm != nullptr ) {
504510 delete fasm;
@@ -507,6 +513,7 @@ void Fhex::on_menu_fasm_click() {
507513 fasm = new Fasm (this ->qhex ->selectedData ());
508514 fasm->show ();
509515}
516+ #endif
510517
511518void Fhex::on_menu_offset_list_click () {
512519 this ->listOffsets ->setVisible (!this ->listOffsets ->isVisible ());
0 commit comments