Summary: | Writing directory name in save dialog saves the file into the directory with the same name as the directory | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio | Reporter: | Julio Gazquez <juliogazquez> |
Component: | kfile | Assignee: | Carsten Pfeiffer <pfeiffer> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Julio Gazquez
2003-03-03 15:41:59 UTC
Subject: KDE_3_1_BRANCH: kdelibs/kio/kfile CVS commit by pfeiffer: backport "pressing return activates slotOk twice" fix CCMAIL: 55470-close@bugs.kde.org M +7 -0 kfiledialog.cpp 1.327.2.7 --- kdelibs/kio/kfile/kfiledialog.cpp #1.327.2.6:1.327.2.7 @@ -396,4 +396,5 @@ void KFileDialog::slotOk() selectedURL = ops->url(); selectedURL.addPath( text ); // works for filenames and relative paths + selectedURL.cleanPath (); // fix "dir/../" } } else // complete URL @@ -1150,4 +1151,10 @@ void KFileDialog::urlEntered(const KURL& void KFileDialog::locationActivated( const QString& url ) { + // This guard prevents any URL _typed_ by the user from being interpreted + // twice (by returnPressed/slotOk and here, activated/locationActivated) + // after the user presses Enter. Without this, _both_ setSelection and + // slotOk would "u.addPath( url )" ...so instead we leave it up to just + // slotOk.... + if (!locationEdit->lineEdit()->edited()) setSelection( url ); } |