mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:03:24 +00:00
desktop-widgets: Change Q_UNUSED to no parameter name
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
e47f6df076
commit
e536682b84
12 changed files with 43 additions and 103 deletions
|
@ -21,10 +21,8 @@ GasSpinBoxItemDelegate::~GasSpinBoxItemDelegate()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *GasSpinBoxItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
QWidget *GasSpinBoxItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem&, const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(index)
|
|
||||||
// Create the spinbox and give it it's settings
|
// Create the spinbox and give it it's settings
|
||||||
QSpinBox *sb = new QSpinBox(parent);
|
QSpinBox *sb = new QSpinBox(parent);
|
||||||
if (type == PERCENT) {
|
if (type == PERCENT) {
|
||||||
|
@ -67,10 +65,8 @@ GasTypeComboBoxItemDelegate::~GasTypeComboBoxItemDelegate()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *GasTypeComboBoxItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
QWidget *GasTypeComboBoxItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem&, const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(index)
|
|
||||||
// Create the combobox and populate it
|
// Create the combobox and populate it
|
||||||
QComboBox *cb = new QComboBox(parent);
|
QComboBox *cb = new QComboBox(parent);
|
||||||
cb->addItem(QString("Disabled"));
|
cb->addItem(QString("Disabled"));
|
||||||
|
@ -362,9 +358,8 @@ ConfigureDiveComputerDialog::~ConfigureDiveComputerDialog()
|
||||||
delete config;
|
delete config;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureDiveComputerDialog::closeEvent(QCloseEvent *event)
|
void ConfigureDiveComputerDialog::closeEvent(QCloseEvent*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
dc_close();
|
dc_close();
|
||||||
|
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
|
@ -515,9 +515,8 @@ void DiveListView::toggleColumnVisibilityByIndex()
|
||||||
setColumnWidth(lastVisibleColumn(), 10);
|
setColumnWidth(lastVisibleColumn(), 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveListView::currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
|
void DiveListView::currentChanged(const QModelIndex ¤t, const QModelIndex&)
|
||||||
{
|
{
|
||||||
Q_UNUSED(previous)
|
|
||||||
if (!isVisible())
|
if (!isVisible())
|
||||||
return;
|
return;
|
||||||
if (!current.isValid())
|
if (!current.isValid())
|
||||||
|
|
|
@ -112,9 +112,8 @@ void DiveLogExportDialog::exportHtmlInit(const QString &filename)
|
||||||
exportHtmlInitLogic(filename, hes);
|
exportHtmlInitLogic(filename, hes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveLogExportDialog::on_exportGroup_buttonClicked(QAbstractButton *button)
|
void DiveLogExportDialog::on_exportGroup_buttonClicked(QAbstractButton*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(button)
|
|
||||||
showExplanation();
|
showExplanation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,20 +52,16 @@ ColumnNameProvider::ColumnNameProvider(QObject *parent) : QAbstractListModel(par
|
||||||
tr("Sample setpoint") << tr("Visibility") << tr("Rating");
|
tr("Sample setpoint") << tr("Visibility") << tr("Rating");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ColumnNameProvider::insertRows(int row, int count, const QModelIndex &parent)
|
bool ColumnNameProvider::insertRows(int row, int, const QModelIndex&)
|
||||||
{
|
{
|
||||||
Q_UNUSED(count)
|
|
||||||
Q_UNUSED(parent)
|
|
||||||
beginInsertRows(QModelIndex(), row, row);
|
beginInsertRows(QModelIndex(), row, row);
|
||||||
columnNames.append(QString());
|
columnNames.append(QString());
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ColumnNameProvider::removeRows(int row, int count, const QModelIndex &parent)
|
bool ColumnNameProvider::removeRows(int row, int, const QModelIndex&)
|
||||||
{
|
{
|
||||||
Q_UNUSED(count)
|
|
||||||
Q_UNUSED(parent)
|
|
||||||
beginRemoveRows(QModelIndex(), row, row);
|
beginRemoveRows(QModelIndex(), row, row);
|
||||||
columnNames.removeAt(row);
|
columnNames.removeAt(row);
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
|
@ -91,9 +87,8 @@ QVariant ColumnNameProvider::data(const QModelIndex &index, int role) const
|
||||||
return QVariant(columnNames[index.row()]);
|
return QVariant(columnNames[index.row()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ColumnNameProvider::rowCount(const QModelIndex &parent) const
|
int ColumnNameProvider::rowCount(const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
return columnNames.count();
|
return columnNames.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,9 +109,8 @@ int ColumnNameProvider::mymatch(QString value) const
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ColumnNameView::ColumnNameView(QWidget *parent)
|
ColumnNameView::ColumnNameView(QWidget*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
setDragEnabled(true);
|
setDragEnabled(true);
|
||||||
}
|
}
|
||||||
|
@ -145,9 +139,8 @@ void ColumnNameView::mousePressEvent(QMouseEvent *press)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColumnNameView::dragLeaveEvent(QDragLeaveEvent *leave)
|
void ColumnNameView::dragLeaveEvent(QDragLeaveEvent*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(leave);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColumnNameView::dragEnterEvent(QDragEnterEvent *event)
|
void ColumnNameView::dragEnterEvent(QDragEnterEvent *event)
|
||||||
|
@ -176,15 +169,13 @@ void ColumnNameView::dropEvent(QDropEvent *event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnDropCSVView::ColumnDropCSVView(QWidget *parent)
|
ColumnDropCSVView::ColumnDropCSVView(QWidget*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColumnDropCSVView::dragLeaveEvent(QDragLeaveEvent *leave)
|
void ColumnDropCSVView::dragLeaveEvent(QDragLeaveEvent*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(leave);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColumnDropCSVView::dragEnterEvent(QDragEnterEvent *event)
|
void ColumnDropCSVView::dragEnterEvent(QDragEnterEvent *event)
|
||||||
|
@ -272,15 +263,13 @@ QVariant ColumnNameResult::data(const QModelIndex &index, int role) const
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ColumnNameResult::rowCount(const QModelIndex &parent) const
|
int ColumnNameResult::rowCount(const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
|
||||||
return columnValues.count() + 1; // +1 == the header.
|
return columnValues.count() + 1; // +1 == the header.
|
||||||
}
|
}
|
||||||
|
|
||||||
int ColumnNameResult::columnCount(const QModelIndex &parent) const
|
int ColumnNameResult::columnCount(const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
|
||||||
return columnNames.count();
|
return columnNames.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,9 +241,8 @@ void DownloadFromDCWidget::on_vendor_currentIndexChanged(const QString &vendor)
|
||||||
fill_device_list(dcType);
|
fill_device_list(dcType);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DownloadFromDCWidget::on_product_currentIndexChanged(const QString &product)
|
void DownloadFromDCWidget::on_product_currentIndexChanged(const QString&)
|
||||||
{
|
{
|
||||||
Q_UNUSED(product)
|
|
||||||
updateDeviceEnabled();
|
updateDeviceEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -340,16 +340,14 @@ void LocationInformationWidget::updateLocationOnMap()
|
||||||
emit coordinatesChanged();
|
emit coordinatesChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
DiveLocationFilterProxyModel::DiveLocationFilterProxyModel(QObject *parent)
|
DiveLocationFilterProxyModel::DiveLocationFilterProxyModel(QObject*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DiveLocationLineEdit *location_line_edit = 0;
|
DiveLocationLineEdit *location_line_edit = 0;
|
||||||
|
|
||||||
bool DiveLocationFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
|
bool DiveLocationFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(source_parent)
|
|
||||||
if (source_row == 0)
|
if (source_row == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -363,9 +361,8 @@ bool DiveLocationFilterProxyModel::lessThan(const QModelIndex &source_left, cons
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DiveLocationModel::DiveLocationModel(QObject *o)
|
DiveLocationModel::DiveLocationModel(QObject*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(o)
|
|
||||||
resetModel();
|
resetModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -424,21 +421,18 @@ QVariant DiveLocationModel::data(const QModelIndex &index, int role) const
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
int DiveLocationModel::columnCount(const QModelIndex &parent) const
|
int DiveLocationModel::columnCount(const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
return COLUMNS;
|
return COLUMNS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DiveLocationModel::rowCount(const QModelIndex &parent) const
|
int DiveLocationModel::rowCount(const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
return dive_site_table.nr + 2;
|
return dive_site_table.nr + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DiveLocationModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
bool DiveLocationModel::setData(const QModelIndex &index, const QVariant &value, int)
|
||||||
{
|
{
|
||||||
Q_UNUSED(role)
|
|
||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return false;
|
return false;
|
||||||
if (index.row() > 1)
|
if (index.row() > 1)
|
||||||
|
@ -481,9 +475,8 @@ DiveLocationLineEdit::DiveLocationLineEdit(QWidget *parent) : QLineEdit(parent),
|
||||||
connect(view, &DiveLocationListView::currentIndexChanged, this, &DiveLocationLineEdit::currentChanged);
|
connect(view, &DiveLocationListView::currentIndexChanged, this, &DiveLocationLineEdit::currentChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DiveLocationLineEdit::eventFilter(QObject *o, QEvent *e)
|
bool DiveLocationLineEdit::eventFilter(QObject*, QEvent *e)
|
||||||
{
|
{
|
||||||
Q_UNUSED(o)
|
|
||||||
if (e->type() == QEvent::KeyPress) {
|
if (e->type() == QEvent::KeyPress) {
|
||||||
QKeyEvent *keyEv = (QKeyEvent *)e;
|
QKeyEvent *keyEv = (QKeyEvent *)e;
|
||||||
|
|
||||||
|
@ -565,9 +558,8 @@ static struct dive_site *get_dive_site_name_start_which_str(const QString &str)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveLocationLineEdit::setTemporaryDiveSiteName(const QString &s)
|
void DiveLocationLineEdit::setTemporaryDiveSiteName(const QString&)
|
||||||
{
|
{
|
||||||
Q_UNUSED(s)
|
|
||||||
QModelIndex i0 = model->index(0, DiveLocationModel::NAME);
|
QModelIndex i0 = model->index(0, DiveLocationModel::NAME);
|
||||||
QModelIndex i1 = model->index(1, DiveLocationModel::NAME);
|
QModelIndex i1 = model->index(1, DiveLocationModel::NAME);
|
||||||
model->setData(i0, text());
|
model->setData(i0, text());
|
||||||
|
@ -676,9 +668,8 @@ uint32_t DiveLocationLineEdit::currDiveSiteUuid() const
|
||||||
return currUuid;
|
return currUuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
DiveLocationListView::DiveLocationListView(QWidget *parent)
|
DiveLocationListView::DiveLocationListView(QWidget*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveLocationListView::currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
|
void DiveLocationListView::currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
|
||||||
|
|
|
@ -1655,10 +1655,8 @@ void MainWindow::updateRecentFiles()
|
||||||
updateRecentFilesMenu();
|
updateRecentFilesMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::recentFileTriggered(bool checked)
|
void MainWindow::recentFileTriggered(bool)
|
||||||
{
|
{
|
||||||
Q_UNUSED(checked);
|
|
||||||
|
|
||||||
if (!okToClose(tr("Please save or cancel the current dive edit before opening a new file.")))
|
if (!okToClose(tr("Please save or cancel the current dive edit before opening a new file.")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,8 @@
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QAbstractProxyModel>
|
#include <QAbstractProxyModel>
|
||||||
|
|
||||||
QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(index)
|
|
||||||
return QSize(50, 22);
|
return QSize(50, 22);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,10 +64,8 @@ void StarWidgetsDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
QSize StarWidgetsDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
QSize StarWidgetsDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(index)
|
|
||||||
return minStarSize;
|
return minStarSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,9 +103,8 @@ struct CurrSelected {
|
||||||
bool ignoreSelection;
|
bool ignoreSelection;
|
||||||
} currCombo;
|
} currCombo;
|
||||||
|
|
||||||
QWidget *ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
QWidget *ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem&, const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
QComboBox *comboDelegate = new QComboBox(parent);
|
QComboBox *comboDelegate = new QComboBox(parent);
|
||||||
comboDelegate->setModel(model);
|
comboDelegate->setModel(model);
|
||||||
comboDelegate->setEditable(true);
|
comboDelegate->setEditable(true);
|
||||||
|
@ -220,9 +215,8 @@ bool ComboBoxDelegate::eventFilter(QObject *object, QEvent *event)
|
||||||
return QStyledItemDelegate::eventFilter(object, event);
|
return QStyledItemDelegate::eventFilter(object, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ComboBoxDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
void ComboBoxDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(index)
|
|
||||||
QRect defaultRect = option.rect;
|
QRect defaultRect = option.rect;
|
||||||
defaultRect.setX(defaultRect.x() - 1);
|
defaultRect.setX(defaultRect.x() - 1);
|
||||||
defaultRect.setY(defaultRect.y() - 1);
|
defaultRect.setY(defaultRect.y() - 1);
|
||||||
|
@ -237,12 +231,8 @@ struct RevertCylinderData {
|
||||||
int size;
|
int size;
|
||||||
} currCylinderData;
|
} currCylinderData;
|
||||||
|
|
||||||
void TankInfoDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &thisindex) const
|
void TankInfoDelegate::setModelData(QWidget*, QAbstractItemModel*, const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(model)
|
|
||||||
Q_UNUSED(editor)
|
|
||||||
Q_UNUSED(thisindex)
|
|
||||||
|
|
||||||
CylindersModel *mymodel = qobject_cast<CylindersModel *>(currCombo.model);
|
CylindersModel *mymodel = qobject_cast<CylindersModel *>(currCombo.model);
|
||||||
TankInfoModel *tanks = TankInfoModel::instance();
|
TankInfoModel *tanks = TankInfoModel::instance();
|
||||||
QModelIndexList matches = tanks->match(tanks->index(0, 0), Qt::DisplayRole, currCombo.activeText);
|
QModelIndexList matches = tanks->match(tanks->index(0, 0), Qt::DisplayRole, currCombo.activeText);
|
||||||
|
@ -270,19 +260,16 @@ TankInfoDelegate::TankInfoDelegate(QObject *parent) : ComboBoxDelegate(TankInfoM
|
||||||
this, SLOT(reenableReplot(QWidget *, QAbstractItemDelegate::EndEditHint)));
|
this, SLOT(reenableReplot(QWidget *, QAbstractItemDelegate::EndEditHint)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TankInfoDelegate::reenableReplot(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
|
void TankInfoDelegate::reenableReplot(QWidget*, QAbstractItemDelegate::EndEditHint)
|
||||||
{
|
{
|
||||||
Q_UNUSED(widget)
|
|
||||||
Q_UNUSED(hint)
|
|
||||||
MainWindow::instance()->graphics()->setReplot(true);
|
MainWindow::instance()->graphics()->setReplot(true);
|
||||||
// FIXME: We need to replot after a cylinder is selected but the replot below overwrites
|
// FIXME: We need to replot after a cylinder is selected but the replot below overwrites
|
||||||
// the newly selected cylinder.
|
// the newly selected cylinder.
|
||||||
// MainWindow::instance()->graphics()->replot();
|
// MainWindow::instance()->graphics()->replot();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TankInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
|
void TankInfoDelegate::revertModelData(QWidget*, QAbstractItemDelegate::EndEditHint hint)
|
||||||
{
|
{
|
||||||
Q_UNUSED(widget)
|
|
||||||
if (hint == QAbstractItemDelegate::NoHint ||
|
if (hint == QAbstractItemDelegate::NoHint ||
|
||||||
hint == QAbstractItemDelegate::RevertModelCache) {
|
hint == QAbstractItemDelegate::RevertModelCache) {
|
||||||
CylindersModel *mymodel = qobject_cast<CylindersModel *>(currCombo.model);
|
CylindersModel *mymodel = qobject_cast<CylindersModel *>(currCombo.model);
|
||||||
|
@ -310,10 +297,8 @@ TankUseDelegate::TankUseDelegate(QObject *parent) : QStyledItemDelegate(parent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *TankUseDelegate::createEditor(QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index) const
|
QWidget *TankUseDelegate::createEditor(QWidget * parent, const QStyleOptionViewItem&, const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(index)
|
|
||||||
QComboBox *comboBox = new QComboBox(parent);
|
QComboBox *comboBox = new QComboBox(parent);
|
||||||
for (int i = 0; i < NUM_GAS_USE; i++)
|
for (int i = 0; i < NUM_GAS_USE; i++)
|
||||||
comboBox->addItem(gettextFromC::instance()->trGettext(cylinderuse_text[i]));
|
comboBox->addItem(gettextFromC::instance()->trGettext(cylinderuse_text[i]));
|
||||||
|
@ -338,9 +323,8 @@ struct RevertWeightData {
|
||||||
int weight;
|
int weight;
|
||||||
} currWeight;
|
} currWeight;
|
||||||
|
|
||||||
void WSInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
|
void WSInfoDelegate::revertModelData(QWidget*, QAbstractItemDelegate::EndEditHint hint)
|
||||||
{
|
{
|
||||||
Q_UNUSED(widget)
|
|
||||||
if (hint == QAbstractItemDelegate::NoHint ||
|
if (hint == QAbstractItemDelegate::NoHint ||
|
||||||
hint == QAbstractItemDelegate::RevertModelCache) {
|
hint == QAbstractItemDelegate::RevertModelCache) {
|
||||||
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
|
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
|
||||||
|
@ -349,12 +333,8 @@ void WSInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::End
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WSInfoDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &thisindex) const
|
void WSInfoDelegate::setModelData(QWidget*, QAbstractItemModel*, const QModelIndex&) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(editor)
|
|
||||||
Q_UNUSED(model)
|
|
||||||
Q_UNUSED(thisindex)
|
|
||||||
|
|
||||||
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
|
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
|
||||||
WSInfoModel *wsim = WSInfoModel::instance();
|
WSInfoModel *wsim = WSInfoModel::instance();
|
||||||
QModelIndexList matches = wsim->match(wsim->index(0, 0), Qt::DisplayRole, currCombo.activeText);
|
QModelIndexList matches = wsim->match(wsim->index(0, 0), Qt::DisplayRole, currCombo.activeText);
|
||||||
|
@ -389,10 +369,8 @@ QWidget *WSInfoDelegate::createEditor(QWidget *parent, const QStyleOptionViewIte
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AirTypesDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
|
void AirTypesDelegate::revertModelData(QWidget*, QAbstractItemDelegate::EndEditHint)
|
||||||
{
|
{
|
||||||
Q_UNUSED(widget)
|
|
||||||
Q_UNUSED(hint)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AirTypesDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
|
void AirTypesDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
|
||||||
|
@ -407,10 +385,8 @@ AirTypesDelegate::AirTypesDelegate(QObject *parent) : ComboBoxDelegate(GasSelect
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveTypesDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
|
void DiveTypesDelegate::revertModelData(QWidget*, QAbstractItemDelegate::EndEditHint)
|
||||||
{
|
{
|
||||||
Q_UNUSED(widget)
|
|
||||||
Q_UNUSED(hint)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveTypesDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
|
void DiveTypesDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
|
||||||
|
@ -457,9 +433,8 @@ QWidget *DoubleSpinBoxDelegate::createEditor(QWidget *parent, const QStyleOption
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocationFilterDelegate::LocationFilterDelegate(QObject *parent)
|
LocationFilterDelegate::LocationFilterDelegate(QObject*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &origIdx) const
|
void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &origIdx) const
|
||||||
|
|
|
@ -191,9 +191,8 @@ void PrintDialog::printClicked(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintDialog::onPaintRequested(QPrinter *printerPtr)
|
void PrintDialog::onPaintRequested(QPrinter*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(printerPtr)
|
|
||||||
createPrinterObj();
|
createPrinterObj();
|
||||||
connect(printer, SIGNAL(progessUpdated(int)), progressBar, SLOT(setValue(int)));
|
connect(printer, SIGNAL(progessUpdated(int)), progressBar, SLOT(setValue(int)));
|
||||||
printer->print();
|
printer->print();
|
||||||
|
|
|
@ -68,9 +68,8 @@ double MinMaxAvgWidget::minimum() const
|
||||||
return d->minValue->text().toDouble();
|
return d->minValue->text().toDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
MinMaxAvgWidget::MinMaxAvgWidget(QWidget *parent) : d(new MinMaxAvgWidgetPrivate(this))
|
MinMaxAvgWidget::MinMaxAvgWidget(QWidget*) : d(new MinMaxAvgWidgetPrivate(this))
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MinMaxAvgWidget::~MinMaxAvgWidget()
|
MinMaxAvgWidget::~MinMaxAvgWidget()
|
||||||
|
@ -261,9 +260,8 @@ void ShiftTimesDialog::buttonClicked(QAbstractButton *button)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShiftTimesDialog::showEvent(QShowEvent *event)
|
void ShiftTimesDialog::showEvent(QShowEvent*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
ui.timeEdit->setTime(QTime(0, 0, 0, 0));
|
ui.timeEdit->setTime(QTime(0, 0, 0, 0));
|
||||||
when = get_times(); //get time of first selected dive
|
when = get_times(); //get time of first selected dive
|
||||||
ui.currentTime->setText(get_dive_date_string(when));
|
ui.currentTime->setText(get_dive_date_string(when));
|
||||||
|
|
|
@ -61,9 +61,8 @@ void StarWidget::mouseReleaseEvent(QMouseEvent *event)
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StarWidget::paintEvent(QPaintEvent *event)
|
void StarWidget::paintEvent(QPaintEvent*)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
QImage star = hasFocus() ? focusedImage(starActive()) : starActive();
|
QImage star = hasFocus() ? focusedImage(starActive()) : starActive();
|
||||||
QPixmap selected = QPixmap::fromImage(star);
|
QPixmap selected = QPixmap::fromImage(star);
|
||||||
|
|
|
@ -958,9 +958,8 @@ void DivelogsDeWebServices::uploadFinished()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivelogsDeWebServices::setStatusText(int status)
|
void DivelogsDeWebServices::setStatusText(int)
|
||||||
{
|
{
|
||||||
Q_UNUSED(status)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivelogsDeWebServices::downloadError(QNetworkReply::NetworkError)
|
void DivelogsDeWebServices::downloadError(QNetworkReply::NetworkError)
|
||||||
|
|
Loading…
Add table
Reference in a new issue