Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5568aa25 authored by Scott Wheeler's avatar Scott Wheeler

For reasons that I don't understand QSpinBox doesn't emit a valueChanged()

signal when the text is changed by the keyboard (though this is obviously
intentional from reading the QSpinBox code).  So, fake it here.

CCMAIL:69061-done@bugs.kde.org

svn path=/trunk/kdemultimedia/juk/; revision=269689
parent 571461e4
......@@ -366,12 +366,14 @@ void TagEditor::setupLayout()
m_trackSpin = new KIntSpinBox(0, 255, 1, 0, 10, this, "trackSpin");
addItem(i18n("T&rack:"), m_trackSpin, trackRowLayout);
m_trackSpin->installEventFilter(this);
trackRowLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding,
QSizePolicy::Minimum));
m_yearSpin = new KIntSpinBox(0, 9999, 1, 0, 10, this, "yearSpin");
addItem(i18n("&Year:"), m_yearSpin, trackRowLayout);
m_yearSpin->installEventFilter(this);
trackRowLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding,
QSizePolicy::Minimum));
......@@ -578,6 +580,14 @@ void TagEditor::showEvent(QShowEvent *e)
QWidget::showEvent(e);
}
bool TagEditor::eventFilter(QObject *watched, QEvent *e)
{
if(watched->inherits("QSpinBox") && e->type() == QEvent::KeyRelease)
slotDataChanged();
return false;
}
////////////////////////////////////////////////////////////////////////////////
// private slots
////////////////////////////////////////////////////////////////////////////////
......
......@@ -68,6 +68,8 @@ private:
virtual void showEvent(QShowEvent *e);
virtual bool eventFilter(QObject *watched, QEvent *e);
private slots:
void slotDataChanged(bool c = true);
void slotItemRemoved(PlaylistItem *item);
......
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