summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2020-05-28 19:37:36 -0400
committerRusty Wagner <rusty@vector35.com>2020-05-29 23:59:09 -0400
commitc5ae680e93164baf7499ac6822ab0621a5af24d6 (patch)
treea675a7cc47f613ac4924daba8acced8e21119d56
parent13b7a030ad88730d4fde7dfbe27f6d0b0ae65084 (diff)
Update to Qt 5.15
-rw-r--r--docs/about/open-source.md13
-rw-r--r--examples/triage/byte.cpp20
-rw-r--r--examples/triage/byte.h2
-rw-r--r--examples/triage/view.cpp10
-rw-r--r--examples/triage/view.h2
-rw-r--r--ui/flowgraphwidget.h4
-rw-r--r--ui/hexeditor.h2
-rw-r--r--ui/linearview.h4
-rw-r--r--ui/stringsview.h2
-rw-r--r--ui/tokenizedtextview.h4
-rw-r--r--ui/typeview.h2
-rw-r--r--ui/viewframe.h6
12 files changed, 35 insertions, 36 deletions
diff --git a/docs/about/open-source.md b/docs/about/open-source.md
index 2735ebd5..94f44372 100644
--- a/docs/about/open-source.md
+++ b/docs/about/open-source.md
@@ -18,6 +18,7 @@ The previous tools are used in the generation of our documentation, but are not
- [dejavusanscode] ([dejavusanscode license] - multiple open licenses)
- [opensans] ([opensans license] - Apache 2.0)
- [qt] ([qt license] - LGPLv3 / note, please see our [qt build instructions below](open-source.md#building-qt))
+ - [libxcb] ([libxcb license] - MIT)
- [sourcecodepro] ([sourcecodepro license] - SIL open font license)
- [rlcompleter] ([python license] - Python Software Foundation License 2)
@@ -45,12 +46,12 @@ The previous tools are used in the generation of our documentation, but are not
## Building Qt
-Binary Ninja uses [Qt 5.14] under an LGPLv3 license which requires that we host the original sources used to build Qt for our application along with instructions on how that source may be re-built and can replace the version of Qt shipped with Binary Ninja.
+Binary Ninja uses [Qt 5.15] under an LGPLv3 license which requires that we host the original sources used to build Qt for our application along with instructions on how that source may be re-built and can replace the version of Qt shipped with Binary Ninja.
Please note that we offer no support for running Binary Ninja with modified Qt libraries.
1. Follow the installation requirements on the [Building Qt 5 from Git] page.
-2. Download the Qt 5.14.2 [tarball] from binary.ninja. (Note this is an unmodified 5.14 identical to that available from Qt's source control, but must be hosted locally according to the [Qt 5.14] terms.)
+2. Download the Qt 5.15.0 [tarball] from binary.ninja. (Note this is an unmodified 5.15 identical to that available from Qt's source control, but must be hosted locally according to the [Qt 5.15] terms.)
3. Next, build QT using the aforementioned instructions.
4. On OS X, you will need to disable the code-signing signature since it would otherwise prevent changes to binaries or shared libraries. We recommend a tool such as [unsign].
5. Finally, replace the built libraries:
@@ -59,7 +60,7 @@ Please note that we offer no support for running Binary Ninja with modified Qt l
- On Linux, replace the `libQt5Core.so.5`, `libQt5DBus.so.5`, `libQt5Gui.so.5`, `libQt5Network.so.5`, `libQt5Widgets.so.5`, `libQt5XcbQpa.so.5` files wherever Binary Ninja was extracted
[Building Qt 5 from Git]: https://wiki.qt.io/Building-Qt-5-from-Git
-[Qt 5.14]: https://www.qt.io/qt-licensing-terms/
+[Qt 5.15]: https://www.qt.io/qt-licensing-terms/
[capstone]: https://github.com/aquynh/capstone
[capstone license]: https://github.com/aquynh/capstone/blob/master/LICENSE.TXT
[breathe license]: https://github.com/michaeljones/breathe/blob/master/LICENSE
@@ -101,7 +102,7 @@ Please note that we offer no support for running Binary Ninja with modified Qt l
[sphinx]: http://www.sphinx-doc.org/en/stable/index.html
[sqlite license]: https://www.sqlite.org/copyright.html
[sqlite]: https://www.sqlite.org/index.html
-[tarball]: https://binary.ninja/qt5.14.2.tar.xz
+[tarball]: https://binary.ninja/qt5.15.0.tar.xz
[tomcrypt license]: https://github.com/libtom/libtomcrypt/blob/develop/LICENSE
[tomcrypt]: https://github.com/libtom/libtomcrypt
[unsign]: https://github.com/steakknife/unsign
@@ -112,4 +113,6 @@ Please note that we offer no support for running Binary Ninja with modified Qt l
[zlib license]: http://www.zlib.net/zlib_license.html
[zlib]: http://www.zlib.net/
[jemalloc]: https://github.com/jemalloc/jemalloc
-[jemalloc license]: https://github.com/jemalloc/jemalloc/blob/master/COPYING \ No newline at end of file
+[jemalloc license]: https://github.com/jemalloc/jemalloc/blob/master/COPYING
+[libxcb]: https://gitlab.freedesktop.org/xorg/lib/libxcb
+[libxcb license]: https://gitlab.freedesktop.org/xorg/lib/libxcb/-/blob/master/COPYING \ No newline at end of file
diff --git a/examples/triage/byte.cpp b/examples/triage/byte.cpp
index cac2c587..db614dec 100644
--- a/examples/triage/byte.cpp
+++ b/examples/triage/byte.cpp
@@ -145,16 +145,17 @@ uint64_t ByteView::getCurrentOffset()
}
-void ByteView::getSelectionOffsets(uint64_t& start, uint64_t& end)
+BNAddressRange ByteView::getSelectionOffsets()
{
- start = m_selectionStartAddr;
- end = m_cursorAddr;
+ uint64_t start = m_selectionStartAddr;
+ uint64_t end = m_cursorAddr;
if (end < start)
{
uint64_t t = start;
start = end;
end = t;
}
+ return { start, end };
}
@@ -580,9 +581,8 @@ void ByteView::paintEvent(QPaintEvent* event)
// Compute selection range
bool selection = false;
- uint64_t selStart, selEnd;
- getSelectionOffsets(selStart, selEnd);
- if (selStart != selEnd)
+ BNAddressRange selectionRange = getSelectionOffsets();
+ if (selectionRange.start != selectionRange.end)
selection = true;
// Draw selection
@@ -596,18 +596,18 @@ void ByteView::paintEvent(QPaintEvent* event)
int endX = 0;
for (size_t i = 0; i < m_lines.size(); i++)
{
- if (selStart >= m_lines[i].address)
+ if (selectionRange.start >= m_lines[i].address)
{
startY = (int)(i - m_topLine);
- startX = (int)(selStart - m_lines[i].address);
+ startX = (int)(selectionRange.start - m_lines[i].address);
if (startX > (int)m_cols)
startX = (int)m_cols;
startValid = true;
}
- if (selEnd >= m_lines[i].address)
+ if (selectionRange.end >= m_lines[i].address)
{
endY = (int)(i - m_topLine);
- endX = (int)(selEnd - m_lines[i].address);
+ endX = (int)(selectionRange.end - m_lines[i].address);
if (endX > (int)m_cols)
endX = (int)m_cols;
endValid = true;
diff --git a/examples/triage/byte.h b/examples/triage/byte.h
index 226ccd5e..f98e7472 100644
--- a/examples/triage/byte.h
+++ b/examples/triage/byte.h
@@ -82,7 +82,7 @@ public:
virtual BinaryViewRef getData() override;
virtual QFont getFont() override;
virtual uint64_t getCurrentOffset() override;
- virtual void getSelectionOffsets(uint64_t& begin, uint64_t& end) override;
+ virtual BNAddressRange getSelectionOffsets() override;
virtual bool navigate(uint64_t addr) override;
virtual void updateFonts() override;
virtual void selectAll();
diff --git a/examples/triage/view.cpp b/examples/triage/view.cpp
index 246e94f7..7e771d70 100644
--- a/examples/triage/view.cpp
+++ b/examples/triage/view.cpp
@@ -118,15 +118,11 @@ uint64_t TriageView::getCurrentOffset()
}
-void TriageView::getSelectionOffsets(uint64_t& begin, uint64_t& end)
+BNAddressRange TriageView::getSelectionOffsets()
{
if (m_byteView)
- {
- m_byteView->getSelectionOffsets(begin, end);
- return;
- }
- begin = m_currentOffset;
- end = m_currentOffset;
+ return m_byteView->getSelectionOffsets();
+ return { m_currentOffset, m_currentOffset };
}
diff --git a/examples/triage/view.h b/examples/triage/view.h
index 8c33c7b2..973ab83a 100644
--- a/examples/triage/view.h
+++ b/examples/triage/view.h
@@ -18,7 +18,7 @@ public:
virtual BinaryViewRef getData() override;
virtual uint64_t getCurrentOffset() override;
- virtual void getSelectionOffsets(uint64_t& begin, uint64_t& end) override;
+ virtual BNAddressRange getSelectionOffsets() override;
virtual QFont getFont() override;
virtual bool navigate(uint64_t addr) override;
diff --git a/ui/flowgraphwidget.h b/ui/flowgraphwidget.h
index 036d042c..b4c87e31 100644
--- a/ui/flowgraphwidget.h
+++ b/ui/flowgraphwidget.h
@@ -199,8 +199,8 @@ public:
virtual BinaryViewRef getData() override { return m_data; }
virtual uint64_t getCurrentOffset() override;
- virtual void getSelectionOffsets(uint64_t& begin, uint64_t& end) override;
- virtual void getSelectionForInfo(uint64_t& begin, uint64_t& end) override;
+ virtual BNAddressRange getSelectionOffsets() override;
+ virtual BNAddressRange getSelectionForInfo() override;
virtual bool navigate(uint64_t pos) override;
virtual bool navigateToFunction(FunctionRef func, uint64_t pos) override;
bool navigateWithHistoryEntry(uint64_t addr, FlowGraphHistoryEntry* entry);
diff --git a/ui/hexeditor.h b/ui/hexeditor.h
index 1c5ff71b..3500958d 100644
--- a/ui/hexeditor.h
+++ b/ui/hexeditor.h
@@ -24,7 +24,7 @@ public:
virtual BinaryViewRef getData() override { return m_data; }
virtual uint64_t getCurrentOffset() override;
- virtual void getSelectionOffsets(uint64_t& begin, uint64_t& end) override;
+ virtual BNAddressRange getSelectionOffsets() override;
virtual bool navigate(uint64_t pos) override;
virtual void OnBinaryDataWritten(BinaryNinja::BinaryView* data, uint64_t offset, size_t len) override;
diff --git a/ui/linearview.h b/ui/linearview.h
index 689ca9ab..2d5d23ce 100644
--- a/ui/linearview.h
+++ b/ui/linearview.h
@@ -261,8 +261,8 @@ public:
virtual BinaryViewRef getData() override { return m_data; }
void getCurrentOffsetByType(TypeRef resType, uint64_t baseAddr, uint64_t& begin, uint64_t& end, bool singleLine);
virtual uint64_t getCurrentOffset() override;
- virtual void getSelectionOffsets(uint64_t& begin, uint64_t& end) override;
- virtual void getSelectionForInfo(uint64_t& begin, uint64_t& end) override;
+ virtual BNAddressRange getSelectionOffsets() override;
+ virtual BNAddressRange getSelectionForInfo() override;
virtual FunctionRef getCurrentFunction() override;
virtual BasicBlockRef getCurrentBasicBlock() override;
virtual ArchitectureRef getCurrentArchitecture() override;
diff --git a/ui/stringsview.h b/ui/stringsview.h
index dd3d54ff..00b49acc 100644
--- a/ui/stringsview.h
+++ b/ui/stringsview.h
@@ -95,7 +95,7 @@ public:
virtual BinaryViewRef getData() override { return m_data; }
virtual uint64_t getCurrentOffset() override;
- virtual void getSelectionOffsets(uint64_t& begin, uint64_t& end) override;
+ virtual BNAddressRange getSelectionOffsets() override;
virtual bool navigate(uint64_t offset) override;
virtual void updateFonts() override;
diff --git a/ui/tokenizedtextview.h b/ui/tokenizedtextview.h
index 118f7e9b..788bd90d 100644
--- a/ui/tokenizedtextview.h
+++ b/ui/tokenizedtextview.h
@@ -118,8 +118,8 @@ public:
virtual BinaryViewRef getData() override { return m_data; }
virtual uint64_t getCurrentOffset() override;
- virtual void getSelectionOffsets(uint64_t& begin, uint64_t& end) override;
- virtual void getSelectionForInfo(uint64_t& begin, uint64_t& end) override;
+ virtual BNAddressRange getSelectionOffsets() override;
+ virtual BNAddressRange getSelectionForInfo() override;
virtual FunctionRef getCurrentFunction() override;
virtual BasicBlockRef getCurrentBasicBlock() override;
virtual ArchitectureRef getCurrentArchitecture() override;
diff --git a/ui/typeview.h b/ui/typeview.h
index 538b2e85..ee7c2640 100644
--- a/ui/typeview.h
+++ b/ui/typeview.h
@@ -156,7 +156,7 @@ public:
const std::function<bool (size_t current, size_t total)>& cb) override;
virtual BinaryViewRef getData() override { return m_data; }
virtual uint64_t getCurrentOffset() override;
- virtual void getSelectionOffsets(uint64_t& begin, uint64_t& end) override;
+ virtual BNAddressRange getSelectionOffsets() override;
virtual bool navigate(uint64_t) override;
virtual std::string getNavigationMode() override;
diff --git a/ui/viewframe.h b/ui/viewframe.h
index 04a13fc1..dea74b11 100644
--- a/ui/viewframe.h
+++ b/ui/viewframe.h
@@ -70,8 +70,8 @@ public:
virtual BinaryViewRef getData() = 0;
virtual uint64_t getCurrentOffset() = 0;
- virtual void getSelectionOffsets(uint64_t& begin, uint64_t& end);
- virtual void getSelectionForInfo(uint64_t& begin, uint64_t& end);
+ virtual BNAddressRange getSelectionOffsets();
+ virtual BNAddressRange getSelectionForInfo();
virtual bool navigate(uint64_t offset) = 0;
virtual bool navigateToFunction(FunctionRef func, uint64_t offset);
virtual bool goToReference(FunctionRef func, uint64_t source, uint64_t target);
@@ -202,7 +202,7 @@ public:
QString getCurrentView();
QString getCurrentDataType();
uint64_t getCurrentOffset();
- void getSelectionOffsets(uint64_t& begin, uint64_t& end);
+ BNAddressRange getSelectionOffsets();
View* getCurrentViewInterface() const { return View::getViewFromWidget(m_view); }
QWidget* getCurrentWidget() const { return m_view; }