diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2009-04-21 15:15:18 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-04-21 15:19:16 (GMT) |
commit | e6f48d43307326e14146a9d3d184d784d6ee8a4c (patch) | |
tree | d0e485eeec2ee4b8359400557842c423ece12246 /src/qt3support/dialogs | |
parent | 183cb6052c45d7c83e36c78da4e2c59c768209c7 (diff) | |
download | Qt-e6f48d43307326e14146a9d3d184d784d6ee8a4c.zip Qt-e6f48d43307326e14146a9d3d184d784d6ee8a4c.tar.gz Qt-e6f48d43307326e14146a9d3d184d784d6ee8a4c.tar.bz2 |
Fix Q3FileDialog bug that make impossible to rename twice a file
The line edit (to rename the file) contains a guard to avoid double
emit when the editing is finished but this flag was not set back properly
so it was making the line edit not usable afterwards.
Task-number: 251779
Reviewed-by: bnilsen
Diffstat (limited to 'src/qt3support/dialogs')
-rw-r--r-- | src/qt3support/dialogs/q3filedialog.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp index 4874b6d..1ec0cfc 100644 --- a/src/qt3support/dialogs/q3filedialog.cpp +++ b/src/qt3support/dialogs/q3filedialog.cpp @@ -631,6 +631,7 @@ public: protected: void keyPressEvent(QKeyEvent *e); void focusOutEvent(QFocusEvent *e); + void emitDoRename(); signals: void cancelRename(); @@ -1143,16 +1144,20 @@ void QRenameEdit::keyPressEvent(QKeyEvent *e) void QRenameEdit::focusOutEvent(QFocusEvent *) { - if (!doRenameAlreadyEmitted) { - doRenameAlreadyEmitted = true; - emit doRename(); - } + if (!doRenameAlreadyEmitted) + emitDoRename(); } void QRenameEdit::slotReturnPressed() { + emitDoRename(); +} + +void QRenameEdit::emitDoRename() +{ doRenameAlreadyEmitted = true; emit doRename(); + doRenameAlreadyEmitted = false; } /************************************************************************ |