Browse Source

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 2 years ago
parent
commit
05bcfa76fc
1 changed files with 9 additions and 3 deletions
  1. 9
    3
      tdeio/tdefile/tdefiledialog.cpp

+ 9
- 3
tdeio/tdefile/tdefiledialog.cpp View File

@@ -334,6 +334,10 @@ void KFileDialog::slotOk()
334 334
 {
335 335
     kdDebug(tdefile_area) << "slotOK\n";
336 336
 
337
+		if (locationEdit->lineEdit()->edited())
338
+		{
339
+			enterURL(d->pathCombo->lineEdit()->text());
340
+		}
337 341
     // a list of all selected files/directories (if any)
338 342
     // can only be used if the user didn't type any filenames/urls himself
339 343
     const KFileItemList *items = ops->selectedItems();
@@ -981,11 +985,13 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge
981 985
     d->pathCombo->setCompletionObject( pathCompletionObj );
982 986
     d->pathCombo->setAutoDeleteCompletionObject( true );
983 987
 
984
-    connect( d->pathCombo, TQT_SIGNAL( urlActivated( const KURL&  )),
988
+    connect( d->pathCombo, TQT_SIGNAL( urlActivated( const KURL& )),
985 989
              this,  TQT_SLOT( enterURL( const KURL& ) ));
986
-    connect( d->pathCombo, TQT_SIGNAL( returnPressed( const TQString&  )),
990
+    connect( d->pathCombo, TQT_SIGNAL( returnPressed( const TQString& )),
987 991
              this,  TQT_SLOT( enterURL( const TQString& ) ));
988
-
992
+		connect( d->pathCombo, TQT_SIGNAL( activated( const TQString& )),
993
+              this,  TQT_SLOT( enterURL( const TQString& ) ));
994
+              
989 995
     TQString whatsThisText;
990 996
 
991 997
     // the Location label/edit

Loading…
Cancel
Save