[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    KFilePlacesModel/View question
From:       nf2 <nf2.email () gmail ! com>
Date:       2009-10-18 11:24:57
Message-ID: aaed7a190910180424y3cdb13fo8dd50aeaff8784d3 () mail ! gmail ! com
[Download RAW message or body]

I'm wondering whether the device related code in KFilePlacesModel
could be internalized a bit. So that the classes using it don't have
to deal with devices directly (like kfilplacesview.cpp,
systemmodel.cpp, placesengine.cpp, placesrunner.cpp). That way we
could more easily plug a different model, for instance when running
KDE apps outside KDE.

My question is about the code at line 152 in kfileplacesview.cpp:

if (((device.is<Solid::StorageAccess>() &&
device.as<Solid::StorageAccess>()->isAccessible()) ||
             (device.parent().is<Solid::StorageAccess>() &&
device.parent().as<Solid::StorageAccess>()->isAccessible())) &&
            ((device.is<Solid::StorageDrive>() &&
device.as<Solid::StorageDrive>()->isRemovable()) ||
             (device.parent().is<Solid::StorageDrive>() &&
device.parent().as<Solid::StorageDrive>()->isRemovable())) &&
            ((device.is<Solid::StorageDrive>() &&
device.as<Solid::StorageDrive>()->driveType() !=
Solid::StorageDrive::CdromDrive) ||
             (device.parent().is<Solid::StorageDrive>() &&
device.parent().as<Solid::StorageDrive>()->driveType() !=
Solid::StorageDrive::CdromDrive))) {
            isRemovableDevice = true;
        }

It hardly ever sets isRemovableDevice = true (which would show the
capacity bar), or perhaps i just don't have devices where it would.

Regards,
Norbert
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic