src/settingseditor/keyboardshortcutseditor.cpp

changeset 259
c27612f0eac0
parent 16
aeb5f203b3eb
child 264
76a025db4948
equal deleted inserted replaced
258:fe094d0687ad 259:c27612f0eac0
8 { 8 {
9 } 9 }
10 10
11 int KeyboardShortcutsEditor::rowCount(const QModelIndex&) const 11 int KeyboardShortcutsEditor::rowCount(const QModelIndex&) const
12 { 12 {
13 return this->actions.size(); 13 return static_cast<int>(this->actions.size());
14 } 14 }
15 15
16 int KeyboardShortcutsEditor::columnCount(const QModelIndex&) const 16 int KeyboardShortcutsEditor::columnCount(const QModelIndex&) const
17 { 17 {
18 return 2; 18 return 2;
20 20
21 QVariant KeyboardShortcutsEditor::data( 21 QVariant KeyboardShortcutsEditor::data(
22 const QModelIndex& index, 22 const QModelIndex& index,
23 int role) const 23 int role) const
24 { 24 {
25 QAction* const action = this->actions[index.row()]; 25 QAction* const action = this->actions[static_cast<std::size_t>(index.row())];
26 const Column column = static_cast<Column>(index.column()); 26 const Column column = static_cast<Column>(index.column());
27 switch(role) 27 switch(role)
28 { 28 {
29 case Qt::DisplayRole: 29 case Qt::DisplayRole:
30 switch (column) { 30 switch (column) {

mercurial