[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kio/kfile
From: David Faure <faure () kde ! org>
Date: 2006-08-31 21:03:21
Message-ID: 1157058201.805980.32216.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 579340 by dfaure:
Don't use toString(); check for local urls before using path()
M +12 -6 kfiledialog.cpp
--- trunk/KDE/kdelibs/kio/kfile/kfiledialog.cpp #579339:579340
@@ -1346,7 +1346,7 @@
{
#ifdef Q_WS_WIN
return QFileDialog::getExistingDirectory(parent, caption,
- startDir.toString(), \
QFileDialog::ShowDirsOnly); + \
startDir.path(), QFileDialog::ShowDirsOnly); #else
KUrl url = KDirSelectDialog::selectDirectory(startDir, true, parent,
caption);
@@ -1529,8 +1529,11 @@
{
bool specialDir = (!dir.isEmpty()) && (dir.protocol() == "kfiledialog");
KFileDialog dlg( specialDir ? dir : KUrl(), filter, parent);
- if ( !specialDir )
- dlg.setSelection( dir.toString() ); // may also be a filename
+ if ( !specialDir ) {
+ if (!dir.isLocalFile())
+ kWarning() << "KFileDialog::getSaveFileName called with non-local start \
dir " << dir << endl; + dlg.setSelection( dir.path() ); // may also be a \
filename + }
dlg.setOperationMode( Saving );
dlg.setMode( KFile::File );
@@ -1559,8 +1562,11 @@
// TODO
#endif
- if ( !specialDir )
- dlg.setSelection( dir.toString() ); // may also be a filename
+ if ( !specialDir ) {
+ if (!dir.isLocalFile())
+ kWarning() << "KFileDialog::getSaveFileNameWId called with non-local \
start dir " << dir << endl; + dlg.setSelection( dir.path() ); // may also be a \
filename + }
dlg.setOperationMode( KFileDialog::Saving);
dlg.setMode( KFile::File );
@@ -1581,7 +1587,7 @@
bool specialDir = (!dir.isEmpty()) && (dir.protocol() == "kfiledialog");
KFileDialog dlg(specialDir ? dir : KUrl(), filter, parent);
if ( !specialDir )
- dlg.setSelection( dir.toString() ); // may also be a filename
+ dlg.setSelection( dir.url() ); // may also be a filename
dlg.setWindowTitle(caption.isNull() ? i18n("Save As") : caption);
dlg.setOperationMode( Saving );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic