diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/conversation.cc | 10 | ||||
-rw-r--r-- | src/gui/server.h | 5 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/gui/conversation.cc b/src/gui/conversation.cc index 6a1ecb18..9ffa4679 100644 --- a/src/gui/conversation.cc +++ b/src/gui/conversation.cc @@ -218,12 +218,6 @@ namespace OpenAxiom { this, SLOT(reply_to_query())); } - // Transfter focus to this input area. - static void - give_focus_to(Question* q) { - q->setFocus(Qt::OtherFocusReason); - } - static void ensure_visibility(Debate* debate, Exchange* e) { const int y = e->y() + e->height(); QScrollBar* vbar = debate->verticalScrollBar(); @@ -233,7 +227,7 @@ namespace OpenAxiom { vbar->setValue(std::max(new_value, 0)); else if (new_value > value) vbar->setValue(std::min(new_value, vbar->maximum())); - give_focus_to(e->question()); + e->question()->setFocus(Qt::OtherFocusReason); } void @@ -242,6 +236,8 @@ namespace OpenAxiom { if (empty_string(input)) return; question()->setReadOnly(true); // Make query area read only. + question()->clearFocus(); + question()->setFocusPolicy(Qt::NoFocus); server()->input(input); QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); } diff --git a/src/gui/server.h b/src/gui/server.h index 8cf1f227..acb691d7 100644 --- a/src/gui/server.h +++ b/src/gui/server.h @@ -1,4 +1,4 @@ -// Copyright (C) 2013, Gabriel Dos Reis. +// Copyright (C) 2011-2013, Gabriel Dos Reis. // All rights reserved. // Written by Gabriel Dos Reis. // @@ -49,6 +49,9 @@ namespace OpenAxiom { private: Command cmd; Filesystem fs; + + Server(const Server&) = delete; + Server& operator=(const Server&) = delete; }; } |