diff --git a/src/MainWindow.h b/src/MainWindow.h index 7da72bc5..634920cd 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -186,6 +186,8 @@ private slots: private: CutterCore *core; + PreviewWidget *previewDock; + Notepad *notepadDock; DisassemblyWidget *disassemblyDock; SidebarWidget *sidebarDock; HexdumpWidget *hexdumpDock; @@ -195,8 +197,6 @@ private: QDockWidget *calcDock; Omnibar *omnibar; SideBar *sideBar; - PreviewWidget *previewDock; - Notepad *notepadDock; Configuration *configuration; bool doLock; diff --git a/src/dialogs/AsmOptionsDialog.cpp b/src/dialogs/AsmOptionsDialog.cpp index e64c867a..84f91d27 100644 --- a/src/dialogs/AsmOptionsDialog.cpp +++ b/src/dialogs/AsmOptionsDialog.cpp @@ -9,8 +9,8 @@ AsmOptionsDialog::AsmOptionsDialog(QWidget *parent) : QDialog(parent), - ui(new Ui::AsmOptionsDialog), - core(CutterCore::getInstance()) + core(CutterCore::getInstance()), + ui(new Ui::AsmOptionsDialog) { ui->setupUi(this); diff --git a/src/dialogs/OptionsDialog.cpp b/src/dialogs/OptionsDialog.cpp index 4769d04b..151b8919 100644 --- a/src/dialogs/OptionsDialog.cpp +++ b/src/dialogs/OptionsDialog.cpp @@ -12,12 +12,13 @@ #include #include +// TODO Get rid of MainWindow OptionsDialog::OptionsDialog(MainWindow *main): QDialog(0), // parent may not be main analThread(this), - defaultAnalLevel(1), - core(CutterCore::getInstance()), main(main), + core(CutterCore::getInstance()), + defaultAnalLevel(1), ui(new Ui::OptionsDialog) { ui->setupUi(this); diff --git a/src/dialogs/XrefsDialog.cpp b/src/dialogs/XrefsDialog.cpp index f4261875..e69cbcbe 100644 --- a/src/dialogs/XrefsDialog.cpp +++ b/src/dialogs/XrefsDialog.cpp @@ -79,7 +79,6 @@ void XrefsDialog::on_fromTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int Q_UNUSED(column); XrefDescription xref = item->data(0, Qt::UserRole).value(); - RAnalFunction *fcn = this->core->functionAt(xref.to); Core()->seek(xref.to); this->close(); } @@ -89,7 +88,6 @@ void XrefsDialog::on_toTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int c Q_UNUSED(column); XrefDescription xref = item->data(0, Qt::UserRole).value(); - RAnalFunction *fcn = this->core->functionAt(xref.from); Core()->seek(xref.from); this->close(); } diff --git a/src/main.cpp b/src/main.cpp index 981679a5..796a2971 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,7 +14,7 @@ #include #include -void set_appimage_symlink(char* argv0) +void set_appimage_symlink() { char* path = realpath("/proc/self/exe", NULL); char* i = strrchr(path, '/'); @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) // Hack to make it work with AppImage #ifdef __unix__ - set_appimage_symlink(argv[0]); + set_appimage_symlink(); #endif int ret = a.exec(); diff --git a/src/widgets/DisassemblerGraphView.cpp b/src/widgets/DisassemblerGraphView.cpp index 47c4e969..a836e61a 100644 --- a/src/widgets/DisassemblerGraphView.cpp +++ b/src/widgets/DisassemblerGraphView.cpp @@ -547,6 +547,7 @@ duint DisassemblerGraphView::getInstrForMouseEvent(QMouseEvent* event) bool DisassemblerGraphView::getTokenForMouseEvent(QMouseEvent* event, Token & tokenOut) { Q_UNUSED(event); + Q_UNUSED(tokenOut); /* TODO //Convert coordinates to system used in blocks int xofs = this->horizontalScrollBar()->value(); diff --git a/src/widgets/SidebarWidget.cpp b/src/widgets/SidebarWidget.cpp index 1fc4d1b8..572f7597 100644 --- a/src/widgets/SidebarWidget.cpp +++ b/src/widgets/SidebarWidget.cpp @@ -147,6 +147,7 @@ void SidebarWidget::get_refs_data(RVA addr) void SidebarWidget::fill_refs(QList refs, QList xrefs, QList graph_data) { + Q_UNUSED(graph_data); this->xreFromTreeWidget_2->clear(); for (int i = 0; i < refs.size(); ++i) { @@ -244,4 +245,4 @@ void SidebarWidget::setScrollMode() { qhelpers::setVerticalScrollMode(ui->xreFromTreeWidget_2); qhelpers::setVerticalScrollMode(ui->xrefToTreeWidget_2); -} \ No newline at end of file +}