Changeset c930de6


Ignore:
Timestamp:
12/27/13 11:57:47 (14 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1
Children:
534c70e
Parents:
15cf8b7
Message:

Add debugging to the mounttray "child" device detection and simplify it a bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-mounttray/devCheck.cpp

    re020f6a rc930de6  
    4141  devDir.cd(DEVICEDIR); 
    4242  QStringList subdevs; 
    43   if(node.isEmpty()){ 
     43  //if(node.isEmpty()){ 
    4444    subdevs = devDir.entryList(devFilter, QDir::NoDotAndDotDot | QDir::NoSymLinks | QDir::System, QDir::NoSort); 
    45   }else{ 
    46     subdevs = devDir.entryList(QStringList(node+"*"), QDir::NoDotAndDotDot | QDir::NoSymLinks | QDir::System, QDir::NoSort); 
    47   } 
     45  //}else{ 
     46    //subdevs = devDir.entryList(QStringList(node+"*"), QDir::NoDotAndDotDot | QDir::NoSymLinks | QDir::System, QDir::NoSort); 
     47  //} 
    4848  //Clean up the list of children 
    4949  for(int i=0; i<subdevs.length(); i++){ 
    50     if( (subdevs[i] == node) || subdevs[i].isEmpty() ){ 
     50    if( (subdevs[i] == node) || subdevs[i].isEmpty() || !subdevs[i].startsWith(node) ){ 
    5151      subdevs.removeAt(i); 
    5252      i--; 
    5353    } 
    5454  } 
     55  qDebug() << "[DEBUG] " <<node << "Device Children:" << subdevs; 
    5556  return subdevs; 
    5657} 
Note: See TracChangeset for help on using the changeset viewer.