Currently multi-line file names in dolphin only display a single
line when renaming. This commit ensures multi-line filenames have
all lines displayed by calling `document()->adjustSize` in
`KItemListRoleEditor::autoAdjustSize`, and by calling the latter
function after setting up the editor.
BUG: 452587
rect.setWidth(parent->width() - rect.left());
}
m_roleEditor->setGeometry(rect.toRect());
+ m_roleEditor->autoAdjustSize();
m_roleEditor->show();
m_roleEditor->setFocus();
}
{
const qreal frameBorder = 2 * frameWidth();
+ document()->adjustSize();
const qreal requiredWidth = document()->size().width();
const qreal availableWidth = size().width() - frameBorder;
if (requiredWidth > availableWidth) {
void roleEditingFinished(const QByteArray &role, const QVariant &value);
void roleEditingCanceled(const QByteArray &role, const QVariant &value);
-protected:
- bool event(QEvent *event) override;
- void keyPressEvent(QKeyEvent *event) override;
-
-private Q_SLOTS:
+public Q_SLOTS:
/**
* Increases the size of the editor in case if there is not
* enough room for the text.
*/
void autoAdjustSize();
+protected:
+ bool event(QEvent *event) override;
+ void keyPressEvent(QKeyEvent *event) override;
+
private:
/**
* Emits the signal roleEditingFinished if m_blockFinishedSignal