Commit 505a47c1 authored by JanKusanagi's avatar JanKusanagi

Use a proper name for the slot as it's used now; Enable Insert button

parent 203f18e6
......@@ -65,15 +65,19 @@ CharacterPicker::CharacterPicker(QWidget *parent) : QWidget(parent)
* In addition to that, find the QTableView object used inside KCharSelect
* and use its clicked() signal.
*
* This is a little bit hacky and depends on internal implementation.
* It could break in future releases of KWidgetsAddons, but selecting
* via double-click and Enter would still work.
*
*/
connect(m_charSelect, &KCharSelect::codePointSelected,
this, &CharacterPicker::onCodePointChanged);
this, &CharacterPicker::onCodePointSelected);
m_charSelectTableView = m_charSelect->findChild<QTableView *>();
if (m_charSelectTableView)
{
connect(m_charSelectTableView, &QTableView::clicked,
this, &CharacterPicker::onCodePointChanged);
this, &CharacterPicker::onCodePointSelected);
}
m_makeBigCheckbox = new QCheckBox(tr("Insert in big size"), this);
......@@ -86,8 +90,8 @@ CharacterPicker::CharacterPicker(QWidget *parent) : QWidget(parent)
QIcon(":/images/list-add.png")),
tr("&Insert Symbol"),
this);
//connect(m_insertButton, &QAbstractButton::clicked,
// this, &CharacterPicker::close); ///////////////// TMP FIXME
connect(m_insertButton, &QAbstractButton::clicked,
this, &CharacterPicker::onCodePointSelected);
m_cancelButton = new QPushButton(QIcon::fromTheme("dialog-cancel",
QIcon(":/images/button-cancel.png")),
......@@ -135,7 +139,7 @@ CharacterPicker::~CharacterPicker()
//////////////////////////////////////////////////////////////////////////////
void CharacterPicker::onCodePointChanged()
void CharacterPicker::onCodePointSelected()
{
const uint codepoint = m_charSelect->currentCodePoint();
......
......@@ -48,7 +48,7 @@ signals:
public slots:
void onCodePointChanged();
void onCodePointSelected();
protected:
......
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