Commit 2e22993c authored by Daniel Teske's avatar Daniel Teske

GenericProposalWidget: Delete old code for carbon qt

Change-Id: Ib8cc14764a3ff590e74c581792562ee8ead969b1
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 0d017e5a
......@@ -549,27 +549,10 @@ void GenericProposalWidget::turnOnAutoWidth()
updatePositionAndSize();
}
static bool useCarbonWorkaround()
{
#if (QT_VERSION < 0x050000) && defined(Q_OS_DARWIN) && ! defined(QT_MAC_USE_COCOA)
return true;
#else
return false;
#endif
}
bool GenericProposalWidget::eventFilter(QObject *o, QEvent *e)
{
if (e->type() == QEvent::FocusOut) {
abort();
if (useCarbonWorkaround()) {
QFocusEvent *fe = static_cast<QFocusEvent *>(e);
if (fe->reason() == Qt::OtherFocusReason) {
// Qt/carbon workaround
// focus out is received before the key press event.
activateCurrentProposalItem();
}
}
if (d->m_infoFrame)
d->m_infoFrame->close();
return true;
......@@ -609,10 +592,8 @@ bool GenericProposalWidget::eventFilter(QObject *o, QEvent *e)
case Qt::Key_Tab:
case Qt::Key_Return:
if (!useCarbonWorkaround()) {
abort();
activateCurrentProposalItem();
}
abort();
activateCurrentProposalItem();
return true;
case Qt::Key_Up:
......
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