Add a new completion API for experimental plugins feature. (#5000)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -170,8 +170,9 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event)
|
||||
// First type pressing tab after modifying a message, we refresh our
|
||||
// completion model
|
||||
this->completer_->setModel(completionModel);
|
||||
completionModel->updateResults(currentCompletion,
|
||||
this->isFirstWord());
|
||||
completionModel->updateResults(
|
||||
currentCompletion, this->toPlainText(),
|
||||
this->textCursor().position(), this->isFirstWord());
|
||||
this->completionInProgress_ = true;
|
||||
{
|
||||
// this blocks cursor movement events from resetting tab completion
|
||||
|
||||
@@ -108,6 +108,16 @@ void PluginsPage::rebuildContent()
|
||||
warningLabel->setStyleSheet("color: #f00");
|
||||
pluginEntry->addRow(warningLabel);
|
||||
}
|
||||
if (!plugin->error().isNull())
|
||||
{
|
||||
auto *errorLabel =
|
||||
new QLabel("There was an error while loading this plugin: " +
|
||||
plugin->error(),
|
||||
this->dataFrame_);
|
||||
errorLabel->setStyleSheet("color: #f00");
|
||||
errorLabel->setWordWrap(true);
|
||||
pluginEntry->addRow(errorLabel);
|
||||
}
|
||||
|
||||
auto *description =
|
||||
new QLabel(plugin->meta.description, this->dataFrame_);
|
||||
|
||||
Reference in New Issue
Block a user