ui: fixed crash when clicking on namespace label

This commit is contained in:
Eberhard Graether
2018-05-04 16:09:43 +02:00
parent bf2b56a69e
commit 568e2f3e36
6 changed files with 21 additions and 16 deletions
@@ -631,7 +631,7 @@ std::vector<std::shared_ptr<DummyNode>> GraphController::createDummyNodeTopDown(
}
node->forEachChildNode(
[node, &result, &ancestorId, this](Node* child)
[&result, &ancestorId, this](Node* child)
{
DummyNode* parent = nullptr;
AccessKind accessKind = ACCESS_NONE;
+3 -2
View File
@@ -80,8 +80,9 @@ std::vector<int> SuffixArray::searchForTerm(const std::wstring& searchTerm) cons
std::transform(term.begin(), term.end(), term.begin(), ::tolower);
int termLength = term.length();
int textLength = m_text.length();
int l = -1;
int r = m_text.length();
int r = textLength;
int m;
std::vector<int> matches;
@@ -105,7 +106,7 @@ std::vector<int> SuffixArray::searchForTerm(const std::wstring& searchTerm) cons
{
matches.push_back(m_array[lower]);
}
for (int higher = m+1; higher < m_text.length() && m_lcp[higher-1] >= termLength; higher++)
for (int higher = m+1; higher < textLength && m_lcp[higher-1] >= termLength; higher++)
{
matches.push_back(m_array[higher]);
}
+1 -1
View File
@@ -175,7 +175,7 @@ void QtUpdateChecker::check(bool force, std::function<void(Result)> callback)
void QtUpdateChecker::checkUpdate()
{
m_onQtThread(
[this]()
[]()
{
check(false, [](Result){});
}
@@ -74,6 +74,8 @@ bool QtGraphNodeQualifier::setPosition(const Vec2i& pos)
void QtGraphNodeQualifier::onClick()
{
hide();
MessageActivateNodes msg;
msg.addNode(0, m_qualifierName);
msg.dispatch();
@@ -647,7 +647,7 @@ void QtProjectWizzard::newSourceGroup()
}
QtProjectWizzardWindow* window = createWindowWithContent(
[this](QtProjectWizzardWindow* window)
[](QtProjectWizzardWindow* window)
{
window->setPreferredSize(QSize(570, 380));
return new QtProjectWizzardContentSelect(window);