[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kfile
From: Rafael Fernández López <ereslibre () kde ! org>
Date: 2009-08-07 12:10:29
Message-ID: 1249647029.927931.11971.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1008399 by ereslibre:
Avoid crash on assert when trying to remove from an empty combo. Also remove unneeded whitespaeces
M +7 -5 kfilewidget.cpp
--- trunk/KDE/kdelibs/kfile/kfilewidget.cpp #1008398:1008399
@@ -591,7 +591,7 @@
}
// getStartUrl() above will have resolved the startDir parameter into
- // a directory and file name in the two cases: (a) where it is a
+ // a directory and file name in the two cases: (a) where it is a
// special "kfiledialog:" URL, or (b) where it is a plain file name
// only without directory or protocol. For any other startDir
// specified, it is not possible to resolve whether there is a file name
@@ -892,7 +892,7 @@
//Check if the folder exists
KIO::StatJob * statJob = KIO::stat(directory, KIO::HideProgressInfo);
bool res = KIO::NetAccess::synchronousRun(statJob, 0);
- if (res) {
+ if (res) {
if (statJob->statResult().isDir()) {
url.adjustPath(KUrl::RemoveTrailingSlash);
fileName = url.fileName();
@@ -943,7 +943,7 @@
i18n("Remote files not accepted"));
return;
}
-
+
if ((d->operationMode == Saving) && d->confirmOverwrite && !d->toOverwrite(url)) {
return;
}
@@ -1183,7 +1183,9 @@
QObject::disconnect( locationEdit, SIGNAL( editTextChanged( const QString& ) ),
q, SLOT( _k_slotLocationChanged( const QString& ) ) );
- locationEdit->removeItem( 0 );
+ if (locationEdit->count()) {
+ locationEdit->removeItem( 0 );
+ }
locationEdit->setCurrentIndex( -1 );
dummyAdded = false;
@@ -1206,7 +1208,7 @@
q->setUrl(url.path(), false);
}
}
- setDummyHistoryEntry(url.fileName() , mimeTypeIcon );
+ setDummyHistoryEntry(url.fileName() , mimeTypeIcon);
} else {
removeDummyHistoryEntry();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic