remove the NO_THREADED_DEVICE_SCANNER ifdefs, they are not requires anymore
(and never really were) svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1119568
This commit is contained in:
parent
19ed42c34b
commit
0bc6695513
|
@ -438,9 +438,7 @@ void OperationStack::clearOperations()
|
|||
/** Clears the list of Devices. */
|
||||
void OperationStack::clearDevices()
|
||||
{
|
||||
#if !defined(NO_THREADED_DEVICE_SCANNER)
|
||||
QWriteLocker lockDevices(&lock());
|
||||
#endif
|
||||
|
||||
qDeleteAll(previewDevices());
|
||||
previewDevices().clear();
|
||||
|
@ -453,9 +451,7 @@ void OperationStack::clearDevices()
|
|||
*/
|
||||
Device* OperationStack::findDeviceForPartition(const Partition* p)
|
||||
{
|
||||
#if !defined(NO_THREADED_DEVICE_SCANNER)
|
||||
QReadLocker lockDevices(&lock());
|
||||
#endif
|
||||
|
||||
foreach (Device* d, previewDevices())
|
||||
{
|
||||
|
@ -483,9 +479,7 @@ void OperationStack::addDevice(Device* d)
|
|||
{
|
||||
Q_ASSERT(d);
|
||||
|
||||
#if !defined(NO_THREADED_DEVICE_SCANNER)
|
||||
QWriteLocker lockDevices(&lock());
|
||||
#endif
|
||||
|
||||
previewDevices().append(d);
|
||||
emit devicesChanged();
|
||||
|
@ -498,9 +492,7 @@ static bool deviceLessThan(const Device* d1, const Device* d2)
|
|||
|
||||
void OperationStack::sortDevices()
|
||||
{
|
||||
#if !defined(NO_THREADED_DEVICE_SCANNER)
|
||||
QWriteLocker lockDevices(&lock());
|
||||
#endif
|
||||
|
||||
qSort(previewDevices().begin(), previewDevices().end(), deviceLessThan);
|
||||
|
||||
|
|
|
@ -466,9 +466,7 @@ void MainWindow::on_m_OperationStack_operationsChanged()
|
|||
|
||||
void MainWindow::on_m_OperationStack_devicesChanged()
|
||||
{
|
||||
#if !defined(NO_THREADED_DEVICE_SCANNER)
|
||||
QReadLocker lockDevices(&operationStack().lock());
|
||||
#endif
|
||||
|
||||
listDevices().updateDevices(operationStack().previewDevices());
|
||||
|
||||
|
@ -593,15 +591,10 @@ void MainWindow::scanDevices()
|
|||
|
||||
KApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
|
||||
#if !defined(NO_THREADED_DEVICE_SCANNER)
|
||||
scanProgressDialog().setEnabled(true);
|
||||
scanProgressDialog().show();
|
||||
|
||||
deviceScanner().start();
|
||||
#else
|
||||
deviceScanner().scan();
|
||||
on_m_DeviceScanner_finished();
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::on_m_DeviceScanner_progress(const QString& device_node, int percent)
|
||||
|
@ -612,11 +605,9 @@ void MainWindow::on_m_DeviceScanner_progress(const QString& device_node, int per
|
|||
|
||||
void MainWindow::on_m_DeviceScanner_finished()
|
||||
{
|
||||
#if !defined(NO_THREADED_DEVICE_SCANNER)
|
||||
QReadLocker lockDevices(&operationStack().lock());
|
||||
|
||||
scanProgressDialog().setProgress(100);
|
||||
#endif
|
||||
|
||||
if (!operationStack().previewDevices().isEmpty())
|
||||
pmWidget().setSelectedDevice(operationStack().previewDevices()[0]);
|
||||
|
|
|
@ -185,9 +185,7 @@ Partition* PartitionManagerWidget::selectedPartition()
|
|||
|
||||
void PartitionManagerWidget::setSelectedDevice(const QString& device_node)
|
||||
{
|
||||
#if !defined(NO_THREADED_DEVICE_SCANNER)
|
||||
QReadLocker lockDevices(&operationStack().lock());
|
||||
#endif
|
||||
|
||||
foreach(Device* d, operationStack().previewDevices())
|
||||
if (d->deviceNode() == device_node)
|
||||
|
|
Loading…
Reference in New Issue