Commit d2bb5bbc authored by Alexander Semke's avatar Alexander Semke

When fetching the completion for R, Octave and Julia, login to the backend first if not done yet.

BUG: 389383
parent 6dea4b1b
......@@ -581,6 +581,7 @@ void CantorPart::worksheetSessionLoginStarted() {
}
void CantorPart::worksheetSessionLoginDone() {
setStatusMessage(i18n("Ready"));
QApplication::restoreOverrideCursor();
}
......
......@@ -470,6 +470,17 @@ bool Worksheet::completionEnabled()
void Worksheet::showCompletion()
{
//for backends which fetch the completion from the corresponding interpreter
//we need to do the login first.
//TODO: ideally, this logic is implemented in the actual session classes
//and the worksheet doesn't need to know anything about this.
//But as long as we have some additional logic in Worksheet::loginToSession(),
//we need to handle this here.
if (!m_loginDone && (m_session->backend()->name() == QLatin1String("Julia")
|| m_session->backend()->name() == QLatin1String("R")
|| m_session->backend()->name() == QLatin1String("Octave")) )
loginToSession();
WorksheetEntry* current = currentEntry();
current->showCompletion();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment