refactor: Remove most raw accesses into Application (#5104)
This commit is contained in:
@@ -38,8 +38,9 @@ void TabCompletionModel::updateResults(const QString &query,
|
||||
#ifdef CHATTERINO_HAVE_PLUGINS
|
||||
// Try plugins first
|
||||
bool done{};
|
||||
std::tie(done, results) = getApp()->plugins->updateCustomCompletions(
|
||||
query, fullTextContent, cursorPosition, isFirstWord);
|
||||
std::tie(done, results) =
|
||||
getIApp()->getPlugins()->updateCustomCompletions(
|
||||
query, fullTextContent, cursorPosition, isFirstWord);
|
||||
if (done)
|
||||
{
|
||||
this->setStringList(results);
|
||||
|
||||
@@ -71,7 +71,7 @@ void CommandSource::initializeItems()
|
||||
std::vector<CommandItem> commands;
|
||||
|
||||
#ifdef CHATTERINO_HAVE_PLUGINS
|
||||
for (const auto &command : getApp()->commands->pluginCommands())
|
||||
for (const auto &command : getIApp()->getCommands()->pluginCommands())
|
||||
{
|
||||
addCommand(command, commands);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user