only support language completion checking with packagekit

since the packagekit bit for installing missing packages is optional it
may be that on ubuntu-like platforms workspace gets built without
packagekit and if that is the case then we can skip over the entire
completion checking as well since we'll have no means to complete an
incomplete language. worse yet, since we don't have any install logic
the relevant UI bits won't do anything

CCBUG: 437416
wilder-5.22
Harald Sitter 5 years ago
parent 5bfef279d7
commit 3f4b114a83
  1. 4
      kcms/translations/translationsmodel.cpp

@ -142,10 +142,14 @@ private:
template<typename... Args>
CompletionCheck *CompletionCheck::create(Args &&... _args)
{
#ifdef HAVE_PACKAGEKIT
// Ubuntu completion depends on packagekit. When packagekit is not available there's no point supporting
// completion checking as we'll have no way to complete the language if it is incomplete.
KOSRelease os;
if (os.id() == QLatin1String("ubuntu") || os.idLike().contains(QLatin1String("ubuntu"))) {
return new UbuntuCompletionCheck(std::forward<Args>(_args)...);
}
#endif
return nullptr;
}

Loading…
Cancel
Save