D25981: Clean up the chat dialog code a bit, set the keyboard focus on the chat message field

Albert Astals Cid <[email protected]>
Newsgroups gmane.comp.kde.devel.games
Message-ID <[email protected]>
aacid added a comment.


  Does something like this fix the problem?
  
    diff --git a/src/chatdlg.cpp b/src/chatdlg.cpp
    index 0b7ec1d..35a9ffe 100644
    --- a/src/chatdlg.cpp
    +++ b/src/chatdlg.cpp
    @@ -50,11 +50,10 @@ ChatDlg::ChatDlg(KGame *game,QWidget *parent)
       QVBoxLayout *mainLayout = new QVBoxLayout;
       setLayout(mainLayout);
       QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
    -  okButton->setDefault(true);
       okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
       connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
       connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
    -  okButton->setDefault(true);
    +  okButton->setAutoDefault(false);
       setModal(false);
       setMinimumSize(QSize(200,200));
       
    @@ -68,6 +67,7 @@ ChatDlg::ChatDlg(KGame *game,QWidget *parent)
       mGridLayout->addWidget(b,0,0);
       
       QPushButton *mButton     = new QPushButton(i18n("Configure..."),frame);
    +  mButton->setAutoDefault(false);
       mGridLayout->addWidget(mButton,1,1);
       
       mainLayout->addWidget(frame);

REPOSITORY
  R395 KFourInLine

REVISION DETAIL
  https://phabricator.kde.org/D25981

To: yurchor, #kde_games
Cc: aacid, kde-games-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.