summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2022-11-14 11:17:45 -0500
committerGlenn Smith <glenn@vector35.com>2022-11-14 11:17:45 -0500
commit60d3b2710fe19562575807aba006987b4629295e (patch)
tree777c18cb2d35a1fc53ba019e62fcbacc1041d325
parent9912e2bdbc73c4984b94c1f8854ad7b960f5b252 (diff)
Revert "Show filtered/total count in search"
This reverts commit 78a4c923fe3fd5790e03e2c963e0a519d8c2b93b.
-rw-r--r--ui/filter.h5
-rw-r--r--ui/stringsview.h4
-rw-r--r--ui/symbollist.h2
-rw-r--r--ui/taglist.h4
-rw-r--r--ui/typeview.h38
5 files changed, 20 insertions, 33 deletions
diff --git a/ui/filter.h b/ui/filter.h
index 17466a84..006b92de 100644
--- a/ui/filter.h
+++ b/ui/filter.h
@@ -36,16 +36,12 @@ class BINARYNINJAUIAPI FilterEdit : public QLineEdit
Q_OBJECT
FilterTarget* m_target;
- QString m_rightText;
public:
FilterEdit(FilterTarget* target);
- const QString& rightText() const { return m_rightText; }
- void setRightText(const QString& text);
protected:
virtual void keyPressEvent(QKeyEvent* event) override;
- virtual void paintEvent(QPaintEvent* event) override;
};
/*!
@@ -66,7 +62,6 @@ class BINARYNINJAUIAPI FilteredView : public QWidget
void updateFonts();
void clearFilter();
void showFilter(const QString& initialText);
- void showRightText(const QString& text);
static bool match(const std::string& name, const std::string& filter);
diff --git a/ui/stringsview.h b/ui/stringsview.h
index 35a7b73a..100a496f 100644
--- a/ui/stringsview.h
+++ b/ui/stringsview.h
@@ -77,7 +77,6 @@ class BINARYNINJAUIAPI StringsListModel : public QAbstractItemModel, public Bina
size_t getFilteredStringCount() const { return m_filteredByOptions; }
size_t getStringCount() const { return m_strings.size(); }
- size_t getUnfilteredStringCount() const { return m_allStrings.size(); }
void toggleIncludeStringsOverlappingCode() { m_includeStringsOverlappingCode = !m_includeStringsOverlappingCode; };
void toggleIncludeOnlyReferenced() { m_includeOnlyReferenced = !m_includeOnlyReferenced; };
@@ -90,9 +89,6 @@ class BINARYNINJAUIAPI StringsListModel : public QAbstractItemModel, public Bina
bool getIncludeStringsOverlappingCode() const { return m_includeStringsOverlappingCode; };
bool getIncludeOnlyReferenced() const { return m_includeOnlyReferenced; };
bool getIncludeOnlyFromCurrentFunction() const { return m_includeOnlyFromCurrentFunction; };
-
-Q_SIGNALS:
- void updateCount();
};
/*!
diff --git a/ui/symbollist.h b/ui/symbollist.h
index 8fad740e..5a7b1c1d 100644
--- a/ui/symbollist.h
+++ b/ui/symbollist.h
@@ -261,7 +261,6 @@ class BINARYNINJAUIAPI SymbolListModel : public QAbstractItemModel, public Binar
void updateFunctions();
void backgroundUpdate();
bool hasSymbols() const;
- size_t getUnfilteredCount() const;
void setFilter(const std::string& filter);
void showExportedDataVars(bool show) { m_showExportedDataVars = show; }
@@ -295,7 +294,6 @@ class BINARYNINJAUIAPI SymbolListModel : public QAbstractItemModel, public Binar
Q_SIGNALS:
void afterListReset();
void beforeListReset();
- void updateCount();
};
/*!
diff --git a/ui/taglist.h b/ui/taglist.h
index 76a4d396..9b3198d4 100644
--- a/ui/taglist.h
+++ b/ui/taglist.h
@@ -73,8 +73,6 @@ class BINARYNINJAUIAPI TagListModel : public QAbstractItemModel
bool setModelData(const std::vector<std::pair<TagTypeRef, std::vector<BinaryNinja::TagReference>>>& refs,
QItemSelectionModel* selectionModel, int sortColumn, Qt::SortOrder sortOrder, bool& selectionUpdated);
-Q_SIGNALS:
- void updateCount();
};
/*!
@@ -120,8 +118,6 @@ class BINARYNINJAUIAPI TagList : public QTreeView, public BinaryNinja::BinaryDat
FilteredView* m_filterView;
Menu* m_menu;
std::unordered_map<std::string, bool> m_expandedItems;
- size_t m_allRefsCount;
- size_t m_filteredRefsCount;
public:
typedef std::function<bool(const BinaryNinja::TagReference&)> FilterFn;
diff --git a/ui/typeview.h b/ui/typeview.h
index 8744ffa7..1aa89cc8 100644
--- a/ui/typeview.h
+++ b/ui/typeview.h
@@ -18,7 +18,6 @@
#include "menus.h"
#include "xreflist.h"
#include "clickablelabel.h"
-#include "filter.h"
#define TYPE_VIEW_UPDATE_CHECK_INTERVAL 200
@@ -222,9 +221,6 @@ class BINARYNINJAUIAPI TypeView : public QAbstractScrollArea, public View, publi
virtual void setNavigationMode(std::string mode) override;
virtual std::vector<std::string> getNavigationModes() override;
- size_t getUnfilteredTypeCount() const { return m_allTypeLines.size(); }
- size_t getFilteredTypeCount() const { return m_typeLines.size(); }
-
uint64_t findMatchingLine(const BinaryNinja::QualifiedName& name, uint64_t offset, size_t& cursorOffset);
bool navigateToType(const std::string& name, uint64_t offset = 0);
@@ -291,9 +287,6 @@ class BINARYNINJAUIAPI TypeView : public QAbstractScrollArea, public View, publi
virtual void mouseDoubleClickEvent(QMouseEvent* event) override;
virtual void scrollContentsBy(int dx, int dy) override;
- Q_SIGNALS:
- void updateCount();
-
private Q_SLOTS:
void copySelection();
void selectAll();
@@ -362,13 +355,31 @@ class TypeViewType : public ViewType
\ingroup typeview
*/
-class BINARYNINJAUIAPI TypeFilter : public QWidget, public FilterTarget
+class BINARYNINJAUIAPI TypeFilterEdit : public QLineEdit
+{
+ Q_OBJECT
+
+ public:
+ TypeFilterEdit(QWidget* parent);
+
+ protected:
+ virtual void keyPressEvent(QKeyEvent* event) override;
+
+ Q_SIGNALS:
+ void focusView();
+};
+
+/*!
+
+ \ingroup typeview
+*/
+class BINARYNINJAUIAPI TypeFilter : public QWidget
{
Q_OBJECT
TypesContainer* m_container;
ClickableIcon* m_showSystemTypes;
- FilterEdit* m_textFilter;
+ TypeFilterEdit* m_textFilter;
bool MatchesAutoFilter(BinaryViewRef data, const BinaryNinja::QualifiedName& name);
bool MatchesTextFilter(const std::vector<BinaryNinja::TypeDefinitionLine>& lines);
@@ -389,15 +400,6 @@ class BINARYNINJAUIAPI TypeFilter : public QWidget, public FilterTarget
bool areAutoTypesVisible();
void setShowAutoTypes(bool showAutoTypes);
void clearTextFilter();
- void setRightText(const QString& text);
-
- protected:
- void setFilter(const std::string& filter) override;
- void scrollToFirstItem() override;
- void scrollToCurrentItem() override;
- void selectFirstItem() override;
- void activateFirstItem() override;
- void closeFilter() override;
};
/*!