diff options
| author | KyleMiles <krm504@nyu.edu> | 2022-01-27 22:43:28 -0500 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2022-01-28 00:24:06 -0500 |
| commit | 6812c973c9fa9b4ad642ab81856c05f87bd6fcc4 (patch) | |
| tree | dace4156d03148bcaf02df138ab4e0d93e61bc6f /ui/typedialog.h | |
| parent | 519c9db22367f2659d1a54599fab47e6313be06e (diff) | |
Format All Files
Diffstat (limited to 'ui/typedialog.h')
| -rw-r--r-- | ui/typedialog.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/ui/typedialog.h b/ui/typedialog.h index 76931d13..2f171b21 100644 --- a/ui/typedialog.h +++ b/ui/typedialog.h @@ -6,7 +6,7 @@ #include <QtWidgets/QComboBox> #include <QtCore/QTimer> #ifndef BINARYNINJAUI_BINDINGS -#include <QtCore/QThread> + #include <QtCore/QThread> #endif #include "binaryninjaapi.h" #include "uitypes.h" @@ -17,7 +17,7 @@ class GetTypesListThread; class ParseTypeThread; #else -class BINARYNINJAUIAPI GetTypesListThread: public QThread +class BINARYNINJAUIAPI GetTypesListThread : public QThread { Q_OBJECT @@ -27,10 +27,10 @@ class BINARYNINJAUIAPI GetTypesListThread: public QThread bool m_done; BinaryViewRef m_view; -protected: + protected: virtual void run() override; -public: + public: GetTypesListThread(BinaryViewRef view, const std::function<void()>& completeFunc); void cancel(); @@ -40,7 +40,8 @@ public: Q_DECLARE_METATYPE(BinaryNinja::QualifiedNameAndType); //! QThread subclass for handling type string parsing to avoid UI interruptions. -class ParseTypeThread: public QThread { +class ParseTypeThread : public QThread +{ Q_OBJECT BinaryViewRef m_view; @@ -48,16 +49,16 @@ class ParseTypeThread: public QThread { void run() override; -Q_SIGNALS: + Q_SIGNALS: void parsingComplete(bool valid, BinaryNinja::QualifiedNameAndType type, QString error); -public: + public: ParseTypeThread(BinaryViewRef view, QString text); void cancel(); }; #endif -class BINARYNINJAUIAPI TypeDialog: public QDialog +class BINARYNINJAUIAPI TypeDialog : public QDialog { Q_OBJECT @@ -84,15 +85,15 @@ class BINARYNINJAUIAPI TypeDialog: public QDialog void commitHistory(); void customEvent(QEvent* event); -private Q_SLOTS: + private Q_SLOTS: void accepted(); void checkParse(); void typeParsed(bool valid, BinaryNinja::QualifiedNameAndType type, QString error); void updateTimerEvent(); -public: + public: TypeDialog(QWidget* parent, BinaryViewRef view, const QString& title = "Specify Type", - const QString& prompt = "Enter Type Name", const QString& existing=""); + const QString& prompt = "Enter Type Name", const QString& existing = ""); ~TypeDialog() { delete m_updateThread; } BinaryNinja::QualifiedNameAndType getType() const { return m_type; } }; |
