Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an error message as warning output #101

Merged
merged 1 commit into from Jan 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -64,9 +64,19 @@ Pool::~Pool()
// empty. needed for the scoped pointer for the private pointer
}

bool Pool::load()
bool AppStream::Pool::load()
{
return as_pool_load (d->m_pool, NULL, NULL);
return load(nullptr);
}

bool Pool::load(QString* strerror)
{
g_autoptr(GError) error = nullptr;
bool ret = as_pool_load (d->m_pool, NULL, &error);
if (!ret && error) {
*strerror = QString::fromUtf8(error->message);
}
return ret;
}

void Pool::clear()
@@ -76,6 +76,13 @@ Q_OBJECT
*/
bool load();

/**
* \return true on success. False on failure
*
* In case of failure, @p error will be initialized with the error message
*/
bool load(QString* error);

/**
* Remove all software component information from the pool.
*/