-rw-r--r-- | microkde/kfiledialog.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp index 977499e..309f8dc 100644 --- a/microkde/kfiledialog.cpp +++ b/microkde/kfiledialog.cpp | |||
@@ -17,16 +17,17 @@ QString KFileDialog::getSaveFileName( const QString & fn, | |||
17 | lay.setMargin(7); | 17 | lay.setMargin(7); |
18 | lay.setSpacing(7); | 18 | lay.setSpacing(7); |
19 | dia.setCaption( cap ); | 19 | dia.setCaption( cap ); |
20 | QString file = fn; | 20 | QString file = fn; |
21 | if ( file.isEmpty() ) | 21 | if ( file.isEmpty() ) |
22 | file = QDir::homeDirPath()+"/*"; | 22 | file = QDir::homeDirPath()+"/*"; |
23 | QFileInfo fi ( file ); | 23 | QFileInfo fi ( file ); |
24 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() ); | 24 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() ); |
25 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); | ||
25 | lay.addWidget( &o); | 26 | lay.addWidget( &o); |
26 | // o.setNewVisible( true ); | 27 | // o.setNewVisible( true ); |
27 | // o.setNameVisible( true ); | 28 | // o.setNameVisible( true ); |
28 | dia.showMaximized(); | 29 | dia.showMaximized(); |
29 | int res = dia.exec(); | 30 | int res = dia.exec(); |
30 | if ( res ) | 31 | if ( res ) |
31 | retfile = o.selectedName(); | 32 | retfile = o.selectedName(); |
32 | return retfile; | 33 | return retfile; |
@@ -42,16 +43,17 @@ QString KFileDialog::getOpenFileName( const QString & fn, | |||
42 | lay.setMargin(7); | 43 | lay.setMargin(7); |
43 | lay.setSpacing(7); | 44 | lay.setSpacing(7); |
44 | dia.setCaption( cap ); | 45 | dia.setCaption( cap ); |
45 | QString file = fn; | 46 | QString file = fn; |
46 | if ( file.isEmpty() ) | 47 | if ( file.isEmpty() ) |
47 | file = QDir::homeDirPath()+"/*";; | 48 | file = QDir::homeDirPath()+"/*";; |
48 | QFileInfo fi ( file ); | 49 | QFileInfo fi ( file ); |
49 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); | 50 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); |
51 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); | ||
50 | lay.addWidget( &o); | 52 | lay.addWidget( &o); |
51 | dia.showMaximized(); | 53 | dia.showMaximized(); |
52 | int res = dia.exec(); | 54 | int res = dia.exec(); |
53 | if ( res ) | 55 | if ( res ) |
54 | retfile = o.selectedName(); | 56 | retfile = o.selectedName(); |
55 | return retfile; | 57 | return retfile; |
56 | } | 58 | } |
57 | 59 | ||