summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2023-11-07 18:55:32 -0500
committerGlenn Smith <glenn@vector35.com>2023-11-13 17:22:16 -0500
commit1716451033063812056349156332128984540962 (patch)
tree7a12ab7cdb9c15ffadfaa42651e7fe044ff7befa /ui
parent0cc0b1ce9f7e1bcf4b8fac581ab4e5a354906ba4 (diff)
Add fmt library to api
Diffstat (limited to 'ui')
-rw-r--r--ui/util.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/ui/util.h b/ui/util.h
index c3e5ece5..e6b6fdb2 100644
--- a/ui/util.h
+++ b/ui/util.h
@@ -18,7 +18,7 @@ std::string BINARYNINJAUIAPI getStringForLocalVariable(ArchitectureRef arch, Fun
std::string BINARYNINJAUIAPI getStringForRegisterValue(ArchitectureRef arch, BinaryNinja::RegisterValue value);
std::string BINARYNINJAUIAPI getPossibleValueSetStateName(BNRegisterValueType state);
std::string BINARYNINJAUIAPI getStringForIntegerValue(int64_t value);
-std::string BINARYNINJAUIAPI getStringForIntegerValue(uint64_t value);
+std::string BINARYNINJAUIAPI getStringForUIntegerValue(uint64_t value);
std::string BINARYNINJAUIAPI getStringForPossibleValueSet(ArchitectureRef arch, const BinaryNinja::PossibleValueSet& values);
std::string BINARYNINJAUIAPI getStringForInstructionDataflowDetails(BinaryViewRef data, ArchitectureRef arch, FunctionRef func, uint64_t address);
std::optional<BinaryNinja::PossibleValueSet> BINARYNINJAUIAPI getPossibleValueSetForToken(View* view, BinaryViewRef data, ArchitectureRef arch,
@@ -34,6 +34,16 @@ bool BINARYNINJAUIAPI isBinaryNinjaDataBase(QFileInfo& info, QFileAccessor& acce
PlatformRef BINARYNINJAUIAPI getOrAskForPlatform(QWidget* parent, BinaryViewRef data);
PlatformRef BINARYNINJAUIAPI getOrAskForPlatform(QWidget* parent, PlatformRef defaultValue);
+
+namespace fmt
+{
+ template<typename... T>
+ QString qformat(format_string<T...> fmt, T&&... args)
+ {
+ return QString::fromStdString(vformat(fmt, make_format_args(args...)));
+ }
+}
+
/*!
@}
*/