diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2017-02-05 22:35:15 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2017-07-22 15:56:53 +0200 |
commit | 50f90e9382baf576733600f0f777982f9c0740c6 (patch) | |
tree | 641226d9c4595cfb7f881923edc339114c4f2a6d /kio | |
parent | da3792870721d0f375a26609ad7fb4bdb329098c (diff) | |
download | tdelibs-50f90e9382baf576733600f0f777982f9c0740c6.tar.gz tdelibs-50f90e9382baf576733600f0f777982f9c0740c6.zip |
Fixed code for tdefiledialog which caused the problem explained in bug
2743. Using the new code, editing the path information in a
tdefiledialog and pressing the "open/save" button will behave exactly in
the same way as if ENTER was pressed after editing the path and before
pressing "open/save".
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 05bcfa76fc9bd5dcf7267f2b5a26436566a9cf82)
Diffstat (limited to 'kio')
-rw-r--r-- | kio/kfile/kfiledialog.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp index 688fce66e..bc728acf7 100644 --- a/kio/kfile/kfiledialog.cpp +++ b/kio/kfile/kfiledialog.cpp @@ -334,6 +334,10 @@ void KFileDialog::slotOk() { kdDebug(kfile_area) << "slotOK\n"; + if (locationEdit->lineEdit()->edited()) + { + enterURL(d->pathCombo->lineEdit()->text()); + } // a list of all selected files/directories (if any) // can only be used if the user didn't type any filenames/urls himself const KFileItemList *items = ops->selectedItems(); @@ -981,11 +985,13 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge d->pathCombo->setCompletionObject( pathCompletionObj ); d->pathCombo->setAutoDeleteCompletionObject( true ); - connect( d->pathCombo, TQT_SIGNAL( urlActivated( const KURL& )), + connect( d->pathCombo, TQT_SIGNAL( urlActivated( const KURL& )), this, TQT_SLOT( enterURL( const KURL& ) )); - connect( d->pathCombo, TQT_SIGNAL( returnPressed( const TQString& )), + connect( d->pathCombo, TQT_SIGNAL( returnPressed( const TQString& )), this, TQT_SLOT( enterURL( const TQString& ) )); - + connect( d->pathCombo, TQT_SIGNAL( activated( const TQString& )), + this, TQT_SLOT( enterURL( const TQString& ) )); + TQString whatsThisText; // the Location label/edit |