Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
28
libs/search/search_quality/assessment_tool/helpers.hpp
Normal file
28
libs/search/search_quality/assessment_tool/helpers.hpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace strings
|
||||
{
|
||||
class UniString;
|
||||
}
|
||||
|
||||
QString ToQString(strings::UniString const & s);
|
||||
QString ToQString(std::string const & s);
|
||||
|
||||
template <typename Layout, typename... Args>
|
||||
Layout * BuildLayout(Args &&... args)
|
||||
{
|
||||
return new Layout(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template <typename Layout, typename... Args>
|
||||
Layout * BuildLayoutWithoutMargins(Args &&... args)
|
||||
{
|
||||
auto * layout = BuildLayout<Layout>(std::forward<Args>(args)...);
|
||||
layout->setContentsMargins(0 /* left */, 0 /* top */, 0 /* right */, 0 /* bottom */);
|
||||
return layout;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue