equal
deleted
inserted
replaced
141 break; } |
141 break; } |
142 default: |
142 default: |
143 menuOption.icon = qvariant_cast<QPixmap>(variant); |
143 menuOption.icon = qvariant_cast<QPixmap>(variant); |
144 break; |
144 break; |
145 } |
145 } |
146 |
146 if (qVariantCanConvert<QBrush>(index.data(Qt::BackgroundRole))) { |
|
147 menuOption.palette.setBrush(QPalette::All, QPalette::Background, |
|
148 qvariant_cast<QBrush>(index.data(Qt::BackgroundRole))); |
|
149 } |
147 menuOption.text = index.model()->data(index, Qt::DisplayRole).toString() |
150 menuOption.text = index.model()->data(index, Qt::DisplayRole).toString() |
148 .replace(QLatin1Char('&'), QLatin1String("&&")); |
151 .replace(QLatin1Char('&'), QLatin1String("&&")); |
149 menuOption.tabWidth = 0; |
152 menuOption.tabWidth = 0; |
150 menuOption.maxIconWidth = option.decorationSize.width() + 4; |
153 menuOption.maxIconWidth = option.decorationSize.width() + 4; |
151 menuOption.menuRect = option.rect; |
154 menuOption.menuRect = option.rect; |