diff options
| author | Michael Palimaka <[email protected]> | 2015-09-26 05:38:06 +1000 |
|---|---|---|
| committer | Michael Palimaka <[email protected]> | 2015-09-26 05:38:06 +1000 |
| commit | 8a56637663a6c5305b9ec244588e50eb8399e95b (patch) | |
| tree | 2e564325ca45670f768ad9ebbeb7133ec77cc07b /src/views | |
| parent | c9770e60839f60ffa29e56e9785a9a36b3d4a90c (diff) | |
| parent | 6e218c4c146c08626c6bf4c87e9849a9de7462c4 (diff) | |
Merge branch 'Applications/15.08'
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/renamedialog.cpp | 8 | ||||
| -rw-r--r-- | src/views/renamedialog.h | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index be9e34c4a..60b7b16c1 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -108,7 +108,6 @@ RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) : m_lineEdit->setText(m_newName); m_lineEdit->setSelection(0, selectionLength); - m_lineEdit->setFocus(); topLayout->addWidget(editLabel); topLayout->addWidget(m_lineEdit); @@ -197,6 +196,13 @@ void RenameDialog::slotTextChanged(const QString& newName) 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... diff --git a/src/views/renamedialog.h b/src/views/renamedialog.h index a1953e8b3..3964c0a5c 100644 --- a/src/views/renamedialog.h +++ b/src/views/renamedialog.h @@ -45,6 +45,9 @@ private slots: void slotAccepted(); void slotTextChanged(const QString& newName); +protected: + void showEvent(QShowEvent* event) override; + private: void renameItems(); void renameItem(const KFileItem &item, const QString& newName); |
