|
@@ -304,6 +304,25 @@ void ctkConsolePrivate::selectCompletion()
|
|
|
}
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
+void ctkConsolePrivate::setCompleter(ctkConsoleCompleter* completer)
|
|
|
+{
|
|
|
+ if (this->Completer)
|
|
|
+ {
|
|
|
+ this->Completer->setWidget(0);
|
|
|
+ disconnect(this->Completer, SIGNAL(activated(const QString&)),
|
|
|
+ this, SLOT(insertCompletion(const QString&)));
|
|
|
+
|
|
|
+ }
|
|
|
+ this->Completer = completer;
|
|
|
+ if (this->Completer)
|
|
|
+ {
|
|
|
+ this->Completer->setWidget(this);
|
|
|
+ connect(this->Completer, SIGNAL(activated(const QString&)),
|
|
|
+ this, SLOT(insertCompletion(const QString&)));
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//-----------------------------------------------------------------------------
|
|
|
void ctkConsolePrivate::updateCompleter()
|
|
|
{
|
|
|
if (this->Completer)
|
|
@@ -387,25 +406,6 @@ void ctkConsolePrivate::internalExecuteCommand()
|
|
|
}
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
-void ctkConsolePrivate::setCompleter(ctkConsoleCompleter* completer)
|
|
|
-{
|
|
|
- if (this->Completer)
|
|
|
- {
|
|
|
- this->Completer->setWidget(0);
|
|
|
- disconnect(this->Completer, SIGNAL(activated(const QString&)),
|
|
|
- this, SLOT(insertCompletion(const QString&)));
|
|
|
-
|
|
|
- }
|
|
|
- this->Completer = completer;
|
|
|
- if (this->Completer)
|
|
|
- {
|
|
|
- this->Completer->setWidget(this);
|
|
|
- connect(this->Completer, SIGNAL(activated(const QString&)),
|
|
|
- this, SLOT(insertCompletion(const QString&)));
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-//-----------------------------------------------------------------------------
|
|
|
void ctkConsolePrivate::printString(const QString& text)
|
|
|
{
|
|
|
this->textCursor().movePosition(QTextCursor::End);
|