From: Christoph Egger Date: Mon, 10 Feb 2014 15:52:39 +0000 (+0100) Subject: Update for Qt 5 X-Git-Tag: v0.1~228 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=26c4bd3156495d5c6d18e51b06c19e8c6eea62d0;p=frida%2Ffrida.git Update for Qt 5 --- diff --git a/src/gui/Mainwindow.cxx b/src/gui/Mainwindow.cxx index 412c424..790c1a3 100644 --- a/src/gui/Mainwindow.cxx +++ b/src/gui/Mainwindow.cxx @@ -1,9 +1,20 @@ -#include "Mainwindow.h++" +#include "Mainwindow.hxx" #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { @@ -75,7 +86,7 @@ void Mainwindow::populateSymbolInformation(const std::string& sym) { // Listing QTableWidget * t = new QTableWidget(); t->setColumnCount(3); - t->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); + t->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); curBin->for_each_instruction(sym, [&t](long add, std::string bytes, std::string mnemonic) { int row = t->rowCount(); std::stringstream s; @@ -97,8 +108,6 @@ void Mainwindow::populateSymbolInformation(const std::string& sym) { QGraphicsView * view = new QGraphicsView(scene); w->addTab(view, "CFG"); - - listWidget->addItem(sym.c_str()); stackedWidget->addWidget(w); } diff --git a/src/gui/Mainwindow.h++ b/src/gui/Mainwindow.h++ deleted file mode 100644 index 46a6676..0000000 --- a/src/gui/Mainwindow.h++ +++ /dev/null @@ -1,34 +0,0 @@ -#include "include.hxx" - -#include -#include -#include -#include -#include - -#include "Binary.hxx" - -class Mainwindow : public QMainWindow { - Q_OBJECT -public: - Mainwindow(); -private: - void populateSymbolInformation(const std::string& sym); - - QTextEdit *textEdit; - QPushButton *quitButton; - QMenu *fileMenu; - - QTabWidget * tabwidget; - QListWidget * listWidget; - QStackedWidget * stackedWidget; - QDockWidget * dockWidget; - - QAction *exitAction; - QAction *openAction; - - qtlldb::Binary * curBin; -private slots: - void quit(); - void open(); -}; diff --git a/src/gui/Mainwindow.hxx b/src/gui/Mainwindow.hxx new file mode 100644 index 0000000..46a6676 --- /dev/null +++ b/src/gui/Mainwindow.hxx @@ -0,0 +1,34 @@ +#include "include.hxx" + +#include +#include +#include +#include +#include + +#include "Binary.hxx" + +class Mainwindow : public QMainWindow { + Q_OBJECT +public: + Mainwindow(); +private: + void populateSymbolInformation(const std::string& sym); + + QTextEdit *textEdit; + QPushButton *quitButton; + QMenu *fileMenu; + + QTabWidget * tabwidget; + QListWidget * listWidget; + QStackedWidget * stackedWidget; + QDockWidget * dockWidget; + + QAction *exitAction; + QAction *openAction; + + qtlldb::Binary * curBin; +private slots: + void quit(); + void open(); +}; diff --git a/src/main.cxx b/src/main.cxx index 3a60a99..b23eb88 100644 --- a/src/main.cxx +++ b/src/main.cxx @@ -7,7 +7,7 @@ #include #include "Binary.hxx" -#include "gui/Mainwindow.h++" +#include "gui/Mainwindow.hxx" using std::cout; using std::cin;