Skip to content

Commit

Permalink
[qtaround] use explicit QVariantMap ctor
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
  • Loading branch information
Denis Zalevskiy committed Sep 7, 2014
1 parent 31794aa commit 85e8924
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/qtaround/error.hpp
Expand Up @@ -40,6 +40,11 @@ static inline void raise(QVariantMap const &m)
throw Error(m);
}

static inline void raise(std::initializer_list<std::pair<QString, QVariant> > src)
{
raise(QVariantMap(src));
}

template <typename T, typename T2, typename ... A>
void raise(T const &m1, T2 const &m2, A && ...args)
{
Expand Down
2 changes: 1 addition & 1 deletion src/vault.cpp
Expand Up @@ -211,7 +211,7 @@ QString Vault::absolutePath(QString const &relativePath)

void Vault::setup(const QVariantMap *config)
{
auto createRepo = [m_path, &m_vcs]() {
auto createRepo = [this]() {
debug::debug("Creating repo at", m_path);
if (!os::path::exists(m_path))
if (!os::mkdir(m_path))
Expand Down

0 comments on commit 85e8924

Please sign in to comment.