[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Fri Mar 26 22:46:04 CET 2004
CVS commit by arwalker:
Avoid some potential deadlocks where a write lock is never unlocked.
M +2 -0 kstiface_impl.cpp 1.19
M +4 -0 kstvectordialog_i.cpp 1.27
--- kdeextragear-2/kst/kst/kstiface_impl.cpp #1.18:1.19
@@ -628,7 +628,9 @@ const QString& KstIfaceImpl::loadVector(
src = KstDataSource::loadSource(file);
if (!src || !src->isValid()) {
+ KST::dataSourceList.lock().writeUnlock();
return QString::null;
}
if (src->frameCount() < 1) {
+ KST::dataSourceList.lock().writeUnlock();
return QString::null;
}
--- kdeextragear-2/kst/kst/kstvectordialog_i.cpp #1.26:1.27
@@ -256,8 +256,10 @@ void KstVectorDialogI::new_I() {
file = KstDataSource::loadSource(FileName->url());
if (!file || !file->isValid()) {
+ KST::dataSourceList.lock().writeUnlock();
KMessageBox::sorry(0L, i18n("The file could not be loaded."));
return;
}
if (file->frameCount() < 1) {
+ KST::dataSourceList.lock().writeUnlock();
KMessageBox::sorry(0L, i18n("The file does not contain data."));
return;
@@ -320,8 +322,10 @@ void KstVectorDialogI::edit_I() {
file = KstDataSource::loadSource(FileName->url());
if (!file || !file->isValid()) {
+ KST::dataSourceList.lock().writeUnlock();
KMessageBox::sorry(0L, i18n("The file could not be opened."));
return;
}
if (file->frameCount() < 1) {
+ KST::dataSourceList.lock().writeUnlock();
KMessageBox::sorry(0L, i18n("The file does not contain data."));
return;
More information about the Kst
mailing list