| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qshortcutmap.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||||||||
| 7 | struct QShortcutEntry | - | ||||||||||||||||||||||||||||||
| 8 | { | - | ||||||||||||||||||||||||||||||
| 9 | QShortcutEntry() | - | ||||||||||||||||||||||||||||||
| 10 | : keyseq(0), context(Qt::WindowShortcut), enabled(false), autorepeat(1), id(0), owner(0), contextMatcher(0) | - | ||||||||||||||||||||||||||||||
| 11 | {} never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 12 | - | |||||||||||||||||||||||||||||||
| 13 | QShortcutEntry(const QKeySequence &k) | - | ||||||||||||||||||||||||||||||
| 14 | : keyseq(k), context(Qt::WindowShortcut), enabled(false), autorepeat(1), id(0), owner(0), contextMatcher(0) | - | ||||||||||||||||||||||||||||||
| 15 | {} never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 16 | - | |||||||||||||||||||||||||||||||
| 17 | QShortcutEntry(QObject *o, const QKeySequence &k, Qt::ShortcutContext c, int i, bool a, QShortcutMap::ContextMatcher m) | - | ||||||||||||||||||||||||||||||
| 18 | : keyseq(k), context(c), enabled(true), autorepeat(a), id(i), owner(o), contextMatcher(m) | - | ||||||||||||||||||||||||||||||
| 19 | {} never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 20 | - | |||||||||||||||||||||||||||||||
| 21 | bool correctContext() const { return never executed: contextMatcher(owner, context);return contextMatcher(owner, context);never executed: }return contextMatcher(owner, context); | 0 | ||||||||||||||||||||||||||||||
| 22 | - | |||||||||||||||||||||||||||||||
| 23 | bool operator<(const QShortcutEntry &f) const | - | ||||||||||||||||||||||||||||||
| 24 | { return never executed: keyseq < f.keyseq;return keyseq < f.keyseq;never executed: }return keyseq < f.keyseq; | 0 | ||||||||||||||||||||||||||||||
| 25 | - | |||||||||||||||||||||||||||||||
| 26 | QKeySequence keyseq; | - | ||||||||||||||||||||||||||||||
| 27 | Qt::ShortcutContext context; | - | ||||||||||||||||||||||||||||||
| 28 | bool enabled : 1; | - | ||||||||||||||||||||||||||||||
| 29 | bool autorepeat : 1; | - | ||||||||||||||||||||||||||||||
| 30 | signed int id; | - | ||||||||||||||||||||||||||||||
| 31 | QObject *owner; | - | ||||||||||||||||||||||||||||||
| 32 | QShortcutMap::ContextMatcher contextMatcher; | - | ||||||||||||||||||||||||||||||
| 33 | }; | - | ||||||||||||||||||||||||||||||
| 34 | class QShortcutMapPrivate | - | ||||||||||||||||||||||||||||||
| 35 | { | - | ||||||||||||||||||||||||||||||
| 36 | inline QShortcutMap* q_func() { return static_cast<QShortcutMap *>(q_ptr); } inline const QShortcutMap* q_func() const { return static_cast<const QShortcutMap *>(q_ptr); } friend class QShortcutMap; | - | ||||||||||||||||||||||||||||||
| 37 | - | |||||||||||||||||||||||||||||||
| 38 | public: | - | ||||||||||||||||||||||||||||||
| 39 | QShortcutMapPrivate(QShortcutMap* parent) | - | ||||||||||||||||||||||||||||||
| 40 | : q_ptr(parent), currentId(0), ambigCount(0), currentState(QKeySequence::NoMatch) | - | ||||||||||||||||||||||||||||||
| 41 | { | - | ||||||||||||||||||||||||||||||
| 42 | identicals.reserve(10); | - | ||||||||||||||||||||||||||||||
| 43 | currentSequences.reserve(10); | - | ||||||||||||||||||||||||||||||
| 44 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 45 | QShortcutMap *q_ptr; | - | ||||||||||||||||||||||||||||||
| 46 | - | |||||||||||||||||||||||||||||||
| 47 | QList<QShortcutEntry> sequences; | - | ||||||||||||||||||||||||||||||
| 48 | - | |||||||||||||||||||||||||||||||
| 49 | int currentId; | - | ||||||||||||||||||||||||||||||
| 50 | int ambigCount; | - | ||||||||||||||||||||||||||||||
| 51 | QKeySequence::SequenceMatch currentState; | - | ||||||||||||||||||||||||||||||
| 52 | QVector<QKeySequence> currentSequences; | - | ||||||||||||||||||||||||||||||
| 53 | QVector<QKeySequence> newEntries; | - | ||||||||||||||||||||||||||||||
| 54 | QKeySequence prevSequence; | - | ||||||||||||||||||||||||||||||
| 55 | QVector<const QShortcutEntry*> identicals; | - | ||||||||||||||||||||||||||||||
| 56 | }; | - | ||||||||||||||||||||||||||||||
| 57 | - | |||||||||||||||||||||||||||||||
| 58 | - | |||||||||||||||||||||||||||||||
| 59 | - | |||||||||||||||||||||||||||||||
| 60 | - | |||||||||||||||||||||||||||||||
| 61 | - | |||||||||||||||||||||||||||||||
| 62 | QShortcutMap::QShortcutMap() | - | ||||||||||||||||||||||||||||||
| 63 | : d_ptr(new QShortcutMapPrivate(this)) | - | ||||||||||||||||||||||||||||||
| 64 | { | - | ||||||||||||||||||||||||||||||
| 65 | resetState(); | - | ||||||||||||||||||||||||||||||
| 66 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 67 | - | |||||||||||||||||||||||||||||||
| 68 | - | |||||||||||||||||||||||||||||||
| 69 | - | |||||||||||||||||||||||||||||||
| 70 | - | |||||||||||||||||||||||||||||||
| 71 | QShortcutMap::~QShortcutMap() | - | ||||||||||||||||||||||||||||||
| 72 | { | - | ||||||||||||||||||||||||||||||
| 73 | } | - | ||||||||||||||||||||||||||||||
| 74 | - | |||||||||||||||||||||||||||||||
| 75 | - | |||||||||||||||||||||||||||||||
| 76 | - | |||||||||||||||||||||||||||||||
| 77 | - | |||||||||||||||||||||||||||||||
| 78 | - | |||||||||||||||||||||||||||||||
| 79 | int QShortcutMap::addShortcut(QObject *owner, const QKeySequence &key, Qt::ShortcutContext context, ContextMatcher matcher) | - | ||||||||||||||||||||||||||||||
| 80 | { | - | ||||||||||||||||||||||||||||||
| 81 | ((!(owner)) ? qt_assert_x("QShortcutMap::addShortcut", "All shortcuts need an owner",__FILE__,154) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 82 | ((!(!key.isEmpty())) ? qt_assert_x("QShortcutMap::addShortcut", "Cannot add keyless shortcuts to map",__FILE__,155) : qt_noop()); | - | ||||||||||||||||||||||||||||||
| 83 | QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 84 | - | |||||||||||||||||||||||||||||||
| 85 | QShortcutEntry newEntry(owner, key, context, --(d->currentId), true, matcher); | - | ||||||||||||||||||||||||||||||
| 86 | QList<QShortcutEntry>::iterator it = std::upper_bound(d->sequences.begin(), d->sequences.end(), newEntry); | - | ||||||||||||||||||||||||||||||
| 87 | d->sequences.insert(it, newEntry); | - | ||||||||||||||||||||||||||||||
| 88 | - | |||||||||||||||||||||||||||||||
| 89 | - | |||||||||||||||||||||||||||||||
| 90 | - | |||||||||||||||||||||||||||||||
| 91 | - | |||||||||||||||||||||||||||||||
| 92 | - | |||||||||||||||||||||||||||||||
| 93 | return never executed: d->currentId;return d->currentId;never executed: return d->currentId; | 0 | ||||||||||||||||||||||||||||||
| 94 | } | - | ||||||||||||||||||||||||||||||
| 95 | int QShortcutMap::removeShortcut(int id, QObject *owner, const QKeySequence &key) | - | ||||||||||||||||||||||||||||||
| 96 | { | - | ||||||||||||||||||||||||||||||
| 97 | QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 98 | int itemsRemoved = 0; | - | ||||||||||||||||||||||||||||||
| 99 | bool allOwners = (owner == 0); | - | ||||||||||||||||||||||||||||||
| 100 | bool allKeys = key.isEmpty(); | - | ||||||||||||||||||||||||||||||
| 101 | bool allIds = id == 0; | - | ||||||||||||||||||||||||||||||
| 102 | - | |||||||||||||||||||||||||||||||
| 103 | - | |||||||||||||||||||||||||||||||
| 104 | if (allOwners
| 0 | ||||||||||||||||||||||||||||||
| 105 | itemsRemoved = d->sequences.size(); | - | ||||||||||||||||||||||||||||||
| 106 | d->sequences.clear(); | - | ||||||||||||||||||||||||||||||
| 107 | return never executed: itemsRemoved;return itemsRemoved;never executed: return itemsRemoved; | 0 | ||||||||||||||||||||||||||||||
| 108 | } | - | ||||||||||||||||||||||||||||||
| 109 | - | |||||||||||||||||||||||||||||||
| 110 | int i = d->sequences.size()-1; | - | ||||||||||||||||||||||||||||||
| 111 | while (i>=0
| 0 | ||||||||||||||||||||||||||||||
| 112 | { | - | ||||||||||||||||||||||||||||||
| 113 | const QShortcutEntry &entry = d->sequences.at(i); | - | ||||||||||||||||||||||||||||||
| 114 | int entryId = entry.id; | - | ||||||||||||||||||||||||||||||
| 115 | if ((allOwners
| 0 | ||||||||||||||||||||||||||||||
| 116 | && (allIds
| 0 | ||||||||||||||||||||||||||||||
| 117 | && (allKeys
| 0 | ||||||||||||||||||||||||||||||
| 118 | d->sequences.removeAt(i); | - | ||||||||||||||||||||||||||||||
| 119 | ++itemsRemoved; | - | ||||||||||||||||||||||||||||||
| 120 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 121 | if (id == entryId
| 0 | ||||||||||||||||||||||||||||||
| 122 | return never executed: itemsRemoved;return itemsRemoved;never executed: return itemsRemoved; | 0 | ||||||||||||||||||||||||||||||
| 123 | --i; | - | ||||||||||||||||||||||||||||||
| 124 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 125 | - | |||||||||||||||||||||||||||||||
| 126 | - | |||||||||||||||||||||||||||||||
| 127 | - | |||||||||||||||||||||||||||||||
| 128 | - | |||||||||||||||||||||||||||||||
| 129 | - | |||||||||||||||||||||||||||||||
| 130 | return never executed: itemsRemoved;return itemsRemoved;never executed: return itemsRemoved; | 0 | ||||||||||||||||||||||||||||||
| 131 | } | - | ||||||||||||||||||||||||||||||
| 132 | int QShortcutMap::setShortcutEnabled(bool enable, int id, QObject *owner, const QKeySequence &key) | - | ||||||||||||||||||||||||||||||
| 133 | { | - | ||||||||||||||||||||||||||||||
| 134 | QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 135 | int itemsChanged = 0; | - | ||||||||||||||||||||||||||||||
| 136 | bool allOwners = (owner == 0); | - | ||||||||||||||||||||||||||||||
| 137 | bool allKeys = key.isEmpty(); | - | ||||||||||||||||||||||||||||||
| 138 | bool allIds = id == 0; | - | ||||||||||||||||||||||||||||||
| 139 | - | |||||||||||||||||||||||||||||||
| 140 | int i = d->sequences.size()-1; | - | ||||||||||||||||||||||||||||||
| 141 | while (i>=0
| 0 | ||||||||||||||||||||||||||||||
| 142 | { | - | ||||||||||||||||||||||||||||||
| 143 | QShortcutEntry entry = d->sequences.at(i); | - | ||||||||||||||||||||||||||||||
| 144 | if ((allOwners
| 0 | ||||||||||||||||||||||||||||||
| 145 | && (allIds
| 0 | ||||||||||||||||||||||||||||||
| 146 | && (allKeys
| 0 | ||||||||||||||||||||||||||||||
| 147 | d->sequences[i].enabled = enable; | - | ||||||||||||||||||||||||||||||
| 148 | ++itemsChanged; | - | ||||||||||||||||||||||||||||||
| 149 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 150 | if (id == entry.id
| 0 | ||||||||||||||||||||||||||||||
| 151 | return never executed: itemsChanged;return itemsChanged;never executed: return itemsChanged; | 0 | ||||||||||||||||||||||||||||||
| 152 | --i; | - | ||||||||||||||||||||||||||||||
| 153 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 154 | - | |||||||||||||||||||||||||||||||
| 155 | - | |||||||||||||||||||||||||||||||
| 156 | - | |||||||||||||||||||||||||||||||
| 157 | - | |||||||||||||||||||||||||||||||
| 158 | - | |||||||||||||||||||||||||||||||
| 159 | return never executed: itemsChanged;return itemsChanged;never executed: return itemsChanged; | 0 | ||||||||||||||||||||||||||||||
| 160 | } | - | ||||||||||||||||||||||||||||||
| 161 | int QShortcutMap::setShortcutAutoRepeat(bool on, int id, QObject *owner, const QKeySequence &key) | - | ||||||||||||||||||||||||||||||
| 162 | { | - | ||||||||||||||||||||||||||||||
| 163 | QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 164 | int itemsChanged = 0; | - | ||||||||||||||||||||||||||||||
| 165 | bool allOwners = (owner == 0); | - | ||||||||||||||||||||||||||||||
| 166 | bool allKeys = key.isEmpty(); | - | ||||||||||||||||||||||||||||||
| 167 | bool allIds = id == 0; | - | ||||||||||||||||||||||||||||||
| 168 | - | |||||||||||||||||||||||||||||||
| 169 | int i = d->sequences.size()-1; | - | ||||||||||||||||||||||||||||||
| 170 | while (i>=0
| 0 | ||||||||||||||||||||||||||||||
| 171 | { | - | ||||||||||||||||||||||||||||||
| 172 | QShortcutEntry entry = d->sequences.at(i); | - | ||||||||||||||||||||||||||||||
| 173 | if ((allOwners
| 0 | ||||||||||||||||||||||||||||||
| 174 | && (allIds
| 0 | ||||||||||||||||||||||||||||||
| 175 | && (allKeys
| 0 | ||||||||||||||||||||||||||||||
| 176 | d->sequences[i].autorepeat = on; | - | ||||||||||||||||||||||||||||||
| 177 | ++itemsChanged; | - | ||||||||||||||||||||||||||||||
| 178 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 179 | if (id == entry.id
| 0 | ||||||||||||||||||||||||||||||
| 180 | return never executed: itemsChanged;return itemsChanged;never executed: return itemsChanged; | 0 | ||||||||||||||||||||||||||||||
| 181 | --i; | - | ||||||||||||||||||||||||||||||
| 182 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 183 | - | |||||||||||||||||||||||||||||||
| 184 | - | |||||||||||||||||||||||||||||||
| 185 | - | |||||||||||||||||||||||||||||||
| 186 | - | |||||||||||||||||||||||||||||||
| 187 | - | |||||||||||||||||||||||||||||||
| 188 | return never executed: itemsChanged;return itemsChanged;never executed: return itemsChanged; | 0 | ||||||||||||||||||||||||||||||
| 189 | } | - | ||||||||||||||||||||||||||||||
| 190 | - | |||||||||||||||||||||||||||||||
| 191 | - | |||||||||||||||||||||||||||||||
| 192 | - | |||||||||||||||||||||||||||||||
| 193 | - | |||||||||||||||||||||||||||||||
| 194 | void QShortcutMap::resetState() | - | ||||||||||||||||||||||||||||||
| 195 | { | - | ||||||||||||||||||||||||||||||
| 196 | QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 197 | d->currentState = QKeySequence::NoMatch; | - | ||||||||||||||||||||||||||||||
| 198 | clearSequence(d->currentSequences); | - | ||||||||||||||||||||||||||||||
| 199 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 200 | - | |||||||||||||||||||||||||||||||
| 201 | - | |||||||||||||||||||||||||||||||
| 202 | - | |||||||||||||||||||||||||||||||
| 203 | - | |||||||||||||||||||||||||||||||
| 204 | QKeySequence::SequenceMatch QShortcutMap::state() | - | ||||||||||||||||||||||||||||||
| 205 | { | - | ||||||||||||||||||||||||||||||
| 206 | QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 207 | return never executed: d->currentState;return d->currentState;never executed: return d->currentState; | 0 | ||||||||||||||||||||||||||||||
| 208 | } | - | ||||||||||||||||||||||||||||||
| 209 | bool QShortcutMap::tryShortcut(QKeyEvent *e) | - | ||||||||||||||||||||||||||||||
| 210 | { | - | ||||||||||||||||||||||||||||||
| 211 | QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 212 | - | |||||||||||||||||||||||||||||||
| 213 | if (e->key() == Qt::Key_unknown
| 0 | ||||||||||||||||||||||||||||||
| 214 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||
| 215 | - | |||||||||||||||||||||||||||||||
| 216 | QKeySequence::SequenceMatch previousState = state(); | - | ||||||||||||||||||||||||||||||
| 217 | - | |||||||||||||||||||||||||||||||
| 218 | switch (nextState(e)) { | - | ||||||||||||||||||||||||||||||
| 219 | case never executed: QKeySequence::NoMatch:case QKeySequence::NoMatch:never executed: case QKeySequence::NoMatch: | 0 | ||||||||||||||||||||||||||||||
| 220 | - | |||||||||||||||||||||||||||||||
| 221 | - | |||||||||||||||||||||||||||||||
| 222 | - | |||||||||||||||||||||||||||||||
| 223 | return never executed: previousState == QKeySequence::PartialMatch;return previousState == QKeySequence::PartialMatch;never executed: return previousState == QKeySequence::PartialMatch; | 0 | ||||||||||||||||||||||||||||||
| 224 | case never executed: QKeySequence::PartialMatch:case QKeySequence::PartialMatch:never executed: case QKeySequence::PartialMatch: | 0 | ||||||||||||||||||||||||||||||
| 225 | - | |||||||||||||||||||||||||||||||
| 226 | - | |||||||||||||||||||||||||||||||
| 227 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||
| 228 | case never executed: QKeySequence::ExactMatch:case QKeySequence::ExactMatch:never executed: {case QKeySequence::ExactMatch: | 0 | ||||||||||||||||||||||||||||||
| 229 | - | |||||||||||||||||||||||||||||||
| 230 | - | |||||||||||||||||||||||||||||||
| 231 | const int identicalMatches = d->identicals.count(); | - | ||||||||||||||||||||||||||||||
| 232 | resetState(); | - | ||||||||||||||||||||||||||||||
| 233 | dispatchEvent(e); | - | ||||||||||||||||||||||||||||||
| 234 | - | |||||||||||||||||||||||||||||||
| 235 | - | |||||||||||||||||||||||||||||||
| 236 | return never executed: identicalMatches > 0;return identicalMatches > 0;never executed: return identicalMatches > 0; | 0 | ||||||||||||||||||||||||||||||
| 237 | } | - | ||||||||||||||||||||||||||||||
| 238 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||
| 239 | do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,350) : qt_noop()); __builtin_unreachable(); } while (0); | - | ||||||||||||||||||||||||||||||
| 240 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 241 | } | - | ||||||||||||||||||||||||||||||
| 242 | - | |||||||||||||||||||||||||||||||
| 243 | - | |||||||||||||||||||||||||||||||
| 244 | - | |||||||||||||||||||||||||||||||
| 245 | - | |||||||||||||||||||||||||||||||
| 246 | - | |||||||||||||||||||||||||||||||
| 247 | - | |||||||||||||||||||||||||||||||
| 248 | - | |||||||||||||||||||||||||||||||
| 249 | QKeySequence::SequenceMatch QShortcutMap::nextState(QKeyEvent *e) | - | ||||||||||||||||||||||||||||||
| 250 | { | - | ||||||||||||||||||||||||||||||
| 251 | QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 252 | - | |||||||||||||||||||||||||||||||
| 253 | if (e->key() >= Qt::Key_Shift
| 0 | ||||||||||||||||||||||||||||||
| 254 | e->key() <= Qt::Key_Alt
| 0 | ||||||||||||||||||||||||||||||
| 255 | return never executed: d->currentState;return d->currentState;never executed: return d->currentState; | 0 | ||||||||||||||||||||||||||||||
| 256 | - | |||||||||||||||||||||||||||||||
| 257 | QKeySequence::SequenceMatch result = QKeySequence::NoMatch; | - | ||||||||||||||||||||||||||||||
| 258 | - | |||||||||||||||||||||||||||||||
| 259 | - | |||||||||||||||||||||||||||||||
| 260 | d->identicals.resize(0); | - | ||||||||||||||||||||||||||||||
| 261 | - | |||||||||||||||||||||||||||||||
| 262 | result = find(e); | - | ||||||||||||||||||||||||||||||
| 263 | if (result == QKeySequence::NoMatch
| 0 | ||||||||||||||||||||||||||||||
| 264 | - | |||||||||||||||||||||||||||||||
| 265 | result = find(e, Qt::KeypadModifier); | - | ||||||||||||||||||||||||||||||
| 266 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 267 | if (result == QKeySequence::NoMatch
| 0 | ||||||||||||||||||||||||||||||
| 268 | - | |||||||||||||||||||||||||||||||
| 269 | if (e->key() == Qt::Key_Backtab
| 0 | ||||||||||||||||||||||||||||||
| 270 | QKeyEvent pe = QKeyEvent(e->type(), Qt::Key_Tab, e->modifiers(), e->text()); | - | ||||||||||||||||||||||||||||||
| 271 | result = find(&pe); | - | ||||||||||||||||||||||||||||||
| 272 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 273 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 274 | - | |||||||||||||||||||||||||||||||
| 275 | - | |||||||||||||||||||||||||||||||
| 276 | if (result == QKeySequence::NoMatch
| 0 | ||||||||||||||||||||||||||||||
| 277 | clearSequence(d->currentSequences); never executed: clearSequence(d->currentSequences); | 0 | ||||||||||||||||||||||||||||||
| 278 | d->currentState = result; | - | ||||||||||||||||||||||||||||||
| 279 | - | |||||||||||||||||||||||||||||||
| 280 | - | |||||||||||||||||||||||||||||||
| 281 | - | |||||||||||||||||||||||||||||||
| 282 | - | |||||||||||||||||||||||||||||||
| 283 | return never executed: result;return result;never executed: return result; | 0 | ||||||||||||||||||||||||||||||
| 284 | } | - | ||||||||||||||||||||||||||||||
| 285 | - | |||||||||||||||||||||||||||||||
| 286 | - | |||||||||||||||||||||||||||||||
| 287 | - | |||||||||||||||||||||||||||||||
| 288 | - | |||||||||||||||||||||||||||||||
| 289 | - | |||||||||||||||||||||||||||||||
| 290 | bool QShortcutMap::hasShortcutForKeySequence(const QKeySequence &seq) const | - | ||||||||||||||||||||||||||||||
| 291 | { | - | ||||||||||||||||||||||||||||||
| 292 | const QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 293 | QShortcutEntry entry(seq); | - | ||||||||||||||||||||||||||||||
| 294 | QList<QShortcutEntry>::ConstIterator itEnd = d->sequences.constEnd(); | - | ||||||||||||||||||||||||||||||
| 295 | QList<QShortcutEntry>::ConstIterator it = std::lower_bound(d->sequences.constBegin(), itEnd, entry); | - | ||||||||||||||||||||||||||||||
| 296 | - | |||||||||||||||||||||||||||||||
| 297 | for (;it != itEnd
| 0 | ||||||||||||||||||||||||||||||
| 298 | if (matches(entry.keyseq, (*it).keyseq) == QKeySequence::ExactMatch
| 0 | ||||||||||||||||||||||||||||||
| 299 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||||||||||||||
| 300 | } | - | ||||||||||||||||||||||||||||||
| 301 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 302 | - | |||||||||||||||||||||||||||||||
| 303 | - | |||||||||||||||||||||||||||||||
| 304 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||||||||||||||
| 305 | } | - | ||||||||||||||||||||||||||||||
| 306 | QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifiers) | - | ||||||||||||||||||||||||||||||
| 307 | { | - | ||||||||||||||||||||||||||||||
| 308 | QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 309 | if (!d->sequences.count()
| 0 | ||||||||||||||||||||||||||||||
| 310 | return never executed: QKeySequence::NoMatch;return QKeySequence::NoMatch;never executed: return QKeySequence::NoMatch; | 0 | ||||||||||||||||||||||||||||||
| 311 | - | |||||||||||||||||||||||||||||||
| 312 | createNewSequences(e, d->newEntries, ignoredModifiers); | - | ||||||||||||||||||||||||||||||
| 313 | - | |||||||||||||||||||||||||||||||
| 314 | - | |||||||||||||||||||||||||||||||
| 315 | - | |||||||||||||||||||||||||||||||
| 316 | - | |||||||||||||||||||||||||||||||
| 317 | - | |||||||||||||||||||||||||||||||
| 318 | if (d->newEntries == d->currentSequences
| 0 | ||||||||||||||||||||||||||||||
| 319 | ((!(e->key() != Qt::Key_unknown || e->text().length())) ? qt_assert_x("QShortcutMap::find", "New sequence to find identical to previous", | - | ||||||||||||||||||||||||||||||
| 320 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 321 | , | - | ||||||||||||||||||||||||||||||
| 322 | 439 | - | ||||||||||||||||||||||||||||||
| 323 | ) : qt_noop()) | - | ||||||||||||||||||||||||||||||
| 324 | ; | - | ||||||||||||||||||||||||||||||
| 325 | return never executed: QKeySequence::NoMatch;return QKeySequence::NoMatch;never executed: return QKeySequence::NoMatch; | 0 | ||||||||||||||||||||||||||||||
| 326 | } | - | ||||||||||||||||||||||||||||||
| 327 | - | |||||||||||||||||||||||||||||||
| 328 | - | |||||||||||||||||||||||||||||||
| 329 | d->identicals.resize(0); | - | ||||||||||||||||||||||||||||||
| 330 | - | |||||||||||||||||||||||||||||||
| 331 | bool partialFound = false; | - | ||||||||||||||||||||||||||||||
| 332 | bool identicalDisabledFound = false; | - | ||||||||||||||||||||||||||||||
| 333 | QVector<QKeySequence> okEntries; | - | ||||||||||||||||||||||||||||||
| 334 | int result = QKeySequence::NoMatch; | - | ||||||||||||||||||||||||||||||
| 335 | for (int i = d->newEntries.count()-1; i >= 0
| 0 | ||||||||||||||||||||||||||||||
| 336 | QShortcutEntry entry(d->newEntries.at(i)); | - | ||||||||||||||||||||||||||||||
| 337 | QList<QShortcutEntry>::ConstIterator itEnd = d->sequences.constEnd(); | - | ||||||||||||||||||||||||||||||
| 338 | QList<QShortcutEntry>::ConstIterator it = | - | ||||||||||||||||||||||||||||||
| 339 | std::lower_bound(d->sequences.constBegin(), itEnd, entry); | - | ||||||||||||||||||||||||||||||
| 340 | - | |||||||||||||||||||||||||||||||
| 341 | int oneKSResult = QKeySequence::NoMatch; | - | ||||||||||||||||||||||||||||||
| 342 | int tempRes = QKeySequence::NoMatch; | - | ||||||||||||||||||||||||||||||
| 343 | do { | - | ||||||||||||||||||||||||||||||
| 344 | if (it == itEnd
| 0 | ||||||||||||||||||||||||||||||
| 345 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||
| 346 | tempRes = matches(entry.keyseq, (*it).keyseq); | - | ||||||||||||||||||||||||||||||
| 347 | oneKSResult = qMax(oneKSResult, tempRes); | - | ||||||||||||||||||||||||||||||
| 348 | if (tempRes != QKeySequence::NoMatch
| 0 | ||||||||||||||||||||||||||||||
| 349 | if (tempRes == QKeySequence::ExactMatch
| 0 | ||||||||||||||||||||||||||||||
| 350 | if ((*
| 0 | ||||||||||||||||||||||||||||||
| 351 | d->identicals.append(&*it); never executed: d->identicals.append(&*it); | 0 | ||||||||||||||||||||||||||||||
| 352 | else | - | ||||||||||||||||||||||||||||||
| 353 | identicalDisabledFound = true; never executed: identicalDisabledFound = true; | 0 | ||||||||||||||||||||||||||||||
| 354 | } else if (tempRes == QKeySequence::PartialMatch
| 0 | ||||||||||||||||||||||||||||||
| 355 | - | |||||||||||||||||||||||||||||||
| 356 | if (d->identicals.size()
| 0 | ||||||||||||||||||||||||||||||
| 357 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||
| 358 | - | |||||||||||||||||||||||||||||||
| 359 | - | |||||||||||||||||||||||||||||||
| 360 | partialFound |= (*it).enabled; | - | ||||||||||||||||||||||||||||||
| 361 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 362 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 363 | ++it; | - | ||||||||||||||||||||||||||||||
| 364 | - | |||||||||||||||||||||||||||||||
| 365 | - | |||||||||||||||||||||||||||||||
| 366 | - | |||||||||||||||||||||||||||||||
| 367 | } never executed: while (tempRes != QKeySequence::NoMatchend of block
| 0 | ||||||||||||||||||||||||||||||
| 368 | - | |||||||||||||||||||||||||||||||
| 369 | - | |||||||||||||||||||||||||||||||
| 370 | - | |||||||||||||||||||||||||||||||
| 371 | if (oneKSResult > result
| 0 | ||||||||||||||||||||||||||||||
| 372 | okEntries.clear(); | - | ||||||||||||||||||||||||||||||
| 373 | - | |||||||||||||||||||||||||||||||
| 374 | - | |||||||||||||||||||||||||||||||
| 375 | - | |||||||||||||||||||||||||||||||
| 376 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 377 | if (oneKSResult
| 0 | ||||||||||||||||||||||||||||||
| 378 | okEntries << d->newEntries.at(i); | - | ||||||||||||||||||||||||||||||
| 379 | - | |||||||||||||||||||||||||||||||
| 380 | - | |||||||||||||||||||||||||||||||
| 381 | - | |||||||||||||||||||||||||||||||
| 382 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 383 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 384 | - | |||||||||||||||||||||||||||||||
| 385 | if (d->identicals.size()
| 0 | ||||||||||||||||||||||||||||||
| 386 | result = QKeySequence::ExactMatch; | - | ||||||||||||||||||||||||||||||
| 387 | } never executed: else if (partialFoundend of block
| 0 | ||||||||||||||||||||||||||||||
| 388 | result = QKeySequence::PartialMatch; | - | ||||||||||||||||||||||||||||||
| 389 | } never executed: else if (identicalDisabledFoundend of block
| 0 | ||||||||||||||||||||||||||||||
| 390 | result = QKeySequence::ExactMatch; | - | ||||||||||||||||||||||||||||||
| 391 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||
| 392 | clearSequence(d->currentSequences); | - | ||||||||||||||||||||||||||||||
| 393 | result = QKeySequence::NoMatch; | - | ||||||||||||||||||||||||||||||
| 394 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 395 | if (result != QKeySequence::NoMatch
| 0 | ||||||||||||||||||||||||||||||
| 396 | d->currentSequences = okEntries; never executed: d->currentSequences = okEntries; | 0 | ||||||||||||||||||||||||||||||
| 397 | - | |||||||||||||||||||||||||||||||
| 398 | - | |||||||||||||||||||||||||||||||
| 399 | - | |||||||||||||||||||||||||||||||
| 400 | return never executed: QKeySequence::SequenceMatch(result);return QKeySequence::SequenceMatch(result);never executed: return QKeySequence::SequenceMatch(result); | 0 | ||||||||||||||||||||||||||||||
| 401 | } | - | ||||||||||||||||||||||||||||||
| 402 | - | |||||||||||||||||||||||||||||||
| 403 | - | |||||||||||||||||||||||||||||||
| 404 | - | |||||||||||||||||||||||||||||||
| 405 | - | |||||||||||||||||||||||||||||||
| 406 | - | |||||||||||||||||||||||||||||||
| 407 | - | |||||||||||||||||||||||||||||||
| 408 | void QShortcutMap::clearSequence(QVector<QKeySequence> &ksl) | - | ||||||||||||||||||||||||||||||
| 409 | { | - | ||||||||||||||||||||||||||||||
| 410 | ksl.clear(); | - | ||||||||||||||||||||||||||||||
| 411 | d_func()->newEntries.clear(); | - | ||||||||||||||||||||||||||||||
| 412 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 413 | - | |||||||||||||||||||||||||||||||
| 414 | - | |||||||||||||||||||||||||||||||
| 415 | - | |||||||||||||||||||||||||||||||
| 416 | - | |||||||||||||||||||||||||||||||
| 417 | - | |||||||||||||||||||||||||||||||
| 418 | void QShortcutMap::createNewSequences(QKeyEvent *e, QVector<QKeySequence> &ksl, int ignoredModifiers) | - | ||||||||||||||||||||||||||||||
| 419 | { | - | ||||||||||||||||||||||||||||||
| 420 | QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 421 | QList<int> possibleKeys = QKeyMapper::possibleKeys(e); | - | ||||||||||||||||||||||||||||||
| 422 | int pkTotal = possibleKeys.count(); | - | ||||||||||||||||||||||||||||||
| 423 | if (!pkTotal
| 0 | ||||||||||||||||||||||||||||||
| 424 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 425 | - | |||||||||||||||||||||||||||||||
| 426 | int ssActual = d->currentSequences.count(); | - | ||||||||||||||||||||||||||||||
| 427 | int ssTotal = qMax(1, ssActual); | - | ||||||||||||||||||||||||||||||
| 428 | - | |||||||||||||||||||||||||||||||
| 429 | ksl.resize(pkTotal * ssTotal); | - | ||||||||||||||||||||||||||||||
| 430 | - | |||||||||||||||||||||||||||||||
| 431 | int index = ssActual
| 0 | ||||||||||||||||||||||||||||||
| 432 | for (int pkNum = 0; pkNum < pkTotal
| 0 | ||||||||||||||||||||||||||||||
| 433 | for (int ssNum = 0; ssNum < ssTotal
| 0 | ||||||||||||||||||||||||||||||
| 434 | int i = (pkNum * ssTotal) + ssNum; | - | ||||||||||||||||||||||||||||||
| 435 | QKeySequence &curKsl = ksl[i]; | - | ||||||||||||||||||||||||||||||
| 436 | if (ssActual
| 0 | ||||||||||||||||||||||||||||||
| 437 | const QKeySequence &curSeq = d->currentSequences.at(ssNum); | - | ||||||||||||||||||||||||||||||
| 438 | curKsl.setKey(curSeq[0], 0); | - | ||||||||||||||||||||||||||||||
| 439 | curKsl.setKey(curSeq[1], 1); | - | ||||||||||||||||||||||||||||||
| 440 | curKsl.setKey(curSeq[2], 2); | - | ||||||||||||||||||||||||||||||
| 441 | curKsl.setKey(curSeq[3], 3); | - | ||||||||||||||||||||||||||||||
| 442 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||
| 443 | curKsl.setKey(0, 0); | - | ||||||||||||||||||||||||||||||
| 444 | curKsl.setKey(0, 1); | - | ||||||||||||||||||||||||||||||
| 445 | curKsl.setKey(0, 2); | - | ||||||||||||||||||||||||||||||
| 446 | curKsl.setKey(0, 3); | - | ||||||||||||||||||||||||||||||
| 447 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 448 | curKsl.setKey(possibleKeys.at(pkNum) & ~ignoredModifiers, index); | - | ||||||||||||||||||||||||||||||
| 449 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 450 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 451 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 452 | - | |||||||||||||||||||||||||||||||
| 453 | - | |||||||||||||||||||||||||||||||
| 454 | - | |||||||||||||||||||||||||||||||
| 455 | - | |||||||||||||||||||||||||||||||
| 456 | - | |||||||||||||||||||||||||||||||
| 457 | - | |||||||||||||||||||||||||||||||
| 458 | QKeySequence::SequenceMatch QShortcutMap::matches(const QKeySequence &seq1, | - | ||||||||||||||||||||||||||||||
| 459 | const QKeySequence &seq2) const | - | ||||||||||||||||||||||||||||||
| 460 | { | - | ||||||||||||||||||||||||||||||
| 461 | uint userN = seq1.count(), | - | ||||||||||||||||||||||||||||||
| 462 | seqN = seq2.count(); | - | ||||||||||||||||||||||||||||||
| 463 | - | |||||||||||||||||||||||||||||||
| 464 | if (userN > seqN
| 0 | ||||||||||||||||||||||||||||||
| 465 | return never executed: QKeySequence::NoMatch;return QKeySequence::NoMatch;never executed: return QKeySequence::NoMatch; | 0 | ||||||||||||||||||||||||||||||
| 466 | - | |||||||||||||||||||||||||||||||
| 467 | - | |||||||||||||||||||||||||||||||
| 468 | - | |||||||||||||||||||||||||||||||
| 469 | QKeySequence::SequenceMatch match = (userN == seqN
| 0 | ||||||||||||||||||||||||||||||
| 470 | ? QKeySequence::ExactMatch | - | ||||||||||||||||||||||||||||||
| 471 | : QKeySequence::PartialMatch); | - | ||||||||||||||||||||||||||||||
| 472 | - | |||||||||||||||||||||||||||||||
| 473 | for (uint i = 0; i < userN
| 0 | ||||||||||||||||||||||||||||||
| 474 | int userKey = seq1[i], | - | ||||||||||||||||||||||||||||||
| 475 | sequenceKey = seq2[i]; | - | ||||||||||||||||||||||||||||||
| 476 | if ((
| 0 | ||||||||||||||||||||||||||||||
| 477 | userKey = (userKey & Qt::KeyboardModifierMask) | Qt::Key_Minus; never executed: userKey = (userKey & Qt::KeyboardModifierMask) | Qt::Key_Minus; | 0 | ||||||||||||||||||||||||||||||
| 478 | if ((
| 0 | ||||||||||||||||||||||||||||||
| 479 | sequenceKey = (sequenceKey & Qt::KeyboardModifierMask) | Qt::Key_Minus; never executed: sequenceKey = (sequenceKey & Qt::KeyboardModifierMask) | Qt::Key_Minus; | 0 | ||||||||||||||||||||||||||||||
| 480 | if (userKey != sequenceKey
| 0 | ||||||||||||||||||||||||||||||
| 481 | return never executed: QKeySequence::NoMatch;return QKeySequence::NoMatch;never executed: return QKeySequence::NoMatch; | 0 | ||||||||||||||||||||||||||||||
| 482 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 483 | return never executed: match;return match;never executed: return match; | 0 | ||||||||||||||||||||||||||||||
| 484 | } | - | ||||||||||||||||||||||||||||||
| 485 | - | |||||||||||||||||||||||||||||||
| 486 | - | |||||||||||||||||||||||||||||||
| 487 | - | |||||||||||||||||||||||||||||||
| 488 | - | |||||||||||||||||||||||||||||||
| 489 | - | |||||||||||||||||||||||||||||||
| 490 | int QShortcutMap::translateModifiers(Qt::KeyboardModifiers modifiers) | - | ||||||||||||||||||||||||||||||
| 491 | { | - | ||||||||||||||||||||||||||||||
| 492 | int result = 0; | - | ||||||||||||||||||||||||||||||
| 493 | if (modifiers & Qt::ShiftModifier
| 0 | ||||||||||||||||||||||||||||||
| 494 | result |= Qt::SHIFT; never executed: result |= Qt::SHIFT; | 0 | ||||||||||||||||||||||||||||||
| 495 | if (modifiers & Qt::ControlModifier
| 0 | ||||||||||||||||||||||||||||||
| 496 | result |= Qt::CTRL; never executed: result |= Qt::CTRL; | 0 | ||||||||||||||||||||||||||||||
| 497 | if (modifiers & Qt::MetaModifier
| 0 | ||||||||||||||||||||||||||||||
| 498 | result |= Qt::META; never executed: result |= Qt::META; | 0 | ||||||||||||||||||||||||||||||
| 499 | if (modifiers & Qt::AltModifier
| 0 | ||||||||||||||||||||||||||||||
| 500 | result |= Qt::ALT; never executed: result |= Qt::ALT; | 0 | ||||||||||||||||||||||||||||||
| 501 | return never executed: result;return result;never executed: return result; | 0 | ||||||||||||||||||||||||||||||
| 502 | } | - | ||||||||||||||||||||||||||||||
| 503 | - | |||||||||||||||||||||||||||||||
| 504 | - | |||||||||||||||||||||||||||||||
| 505 | - | |||||||||||||||||||||||||||||||
| 506 | - | |||||||||||||||||||||||||||||||
| 507 | QVector<const QShortcutEntry*> QShortcutMap::matches() const | - | ||||||||||||||||||||||||||||||
| 508 | { | - | ||||||||||||||||||||||||||||||
| 509 | const QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 510 | return never executed: d->identicals;return d->identicals;never executed: return d->identicals; | 0 | ||||||||||||||||||||||||||||||
| 511 | } | - | ||||||||||||||||||||||||||||||
| 512 | - | |||||||||||||||||||||||||||||||
| 513 | - | |||||||||||||||||||||||||||||||
| 514 | - | |||||||||||||||||||||||||||||||
| 515 | - | |||||||||||||||||||||||||||||||
| 516 | void QShortcutMap::dispatchEvent(QKeyEvent *e) | - | ||||||||||||||||||||||||||||||
| 517 | { | - | ||||||||||||||||||||||||||||||
| 518 | QShortcutMapPrivate * const d = d_func(); | - | ||||||||||||||||||||||||||||||
| 519 | if (!d->identicals.size()
| 0 | ||||||||||||||||||||||||||||||
| 520 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 521 | - | |||||||||||||||||||||||||||||||
| 522 | const QKeySequence &curKey = d->identicals.at(0)->keyseq; | - | ||||||||||||||||||||||||||||||
| 523 | if (d->prevSequence != curKey
| 0 | ||||||||||||||||||||||||||||||
| 524 | d->ambigCount = 0; | - | ||||||||||||||||||||||||||||||
| 525 | d->prevSequence = curKey; | - | ||||||||||||||||||||||||||||||
| 526 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 527 | - | |||||||||||||||||||||||||||||||
| 528 | const QShortcutEntry *current = 0, *next = 0; | - | ||||||||||||||||||||||||||||||
| 529 | int i = 0, enabledShortcuts = 0; | - | ||||||||||||||||||||||||||||||
| 530 | while(i < d->identicals.size()
| 0 | ||||||||||||||||||||||||||||||
| 531 | current = d->identicals.at(i); | - | ||||||||||||||||||||||||||||||
| 532 | if (current->enabled
| 0 | ||||||||||||||||||||||||||||||
| 533 | ++enabledShortcuts; | - | ||||||||||||||||||||||||||||||
| 534 | if (enabledShortcuts > d->ambigCount + 1
| 0 | ||||||||||||||||||||||||||||||
| 535 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||
| 536 | next = current; | - | ||||||||||||||||||||||||||||||
| 537 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 538 | ++i; | - | ||||||||||||||||||||||||||||||
| 539 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 540 | d->ambigCount = (d->identicals.size() == i
| 0 | ||||||||||||||||||||||||||||||
| 541 | - | |||||||||||||||||||||||||||||||
| 542 | - | |||||||||||||||||||||||||||||||
| 543 | if (!next
| 0 | ||||||||||||||||||||||||||||||
| 544 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||
| 545 | - | |||||||||||||||||||||||||||||||
| 546 | - | |||||||||||||||||||||||||||||||
| 547 | - | |||||||||||||||||||||||||||||||
| 548 | - | |||||||||||||||||||||||||||||||
| 549 | - | |||||||||||||||||||||||||||||||
| 550 | - | |||||||||||||||||||||||||||||||
| 551 | - | |||||||||||||||||||||||||||||||
| 552 | QShortcutEvent se(next->keyseq, next->id, enabledShortcuts>1); | - | ||||||||||||||||||||||||||||||
| 553 | QCoreApplication::sendEvent(const_cast<QObject *>(next->owner), &se); | - | ||||||||||||||||||||||||||||||
| 554 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
| 555 | - | |||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |