~ubuntu-branches/ubuntu/quantal/kremotecontrol/quantal-proposed

« back to all changes in this revision

Viewing changes to kcmremotecontrol/model.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-12-02 01:00:12 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20121202010012-nz5zlkzuk3km15le
Tags: 4:4.9.4-0ubuntu0.1
New upstream bugfix release (LP: #1085516)

Show diffs side-by-side

added added

removed removed

Lines of Context:
763
763
        return remote->name();
764
764
    }
765
765
    if(role == Qt::DecorationRole){
766
 
        return KIcon(remote->masterMode()->iconName());
 
766
        if(remote->isAvailable()) {
 
767
            return KIcon(remote->masterMode()->iconName());
 
768
        } else {
 
769
            return KIcon(remote->masterMode()->iconName(), 0, QStringList() << QLatin1String("emblem-important"));
 
770
        }
 
771
    }
 
772
    if(role == Qt::ToolTipRole) {
 
773
        if(!remote->isAvailable()) {
 
774
            return i18n("This remote control is currently not available.");
 
775
        }
767
776
    }
768
777
    return QStandardItem::data(role);
769
778
}