m_lineEdit->setText(m_newName);
m_lineEdit->setSelection(0, selectionLength);
- m_lineEdit->setFocus();
topLayout->addWidget(editLabel);
topLayout->addWidget(m_lineEdit);
m_okButton->setEnabled(enable);
}
+void RenameDialog::showEvent(QShowEvent* event)
+{
+ m_lineEdit->setFocus();
+
+ QDialog::showEvent(event);
+}
+
void RenameDialog::renameItems()
{
// Iterate through all items and rename them...
void slotAccepted();
void slotTextChanged(const QString& newName);
+protected:
+ void showEvent(QShowEvent* event) override;
+
private:
void renameItems();
void renameItem(const KFileItem &item, const QString& newName);