From ec49b87e16b1a198847bd2511ebdccb5fdd3b2c5 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Thu, 26 Dec 2002 04:27:24 +0000 Subject: small fix for setting the directory in getOpenFileName, so it will return the fullpath --- (limited to 'noncore/apps/tinykate/tinykate.cpp') diff --git a/noncore/apps/tinykate/tinykate.cpp b/noncore/apps/tinykate/tinykate.cpp index 51afd31..6164fa5 100644 --- a/noncore/apps/tinykate/tinykate.cpp +++ b/noncore/apps/tinykate/tinykate.cpp @@ -151,8 +151,9 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : void TinyKate::slotOpen( ) { - QString filename=OFileDialog::getOpenFileName(OFileSelector::EXTENDED_ALL); - if (!filename.isEmpty()) { + QString filename = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, + QPEApplication::documentDir()); + if (!filename.isEmpty()) { open(filename); } } @@ -167,7 +168,7 @@ void TinyKate::open(const QString & filename) qDebug(filename); kd->setDocName( filenamed); - kd->open(filename); + kd->open( filename ); viewCount++; } @@ -240,7 +241,8 @@ void TinyKate::slotSaveAs() { if (currentView==0) return; KateDocument *kd = (KateDocument*) currentView->document(); - QString filename=OFileDialog::getSaveFileName(OFileSelector::EXTENDED_ALL); + QString filename=OFileDialog::getSaveFileName(OFileSelector::EXTENDED_ALL, + QPEApplication::documentDir()); if (!filename.isEmpty()) { qDebug("saving file "+filename); QFileInfo fi(filename); -- cgit v0.9.0.2