[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: k3b_0_11_branch: kdeextragear-1/k3b/src/device
From: Sebastian Trueg <sebastian () trueg ! de>
Date: 2004-08-15 10:41:43
Message-ID: 20040815104143.2413190DA () office ! kde ! org
[Download RAW message or body]
CVS commit by trueg:
fix in device search path saving: don't save a path twice
M +9 -3 k3bdevicemanager.cpp 1.64.2.4
--- kdeextragear-1/k3b/src/device/k3bdevicemanager.cpp #1.64.2.3:1.64.2.4
@@ -391,4 +391,9 @@ bool K3bCdDevice::DeviceManager::saveCon
c->setGroup( "Devices" );
QStringList deviceSearchPath = c->readListEntry( "device_search_path" );
+ // remove duplicate entries (caused by buggy old implementations)
+ QStringList saveDeviceSearchPath;
+ for( QStringList::iterator it = deviceSearchPath.begin(); it != deviceSearchPath.end(); ++it )
+ if( !saveDeviceSearchPath.contains( *it ) )
+ saveDeviceSearchPath.append( *it );
for( QPtrListIterator<K3bCdDevice::CdDevice> it( d->allDevices ); *it; ++it ) {
@@ -396,5 +401,6 @@ bool K3bCdDevice::DeviceManager::saveCon
// update device search path
- deviceSearchPath.append( dev->blockDeviceName() );
+ if( !saveDeviceSearchPath.contains( dev->blockDeviceName() ) )
+ saveDeviceSearchPath.append( dev->blockDeviceName() );
// save the device type settings
@@ -413,5 +419,5 @@ bool K3bCdDevice::DeviceManager::saveCon
}
- c->writeEntry( "device_search_path", deviceSearchPath );
+ c->writeEntry( "device_search_path", saveDeviceSearchPath );
c->sync();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic