Accepting request 55811 from KDE:Distro:Factory
Accepted submit request 55811 from user wstephenson OBS-URL: https://build.opensuse.org/request/show/55811 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/k3b?expand=0&rev=24
This commit is contained in:
parent
bd675af742
commit
8865beb6dd
105
device-detection-fix.patch
Normal file
105
device-detection-fix.patch
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
Don't assume optical Solid device has also Solid::Block interface. For some reason it can lack it (hardware issue or Solid bug)
|
||||||
|
BUG: 249371
|
||||||
|
---
|
||||||
|
--- k3b/libk3bdevice/k3bdevicemanager.cpp 2010/09/09 18:58:01 1173574
|
||||||
|
+++ k3b/libk3bdevice/k3bdevicemanager.cpp 2010/09/09 19:01:06 1173575
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Copyright (C) 2003-2009 Sebastian Trueg <trueg@k3b.org>
|
||||||
|
+ * Copyright (C) 2010 Michal Malek <michalm@jabster.pl>
|
||||||
|
*
|
||||||
|
* This file is part of the K3b project.
|
||||||
|
* Copyright (C) 1998-2009 Sebastian Trueg <trueg@k3b.org>
|
||||||
|
@@ -290,7 +291,7 @@
|
||||||
|
|
||||||
|
emit changed( this );
|
||||||
|
emit changed();
|
||||||
|
-
|
||||||
|
+
|
||||||
|
qDeleteAll( devicesToDelete );
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -354,12 +355,13 @@
|
||||||
|
|
||||||
|
K3b::Device::Device* K3b::Device::DeviceManager::addDevice( const Solid::Device& solidDevice )
|
||||||
|
{
|
||||||
|
- if ( findDevice( solidDevice.as<Solid::Block>()->device() ) ) {
|
||||||
|
- kDebug() << "(K3b::Device::DeviceManager) dev " << solidDevice.as<Solid::Block>()->device() << " already found";
|
||||||
|
- return 0;
|
||||||
|
+ if( const Solid::Block* blockDevice = solidDevice.as<Solid::Block>() ) {
|
||||||
|
+ if( !findDevice( blockDevice->device() ) )
|
||||||
|
+ return addDevice( new K3b::Device::Device( solidDevice ) );
|
||||||
|
+ else
|
||||||
|
+ kDebug() << "(K3b::Device::DeviceManager) dev " << blockDevice->device() << " already found";
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- return addDevice( new K3b::Device::Device( solidDevice ) );
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -409,19 +411,21 @@
|
||||||
|
|
||||||
|
void K3b::Device::DeviceManager::removeDevice( const Solid::Device& dev )
|
||||||
|
{
|
||||||
|
- if( Device* device = findDevice( dev.as<Solid::Block>()->device() ) ) {
|
||||||
|
- d->cdReader.removeAll( device );
|
||||||
|
- d->dvdReader.removeAll( device );
|
||||||
|
- d->bdReader.removeAll( device );
|
||||||
|
- d->cdWriter.removeAll( device );
|
||||||
|
- d->dvdWriter.removeAll( device );
|
||||||
|
- d->bdWriter.removeAll( device );
|
||||||
|
- d->allDevices.removeAll( device );
|
||||||
|
+ if( const Solid::Block* blockDevice = dev.as<Solid::Block>() ) {
|
||||||
|
+ if( Device* device = findDevice( blockDevice->device() ) ) {
|
||||||
|
+ d->cdReader.removeAll( device );
|
||||||
|
+ d->dvdReader.removeAll( device );
|
||||||
|
+ d->bdReader.removeAll( device );
|
||||||
|
+ d->cdWriter.removeAll( device );
|
||||||
|
+ d->dvdWriter.removeAll( device );
|
||||||
|
+ d->bdWriter.removeAll( device );
|
||||||
|
+ d->allDevices.removeAll( device );
|
||||||
|
|
||||||
|
- emit changed( this );
|
||||||
|
- emit changed();
|
||||||
|
+ emit changed( this );
|
||||||
|
+ emit changed();
|
||||||
|
|
||||||
|
- delete device;
|
||||||
|
+ delete device;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--- k3b/src/k3bappdevicemanager.cpp 2010/09/09 18:58:01 1173574
|
||||||
|
+++ k3b/src/k3bappdevicemanager.cpp 2010/09/09 19:01:06 1173575
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Copyright (C) 2005-2008 Sebastian Trueg <trueg@k3b.org>
|
||||||
|
+ * Copyright (C) 2010 Michal Malek <michalm@jabster.pl>
|
||||||
|
*
|
||||||
|
* This file is part of the K3b project.
|
||||||
|
* Copyright (C) 1998-2008 Sebastian Trueg <trueg@k3b.org>
|
||||||
|
@@ -125,13 +126,15 @@
|
||||||
|
|
||||||
|
void K3b::AppDeviceManager::removeDevice( const Solid::Device& solidDev )
|
||||||
|
{
|
||||||
|
- if( findDevice( solidDev.as<Solid::Block>()->device() ) == currentDevice() )
|
||||||
|
- setCurrentDevice( 0 );
|
||||||
|
+ if( const Solid::Block* blockDevice = solidDev.as<Solid::Block>() ) {
|
||||||
|
+ if( findDevice( blockDevice->device() ) == currentDevice() )
|
||||||
|
+ setCurrentDevice( 0 );
|
||||||
|
|
||||||
|
- K3b::Device::DeviceManager::removeDevice( solidDev );
|
||||||
|
+ K3b::Device::DeviceManager::removeDevice( solidDev );
|
||||||
|
|
||||||
|
- if( currentDevice() == 0 && !allDevices().isEmpty() )
|
||||||
|
- setCurrentDevice( allDevices().first() );
|
||||||
|
+ if( currentDevice() == 0 && !allDevices().isEmpty() )
|
||||||
|
+ setCurrentDevice( allDevices().first() );
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Nov 28 10:17:07 CET 2010 - jslaby@suse.de
|
||||||
|
|
||||||
|
- Device detection crash fix
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Oct 22 14:21:19 UTC 2010 - abrouwers@gmail.com
|
Fri Oct 22 14:21:19 UTC 2010 - abrouwers@gmail.com
|
||||||
|
|
||||||
|
2
k3b.spec
2
k3b.spec
@ -47,6 +47,7 @@ Release: 3
|
|||||||
%define rversion %version
|
%define rversion %version
|
||||||
# svn.kde.org/home/kde/trunk/extragear/multimedia/k3b
|
# svn.kde.org/home/kde/trunk/extragear/multimedia/k3b
|
||||||
Source0: k3b-%{version}.tar.bz2
|
Source0: k3b-%{version}.tar.bz2
|
||||||
|
Patch0: device-detection-fix.patch
|
||||||
Patch1: initial-preference.diff
|
Patch1: initial-preference.diff
|
||||||
# fixed in 2.0.2 / 2.1: https://bugs.kde.org/show_bug.cgi?id=238819
|
# fixed in 2.0.2 / 2.1: https://bugs.kde.org/show_bug.cgi?id=238819
|
||||||
Patch2: k3b-2.0.1-qt47_settings_crash.patch
|
Patch2: k3b-2.0.1-qt47_settings_crash.patch
|
||||||
@ -88,6 +89,7 @@ Authors:
|
|||||||
%lang_package
|
%lang_package
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n k3b-%{version}
|
%setup -q -n k3b-%{version}
|
||||||
|
%patch0 -p1
|
||||||
%patch1
|
%patch1
|
||||||
%patch2
|
%patch2
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user