forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
9c1275d731
commit
3a51713e8d
5 changed files with 5 additions and 13 deletions
|
@ -1,7 +1,5 @@
|
|||
#include "search/search_quality/assessment_tool/context.hpp"
|
||||
|
||||
#include "base/string_utils.hpp"
|
||||
|
||||
// Context -----------------------------------------------------------------------------------------
|
||||
void Context::Clear()
|
||||
{
|
||||
|
|
|
@ -4,8 +4,11 @@
|
|||
#include "search/search_quality/assessment_tool/edits.hpp"
|
||||
#include "search/search_quality/sample.hpp"
|
||||
|
||||
#include "base/string_utils.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct Context
|
||||
|
@ -32,7 +35,7 @@ public:
|
|||
|
||||
bool IsValid() const { return m_contexts != nullptr; }
|
||||
|
||||
string GetLabel(size_t index) const
|
||||
std::string GetLabel(size_t index) const
|
||||
{
|
||||
return strings::ToUtf8((*m_contexts)[index].m_sample.m_query);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
#include "base/assert.hpp"
|
||||
#include "base/logging.hpp"
|
||||
#include "base/scope_guard.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
|
@ -55,8 +54,6 @@ void MainModel::Open(std::string const & path)
|
|||
|
||||
ResetSearch();
|
||||
|
||||
MY_SCOPE_GUARD(cleanup, [this]() { m_loading = false; });
|
||||
m_loading = true;
|
||||
m_contexts.Resize(samples.size());
|
||||
for (size_t i = 0; i < samples.size(); ++i)
|
||||
{
|
||||
|
@ -133,10 +130,6 @@ void MainModel::OnSampleSelected(int index)
|
|||
|
||||
void MainModel::OnUpdate(size_t index)
|
||||
{
|
||||
// Skip update signals during loading.
|
||||
if (m_loading)
|
||||
return;
|
||||
|
||||
CHECK_LESS(index, m_contexts.Size(), ());
|
||||
auto & context = m_contexts[index];
|
||||
m_view->OnSampleChanged(index, context.HasChanges());
|
||||
|
|
|
@ -41,8 +41,6 @@ private:
|
|||
Index const & m_index;
|
||||
ContextList m_contexts;
|
||||
|
||||
bool m_loading = false;
|
||||
|
||||
std::weak_ptr<search::ProcessorHandle> m_queryHandle;
|
||||
uint64_t m_queryTimestamp = 0;
|
||||
size_t m_numShownResults = 0;
|
||||
|
|
|
@ -126,7 +126,7 @@ void ResultView::OnRelevanceChanged()
|
|||
|
||||
bool changed = m_editor->Set(relevance);
|
||||
if (changed)
|
||||
setStyleSheet("#result {background: rgb(255, 255, 200, 50%)}");
|
||||
setStyleSheet("#result {background: rgba(255, 255, 200, 50%)}");
|
||||
else
|
||||
setStyleSheet("");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue