diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-11 22:56:07 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-11 22:56:21 +0530 |
| commit | 0d5b7cb2a8bea5d91c58dd40f80d60bca384b766 (patch) | |
| tree | 4a0a9296d7dd4542afd21d5c37cdab0cc1aa74b7 /src/widgets/InputLine.cpp | |
| parent | 12d0ce37db7323e8efd56d6a698a98abcb8d680b (diff) | |
| download | null-browser-0d5b7cb2a8bea5d91c58dd40f80d60bca384b766.tar.gz null-browser-0d5b7cb2a8bea5d91c58dd40f80d60bca384b766.zip | |
Add command+url evaluation
Diffstat (limited to 'src/widgets/InputLine.cpp')
| -rw-r--r-- | src/widgets/InputLine.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/widgets/InputLine.cpp b/src/widgets/InputLine.cpp index d577e1d..5edfe17 100644 --- a/src/widgets/InputLine.cpp +++ b/src/widgets/InputLine.cpp @@ -54,10 +54,12 @@ InputLine::InputLine(QString defaultInput, QWidget *parentNode) setAdapter(new CommandsAdapter()); } +Adapter *InputLine::adapter() { return adapterInstance; } + void InputLine::setAdapter(Adapter *adapter) { - if (this->adapter) - delete this->adapter; - this->adapter = adapter; + if (this->adapterInstance) + delete this->adapterInstance; + this->adapterInstance = adapter; promptPrefix->setText(adapter->prompt()); input->setCompleter(adapter->completer()); } |
