mirror of
https://github.com/YACReader/yacreader
synced 2025-07-23 07:24:58 -04:00
fixed compilation warnings in YACReader.pro, at least using vc++ compiler
This commit is contained in:
@ -7,11 +7,15 @@ ActionsGroupsModel::ActionsGroupsModel(QObject *parent) :
|
||||
|
||||
int ActionsGroupsModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
|
||||
return groups.length();
|
||||
}
|
||||
|
||||
int ActionsGroupsModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -39,6 +43,8 @@ QVariant ActionsGroupsModel::data(const QModelIndex &index, int role) const
|
||||
|
||||
QModelIndex ActionsGroupsModel::parent(const QModelIndex &index) const
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
|
@ -11,11 +11,15 @@ ActionsShortcutsModel::ActionsShortcutsModel(QObject *parent) :
|
||||
|
||||
int ActionsShortcutsModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
|
||||
return actions.length();
|
||||
}
|
||||
|
||||
int ActionsShortcutsModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
@ -78,6 +82,8 @@ QVariant ActionsShortcutsModel::data(const QModelIndex &index, int role) const
|
||||
|
||||
bool ActionsShortcutsModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
Q_UNUSED(role);
|
||||
|
||||
if(index.column() == KEYS)
|
||||
{
|
||||
ShortcutsManager sm = ShortcutsManager::getShortcutsManager();
|
||||
@ -95,6 +101,8 @@ bool ActionsShortcutsModel::setData(const QModelIndex &index, const QVariant &va
|
||||
|
||||
QModelIndex ActionsShortcutsModel::parent(const QModelIndex &index) const
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,9 @@ EditShortcutItemDelegate::EditShortcutItemDelegate(QObject *parent) :
|
||||
|
||||
QWidget *EditShortcutItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(index);
|
||||
|
||||
KeySequenceLineEdit * editor = new KeySequenceLineEdit(parent);
|
||||
connect(editor,SIGNAL(editingFinished()),this,SLOT(closeShortcutEditor()));
|
||||
return editor;
|
||||
@ -31,6 +34,8 @@ void EditShortcutItemDelegate::setModelData(QWidget *editor, QAbstractItemModel
|
||||
|
||||
void EditShortcutItemDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &mi) const
|
||||
{
|
||||
Q_UNUSED(mi);
|
||||
|
||||
editor->setGeometry(option.rect);
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,8 @@ void EditShortcutsDialog::resetToDefaults()
|
||||
|
||||
void EditShortcutsDialog::loadShortcuts(const QModelIndex &mi,const QModelIndex &mi2)
|
||||
{
|
||||
Q_UNUSED(mi2);
|
||||
|
||||
actionsModel->addActions(groupsModel->getActions(mi));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user