]> git.siccegge.de Git - frida/frida.git/commitdiff
Update for Qt 5
authorChristoph Egger <christoph@christoph-egger.org>
Mon, 10 Feb 2014 15:52:39 +0000 (16:52 +0100)
committerChristoph Egger <christoph@christoph-egger.org>
Mon, 10 Feb 2014 15:52:39 +0000 (16:52 +0100)
src/gui/Mainwindow.cxx
src/gui/Mainwindow.h++ [deleted file]
src/gui/Mainwindow.hxx [new file with mode: 0644]
src/main.cxx

index 412c42400f4170d06457edc400efebd70bd7b9ff..790c1a306bbba59020383a311c8b59acae5dfe8d 100644 (file)
@@ -1,9 +1,20 @@
-#include "Mainwindow.h++"
+#include "Mainwindow.hxx"
 
 #include <iostream>
 #include <sstream>
 
 #include <QtGui>
+#include <QAction>
+#include <QMenuBar>
+#include <QMenu>
+#include <QDockWidget>
+#include <QMessageBox>
+#include <QFileDialog>
+#include <QTableWidget>
+#include <QHeaderView>
+#include <QGraphicsScene>
+#include <QGraphicsItem>
+#include <QGraphicsView>
 
 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 (file)
index 46a6676..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "include.hxx"
-
-#include <QTextEdit>
-#include <QPushButton>
-#include <QMainWindow>
-#include <QListWidget>
-#include <QStackedWidget>
-
-#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 (file)
index 0000000..46a6676
--- /dev/null
@@ -0,0 +1,34 @@
+#include "include.hxx"
+
+#include <QTextEdit>
+#include <QPushButton>
+#include <QMainWindow>
+#include <QListWidget>
+#include <QStackedWidget>
+
+#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();
+};
index 3a60a9974fc16e5b35bf1c3cdae77845208b551a..b23eb8860d1841551e2ce43a145f2d2ec09e4498 100644 (file)
@@ -7,7 +7,7 @@
 #include <QTextEdit>
 
 #include "Binary.hxx"
-#include "gui/Mainwindow.h++"
+#include "gui/Mainwindow.hxx"
 
 using std::cout;
 using std::cin;