summaryrefslogtreecommitdiffstats
path: root/src/qt3support/dialogs
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-04-21 17:15:18 +0200
committerAlexis Menard <alexis.menard@nokia.com>2009-04-21 17:19:16 +0200
commite6f48d43307326e14146a9d3d184d784d6ee8a4c (patch)
treed0e485eeec2ee4b8359400557842c423ece12246 /src/qt3support/dialogs
parent183cb6052c45d7c83e36c78da4e2c59c768209c7 (diff)
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.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp
index 4874b6d940..1ec0cfc6c2 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;
}
/************************************************************************