diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-17 12:44:47 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-17 12:44:47 +1100 |
commit | 907c32f8149ec13c39c90424cfed018b2b1eac87 (patch) | |
tree | 7f557df7306cdbf0c2fc623ef271826c473ee007 /qt/ScintillaEditBase/PlatQt.cpp | |
parent | b36983d5f4550bb14afe0e557831b9004dad7409 (diff) | |
download | scintilla-mirror-907c32f8149ec13c39c90424cfed018b2b1eac87.tar.gz |
Mark Window::Destroy, ListBox::Clear, and Menu::Destroy as noexcept since
destroying state should not throw.
Diffstat (limited to 'qt/ScintillaEditBase/PlatQt.cpp')
-rw-r--r-- | qt/ScintillaEditBase/PlatQt.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp index d41dbfbf3..4bdd04778 100644 --- a/qt/ScintillaEditBase/PlatQt.cpp +++ b/qt/ScintillaEditBase/PlatQt.cpp @@ -658,7 +658,7 @@ QRect ScreenRectangleForPoint(QPoint posGlobal) Window::~Window() {} -void Window::Destroy() +void Window::Destroy() noexcept { if (wid) delete window(wid); @@ -801,7 +801,7 @@ public: int GetVisibleRows() const override; PRectangle GetDesiredRect() override; int CaretFromEdge() override; - void Clear() override; + void Clear() noexcept override; void Append(char *s, int type = -1) override; int Length() override; void Select(int n) override; @@ -928,7 +928,7 @@ int ListBoxImpl::CaretFromEdge() #endif return maxIconWidth + (2 * list->frameWidth()) + extra; } -void ListBoxImpl::Clear() +void ListBoxImpl::Clear() noexcept { ListWidget *list = GetWidget(); list->clear(); @@ -1117,7 +1117,7 @@ void Menu::CreatePopUp() mid = new QMenu(); } -void Menu::Destroy() +void Menu::Destroy() noexcept { if (mid) { QMenu *menu = static_cast<QMenu *>(mid); |