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>
pull/1/head
Michele Calgaro 8 years ago
parent 00051ff7dd
commit 05bcfa76fc

@ -334,6 +334,10 @@ void KFileDialog::slotOk()
{
kdDebug(tdefile_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();
@ -985,6 +989,8 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge
this, TQT_SLOT( enterURL( const KURL& ) ));
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;

Loading…
Cancel
Save