[konsole] [Bug 419526] Qt5.15 Crash on right click

Fabian Vogt bugzilla_noreply at kde.org
Wed May 27 10:01:35 BST 2020


https://bugs.kde.org/show_bug.cgi?id=419526

Fabian Vogt <fabian at ritter-vogt.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fabian at ritter-vogt.de

--- Comment #7 from Fabian Vogt <fabian at ritter-vogt.de> ---
The issue seems to be:

connect(_codecAction->menu(), &QMenu::aboutToShow, this,
&Konsole::SessionController::updateCodecAction);

void SessionController::updateCodecAction()
{
    _codecAction->setCurrentCodec(QString::fromUtf8(_session->codec()));
}

bool KCodecAction::setCurrentCodec(QTextCodec *codec)
{
  ...
                if (codec ==
KCharsets::charsets()->codecForName(actions().at(i)->menu()->actions().at(j)->text()))
{
                    d->currentSubAction =
actions().at(i)->menu()->actions().at(j);
                    d->currentSubAction->trigger();
                    return true;
                }
  ...
}

So the aboutToShow signal hides the menu directly, leading to a null deref
later on.

It should probably use ->setChecked(true); instead.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list