diff options
| author | Glenn Smith <glenn@vector35.com> | 2021-05-24 22:37:09 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2021-05-26 16:48:34 -0400 |
| commit | a46902ef8bbde08221ffd869054e206c0dfc2234 (patch) | |
| tree | edce5b743129d49a4748b6e32406152aa622e37d /examples/uinotification/uinotification.cpp | |
| parent | e278b2452efbf1b653f2d7d6b6d8090128d02ff3 (diff) | |
Updated examples and docs
Diffstat (limited to 'examples/uinotification/uinotification.cpp')
| -rw-r--r-- | examples/uinotification/uinotification.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/examples/uinotification/uinotification.cpp b/examples/uinotification/uinotification.cpp index f498db4c..d9eada8e 100644 --- a/examples/uinotification/uinotification.cpp +++ b/examples/uinotification/uinotification.cpp @@ -2,7 +2,8 @@ #include "uinotification.h" #include "filecontext.h" #include "viewframe.h" -#include <QMessageBox> +#include <QtWidgets/QMessageBox> +#include <QtCore/QFileInfo> using namespace BinaryNinja; @@ -92,6 +93,23 @@ void NotificationListener::OnAddressChange(UIContext* context, ViewFrame* frame, } +bool NotificationListener::GetNameForFile(UIContext* context, FileContext* file, QString& name) +{ + LogInfo("GetNameForFile"); + name = file->getFilename() + " Foo"; + return true; +} + + +bool NotificationListener::GetNameForPath(UIContext* context, const QString& path, QString& name) +{ + QFileInfo info(path); + LogInfo("GetNameForPath"); + name = info.baseName() + " Foo"; + return true; +} + + extern "C" { BN_DECLARE_UI_ABI_VERSION |
