Skip to content

Commit

Permalink
fix: get right default repository
Browse files Browse the repository at this point in the history
repos is not a QList but a QMap of QString.
  • Loading branch information
black-desk committed Dec 13, 2023
1 parent 6fd9a48 commit 28bb59c
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions apps/ll-package-manager/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ void withDBusDaemon()
QCoreApplication::instance());
auto api = new linglong::api::client::ClientApi;
api->setTimeOut(5000);
api->setNewServerForAllOperations(linglong::util::config::ConfigInstance().repos[0]->endpoint);
api->setNewServerForAllOperations(
linglong::util::config::ConfigInstance().repos[linglong::package::kDefaultRepo]->endpoint);
api->setParent(QCoreApplication::instance());

auto ostreeRepo =
new linglong::repo::OSTreeRepo(linglong::util::getLinglongRootPath(),
linglong::util::config::ConfigInstance().repos[0]->endpoint,
linglong::util::config::ConfigInstance().repos[0]->repoName,
*api);
auto ostreeRepo = new linglong::repo::OSTreeRepo(
linglong::util::getLinglongRootPath(),
linglong::util::config::ConfigInstance().repos[linglong::package::kDefaultRepo]->endpoint,
linglong::util::config::ConfigInstance().repos[linglong::package::kDefaultRepo]->repoName,
*api);
ostreeRepo->setParent(QCoreApplication::instance());

auto client = new linglong::repo::RepoClient(*api);
Expand Down Expand Up @@ -105,13 +106,14 @@ void withoutDBusDaemon()

auto api = new linglong::api::client::ClientApi;
api->setParent(QCoreApplication::instance());
api->setNewServerForAllOperations(linglong::util::config::ConfigInstance().repos[0]->endpoint);

auto ostreeRepo =
new linglong::repo::OSTreeRepo(linglong::util::getLinglongRootPath(),
linglong::util::config::ConfigInstance().repos[0]->endpoint,
linglong::util::config::ConfigInstance().repos[0]->repoName,
*api);
api->setNewServerForAllOperations(
linglong::util::config::ConfigInstance().repos[linglong::package::kDefaultRepo]->endpoint);

auto ostreeRepo = new linglong::repo::OSTreeRepo(
linglong::util::getLinglongRootPath(),
linglong::util::config::ConfigInstance().repos[linglong::package::kDefaultRepo]->endpoint,
linglong::util::config::ConfigInstance().repos[linglong::package::kDefaultRepo]->repoName,
*api);
ostreeRepo->setParent(QCoreApplication::instance());

auto client = new linglong::repo::RepoClient(*api);
Expand Down

0 comments on commit 28bb59c

Please sign in to comment.