summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/configuredivecomputerdialog.cpp31
-rw-r--r--desktop-widgets/divelistview.cpp1
-rw-r--r--desktop-widgets/divelogexportdialog.cpp19
-rw-r--r--desktop-widgets/divelogexportdialog.h1
-rw-r--r--desktop-widgets/divelogimportdialog.cpp12
-rw-r--r--desktop-widgets/diveplanner.cpp17
-rw-r--r--desktop-widgets/diveplanner.h1
-rw-r--r--desktop-widgets/diveshareexportdialog.cpp2
-rw-r--r--desktop-widgets/downloadfromdivecomputer.cpp2
-rw-r--r--desktop-widgets/locationinformation.cpp9
-rw-r--r--desktop-widgets/mainwindow.cpp9
-rw-r--r--desktop-widgets/modeldelegates.cpp23
-rw-r--r--desktop-widgets/plugins/facebook/facebook_integration.cpp1
-rw-r--r--desktop-widgets/preferences/preferences_network.h4
-rw-r--r--desktop-widgets/printdialog.cpp1
-rw-r--r--desktop-widgets/simplewidgets.cpp3
-rw-r--r--desktop-widgets/starwidget.cpp1
-rw-r--r--desktop-widgets/statistics/statisticswidget.cpp3
-rw-r--r--desktop-widgets/subsurfacewebservices.cpp3
-rw-r--r--desktop-widgets/subsurfacewebservices.h2
20 files changed, 97 insertions, 48 deletions
diff --git a/desktop-widgets/configuredivecomputerdialog.cpp b/desktop-widgets/configuredivecomputerdialog.cpp
index 8df184788..428b326e4 100644
--- a/desktop-widgets/configuredivecomputerdialog.cpp
+++ b/desktop-widgets/configuredivecomputerdialog.cpp
@@ -38,6 +38,8 @@ GasSpinBoxItemDelegate::~GasSpinBoxItemDelegate()
QWidget *GasSpinBoxItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
+ Q_UNUSED(option)
+ Q_UNUSED(index)
// Create the spinbox and give it it's settings
QSpinBox *sb = new QSpinBox(parent);
if (type == PERCENT) {
@@ -82,6 +84,8 @@ GasTypeComboBoxItemDelegate::~GasTypeComboBoxItemDelegate()
QWidget *GasTypeComboBoxItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
+ Q_UNUSED(option)
+ Q_UNUSED(index)
// Create the combobox and populate it
QComboBox *cb = new QComboBox(parent);
cb->addItem(QString("Disabled"));
@@ -327,6 +331,7 @@ ConfigureDiveComputerDialog::~ConfigureDiveComputerDialog()
void ConfigureDiveComputerDialog::closeEvent(QCloseEvent *event)
{
+ Q_UNUSED(event)
dc_close();
QSettings settings;
@@ -472,9 +477,9 @@ void ConfigureDiveComputerDialog::populateDeviceDetailsOSTC3()
deviceDetails->alwaysShowppO2 = ui.alwaysShowppO2->isChecked();
deviceDetails->tempSensorOffset = ui.tempSensorOffsetDoubleSpinBox->value() * 10;
deviceDetails->safetyStopLength = ui.safetyStopLengthSpinBox->value();
- deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox->value();
- deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox->value();
- deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox->value();
+ deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox->value() * 10;
+ deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox->value() * 10;
+ deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox->value() * 10;
//set gas values
gas gas1;
@@ -605,9 +610,9 @@ void ConfigureDiveComputerDialog::populateDeviceDetailsOSTC()
deviceDetails->decoGasConsumption = ui.decoGasConsumption_3->value();
deviceDetails->graphicalSpeedIndicator = ui.graphicalSpeedIndicator_3->isChecked();
deviceDetails->safetyStopLength = ui.safetyStopLengthSpinBox_3->value();
- deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox_3->value();
- deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox_3->value();
- deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox_3->value();
+ deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox_3->value() * 10;
+ deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox_3->value() * 10;
+ deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox_3->value() * 10;
//set gas values
gas gas1;
@@ -856,9 +861,9 @@ void ConfigureDiveComputerDialog::reloadValuesOSTC3()
ui.alwaysShowppO2->setChecked(deviceDetails->alwaysShowppO2);
ui.tempSensorOffsetDoubleSpinBox->setValue((double)deviceDetails->tempSensorOffset / 10.0);
ui.safetyStopLengthSpinBox->setValue(deviceDetails->safetyStopLength);
- ui.safetyStopStartDepthDoubleSpinBox->setValue(deviceDetails->safetyStopStartDepth);
- ui.safetyStopEndDepthDoubleSpinBox->setValue(deviceDetails->safetyStopEndDepth);
- ui.safetyStopResetDepthDoubleSpinBox->setValue(deviceDetails->safetyStopResetDepth);
+ ui.safetyStopStartDepthDoubleSpinBox->setValue(deviceDetails->safetyStopStartDepth / 10.0);
+ ui.safetyStopEndDepthDoubleSpinBox->setValue(deviceDetails->safetyStopEndDepth / 10.0);
+ ui.safetyStopResetDepthDoubleSpinBox->setValue(deviceDetails->safetyStopResetDepth / 10.0);
//load gas 1 values
ui.ostc3GasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen)));
@@ -983,9 +988,9 @@ setNumberOfDives
ui.decoGasConsumption_3->setValue(deviceDetails->decoGasConsumption);
ui.graphicalSpeedIndicator_3->setChecked(deviceDetails->graphicalSpeedIndicator);
ui.safetyStopLengthSpinBox_3->setValue(deviceDetails->safetyStopLength);
- ui.safetyStopStartDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopStartDepth);
- ui.safetyStopEndDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopEndDepth);
- ui.safetyStopResetDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopResetDepth);
+ ui.safetyStopStartDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopStartDepth / 10.0);
+ ui.safetyStopEndDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopEndDepth / 10.0);
+ ui.safetyStopResetDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopResetDepth / 10.0);
//load gas 1 values
ui.ostcGasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen)));
@@ -1270,6 +1275,6 @@ void ConfigureDiveComputerDialog::dc_close()
ui.DiveComputerList->setEnabled(true);
ui.logToFile->setEnabled(true);
ui.updateFirmwareButton->setEnabled(false);
- ui.progressBar->setFormat("Disonnected from device");
+ ui.progressBar->setFormat("Disconnected from device");
ui.progressBar->setValue(0);
}
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index d2386ecf1..f3204a111 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -515,6 +515,7 @@ void DiveListView::toggleColumnVisibilityByIndex()
void DiveListView::currentChanged(const QModelIndex &current, const QModelIndex &previous)
{
+ Q_UNUSED(previous)
if (!isVisible())
return;
if (!current.isValid())
diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp
index 7a406b982..e7c53274c 100644
--- a/desktop-widgets/divelogexportdialog.cpp
+++ b/desktop-widgets/divelogexportdialog.cpp
@@ -105,24 +105,9 @@ void DiveLogExportDialog::exportHtmlInit(const QString &filename)
exportHtmlInitLogic(filename, hes);
}
-void DiveLogExportDialog::exportHTMLsettings(const QString &filename)
-{
- QSettings settings;
- settings.beginGroup("HTML");
- settings.setValue("fontSelection", ui->fontSelection->currentIndex());
- settings.setValue("fontSizeSelection", ui->fontSizeSelection->currentIndex());
- settings.setValue("themeSelection", ui->themeSelection->currentIndex());
- settings.setValue("subsurfaceNumbers", ui->exportSubsurfaceNumber->isChecked());
- settings.setValue("yearlyStatistics", ui->exportStatistics->isChecked());
- settings.setValue("listOnly", ui->exportListOnly->isChecked());
- settings.setValue("exportPhotos", ui->exportPhotos->isChecked());
- settings.endGroup();
-
-}
-
-
void DiveLogExportDialog::on_exportGroup_buttonClicked(QAbstractButton *button)
{
+ Q_UNUSED(button)
showExplanation();
}
@@ -210,7 +195,7 @@ void DiveLogExportDialog::export_depths(const char *filename, const bool selecte
int i;
const char *unit = NULL;
- struct membuffer buf = { 0 };
+ struct membuffer buf = {};
for_each_dive (i, dive) {
if (selected_only && !dive->selected)
diff --git a/desktop-widgets/divelogexportdialog.h b/desktop-widgets/divelogexportdialog.h
index a5b5cc770..b72d96c50 100644
--- a/desktop-widgets/divelogexportdialog.h
+++ b/desktop-widgets/divelogexportdialog.h
@@ -32,7 +32,6 @@ private:
Ui::DiveLogExportDialog *ui;
void showExplanation();
void exportHtmlInit(const QString &filename);
- void exportHTMLsettings(const QString &filename);
void export_depths(const char *filename, const bool selected_only);
};
diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp
index 363be800e..4e5607ed3 100644
--- a/desktop-widgets/divelogimportdialog.cpp
+++ b/desktop-widgets/divelogimportdialog.cpp
@@ -9,17 +9,19 @@
static QString subsurface_mimedata = "subsurface/csvcolumns";
static QString subsurface_index = "subsurface/csvindex";
+#define SILENCE_WARNING 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ""
+
const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] = {
// time, depth, temperature, po2, sensor1, sensor2, sensor3, cns, ndl, tts, stopdepth, pressure, setpoint
// indices are 0 based, -1 means the column doesn't exist
- { "Manual import", },
+ { "Manual import", SILENCE_WARNING },
{ "APD Log Viewer - DC1", 0, 1, 15, 6, 3, 4, 5, 17, -1, -1, 18, -1, 2, "Tab" },
{ "APD Log Viewer - DC2", 0, 1, 15, 6, 7, 8, 9, 17, -1, -1, 18, -1, 2, "Tab" },
{ "XP5", 0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "Tab" },
{ "SensusCSV", 9, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "," },
{ "Seabear CSV", 0, 1, 5, -1, -1, -1, -1, -1, 2, 3, 4, 6, -1, ";" },
{ "SubsurfaceCSV", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "Tab" },
- { NULL, }
+ { NULL, SILENCE_WARNING }
};
enum Known {
@@ -44,6 +46,8 @@ ColumnNameProvider::ColumnNameProvider(QObject *parent) : QAbstractListModel(par
bool ColumnNameProvider::insertRows(int row, int count, const QModelIndex &parent)
{
+ Q_UNUSED(count)
+ Q_UNUSED(parent)
beginInsertRows(QModelIndex(), row, row);
columnNames.append(QString());
endInsertRows();
@@ -52,6 +56,8 @@ bool ColumnNameProvider::insertRows(int row, int count, const QModelIndex &paren
bool ColumnNameProvider::removeRows(int row, int count, const QModelIndex &parent)
{
+ Q_UNUSED(count)
+ Q_UNUSED(parent)
beginRemoveRows(QModelIndex(), row, row);
columnNames.removeAt(row);
endRemoveRows();
@@ -100,6 +106,7 @@ int ColumnNameProvider::mymatch(QString value) const
ColumnNameView::ColumnNameView(QWidget *parent)
{
+ Q_UNUSED(parent)
setAcceptDrops(true);
setDragEnabled(true);
}
@@ -161,6 +168,7 @@ void ColumnNameView::dropEvent(QDropEvent *event)
ColumnDropCSVView::ColumnDropCSVView(QWidget *parent)
{
+ Q_UNUSED(parent)
setAcceptDrops(true);
}
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index fd14944f0..f84781e96 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -306,7 +306,6 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
ui.display_runtime->setChecked(prefs.display_runtime);
ui.display_transitions->setChecked(prefs.display_transitions);
ui.safetystop->setChecked(prefs.safetystop);
- ui.reserve_gas->setValue(prefs.reserve_gas / 1000);
ui.bottompo2->setValue(prefs.bottompo2 / 1000.0);
ui.decopo2->setValue(prefs.decopo2 / 1000.0);
ui.backgasBreaks->setChecked(prefs.doo2breaks);
@@ -448,6 +447,18 @@ void PlannerSettingsWidget::settingsChanged()
ui.bottomSAC->setValue((double) prefs.bottomsac / 1000.0);
ui.decoStopSAC->setValue((double) prefs.decosac / 1000.0);
}
+ if(get_units()->pressure == units::BAR) {
+ ui.reserve_gas->setSuffix(tr("bar"));
+ ui.reserve_gas->setSingleStep(1);
+ ui.reserve_gas->setValue(prefs.reserve_gas / 1000);
+ ui.reserve_gas->setMaximum(300);
+ } else {
+ ui.reserve_gas->setSuffix(tr("psi"));
+ ui.reserve_gas->setSingleStep(10);
+ ui.reserve_gas->setMaximum(5000);
+ ui.reserve_gas->setValue(mbar_to_PSI(prefs.reserve_gas));
+ }
+
ui.bottomSAC->blockSignals(false);
ui.decoStopSAC->blockSignals(false);
updateUnitsUI();
@@ -458,10 +469,6 @@ void PlannerSettingsWidget::settingsChanged()
ui.descRate->setSuffix(vs);
}
-void PlannerSettingsWidget::atmPressureChanged(const QString &pressure)
-{
-}
-
void PlannerSettingsWidget::printDecoPlan()
{
}
diff --git a/desktop-widgets/diveplanner.h b/desktop-widgets/diveplanner.h
index b2e03a97b..1cc96adc3 100644
--- a/desktop-widgets/diveplanner.h
+++ b/desktop-widgets/diveplanner.h
@@ -68,7 +68,6 @@ public:
public
slots:
void settingsChanged();
- void atmPressureChanged(const QString &pressure);
void bottomSacChanged(const double bottomSac);
void decoSacChanged(const double decosac);
void printDecoPlan();
diff --git a/desktop-widgets/diveshareexportdialog.cpp b/desktop-widgets/diveshareexportdialog.cpp
index c6a7771d8..ed6e2829a 100644
--- a/desktop-widgets/diveshareexportdialog.cpp
+++ b/desktop-widgets/diveshareexportdialog.cpp
@@ -119,7 +119,7 @@ void DiveShareExportDialog::doUpload()
ui->progressBar->setRange(0, 0);
//generate json
- struct membuffer buf = { 0 };
+ struct membuffer buf = {};
export_list(&buf, NULL, exportSelected, false);
QByteArray json_data(buf.buffer, buf.len);
free_buffer(&buf);
diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp
index 4c8fa6b4a..be6018b36 100644
--- a/desktop-widgets/downloadfromdivecomputer.cpp
+++ b/desktop-widgets/downloadfromdivecomputer.cpp
@@ -626,11 +626,13 @@ DiveImportedModel::DiveImportedModel(QObject *o) : QAbstractTableModel(o),
int DiveImportedModel::columnCount(const QModelIndex &model) const
{
+ Q_UNUSED(model)
return 3;
}
int DiveImportedModel::rowCount(const QModelIndex &model) const
{
+ Q_UNUSED(model)
return lastIndex - firstIndex + 1;
}
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index 2501ad7fb..5ca858a6b 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -280,12 +280,14 @@ void LocationInformationWidget::reverseGeocode()
DiveLocationFilterProxyModel::DiveLocationFilterProxyModel(QObject *parent)
{
+ Q_UNUSED(parent)
}
DiveLocationLineEdit *location_line_edit = 0;
bool DiveLocationFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
{
+ Q_UNUSED(source_parent)
if (source_row == 0)
return true;
@@ -301,6 +303,7 @@ bool DiveLocationFilterProxyModel::lessThan(const QModelIndex &source_left, cons
DiveLocationModel::DiveLocationModel(QObject *o)
{
+ Q_UNUSED(o)
resetModel();
}
@@ -361,16 +364,19 @@ QVariant DiveLocationModel::data(const QModelIndex &index, int role) const
int DiveLocationModel::columnCount(const QModelIndex &parent) const
{
+ Q_UNUSED(parent)
return COLUMNS;
}
int DiveLocationModel::rowCount(const QModelIndex &parent) const
{
+ Q_UNUSED(parent)
return dive_site_table.nr + 2;
}
bool DiveLocationModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
+ Q_UNUSED(role)
if (!index.isValid())
return false;
if (index.row() > 1)
@@ -415,6 +421,7 @@ DiveLocationLineEdit::DiveLocationLineEdit(QWidget *parent) : QLineEdit(parent),
bool DiveLocationLineEdit::eventFilter(QObject *o, QEvent *e)
{
+ Q_UNUSED(o)
if (e->type() == QEvent::KeyPress) {
QKeyEvent *keyEv = (QKeyEvent *)e;
@@ -498,6 +505,7 @@ static struct dive_site *get_dive_site_name_start_which_str(const QString &str)
void DiveLocationLineEdit::setTemporaryDiveSiteName(const QString &s)
{
+ Q_UNUSED(s)
QModelIndex i0 = model->index(0, DiveLocationModel::NAME);
QModelIndex i1 = model->index(1, DiveLocationModel::NAME);
model->setData(i0, text());
@@ -608,6 +616,7 @@ uint32_t DiveLocationLineEdit::currDiveSiteUuid() const
DiveLocationListView::DiveLocationListView(QWidget *parent)
{
+ Q_UNUSED(parent)
}
void DiveLocationListView::currentChanged(const QModelIndex &current, const QModelIndex &previous)
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index a3d6c4333..df0190e10 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -250,7 +250,7 @@ MainWindow::MainWindow() : QMainWindow(),
set_git_update_cb(&updateProgress);
// Toolbar Connections related to the Profile Update
- SettingsObjectWrapper *sWrapper = SettingsObjectWrapper::instance(); sWrapper->techDetails;
+ SettingsObjectWrapper *sWrapper = SettingsObjectWrapper::instance();
connect(ui.profCalcAllTissues, &QAction::triggered, sWrapper->techDetails, &TechnicalDetailsSettings::setCalcalltissues);
connect(ui.profCalcCeiling, &QAction::triggered, sWrapper->techDetails, &TechnicalDetailsSettings::setCalcceiling);
connect(ui.profDcCeiling, &QAction::triggered, sWrapper->techDetails, &TechnicalDetailsSettings::setDCceiling);
@@ -780,6 +780,10 @@ void MainWindow::on_actionEditDeviceNames_triggered()
bool MainWindow::plannerStateClean()
{
+ if (progressDialog)
+ // we are accessing the cloud, so let's not switch into Add or Plan mode
+ return false;
+
if (DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING ||
information()->isEditing()) {
QMessageBox::warning(this, tr("Warning"), tr("Please save or cancel the current dive edit before trying to add a dive."));
@@ -1300,8 +1304,6 @@ void MainWindow::readSettings()
{
static bool firstRun = true;
- SettingsObjectWrapper *settings = SettingsObjectWrapper::instance();
-
QSettings s; //WARNING: Why those prefs are not on the prefs struct?
s.beginGroup("DiveComputer");
default_dive_computer_vendor = getSetting(s, "dive_computer_vendor");
@@ -1853,7 +1855,6 @@ void MainWindow::editCurrentDive()
void MainWindow::turnOffNdlTts()
{
- const bool triggered = false;
SettingsObjectWrapper::instance()->techDetails->setCalcndltts(false);
}
diff --git a/desktop-widgets/modeldelegates.cpp b/desktop-widgets/modeldelegates.cpp
index 02b5838ec..377a1baed 100644
--- a/desktop-widgets/modeldelegates.cpp
+++ b/desktop-widgets/modeldelegates.cpp
@@ -26,6 +26,8 @@
QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
+ Q_UNUSED(option)
+ Q_UNUSED(index)
return QSize(50, 22);
}
@@ -68,6 +70,8 @@ void StarWidgetsDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
QSize StarWidgetsDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
+ Q_UNUSED(option)
+ Q_UNUSED(index)
return minStarSize;
}
@@ -106,6 +110,7 @@ struct CurrSelected {
QWidget *ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
+ Q_UNUSED(option)
MainWindow *m = MainWindow::instance();
QComboBox *comboDelegate = new QComboBox(parent);
comboDelegate->setModel(model);
@@ -220,6 +225,7 @@ bool ComboBoxDelegate::eventFilter(QObject *object, QEvent *event)
void ComboBoxDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
+ Q_UNUSED(index)
QRect defaultRect = option.rect;
defaultRect.setX(defaultRect.x() - 1);
defaultRect.setY(defaultRect.y() - 1);
@@ -236,6 +242,10 @@ struct RevertCylinderData {
void TankInfoDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &thisindex) const
{
+ Q_UNUSED(model)
+ Q_UNUSED(editor)
+ Q_UNUSED(thisindex)
+
CylindersModel *mymodel = qobject_cast<CylindersModel *>(currCombo.model);
TankInfoModel *tanks = TankInfoModel::instance();
QModelIndexList matches = tanks->match(tanks->index(0, 0), Qt::DisplayRole, currCombo.activeText);
@@ -265,6 +275,8 @@ TankInfoDelegate::TankInfoDelegate(QObject *parent) : ComboBoxDelegate(TankInfoM
void TankInfoDelegate::reenableReplot(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
{
+ Q_UNUSED(widget)
+ Q_UNUSED(hint)
MainWindow::instance()->graphics()->setReplot(true);
// FIXME: We need to replot after a cylinder is selected but the replot below overwrites
// the newly selected cylinder.
@@ -273,6 +285,7 @@ void TankInfoDelegate::reenableReplot(QWidget *widget, QAbstractItemDelegate::En
void TankInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
{
+ Q_UNUSED(widget)
if (hint == QAbstractItemDelegate::NoHint ||
hint == QAbstractItemDelegate::RevertModelCache) {
CylindersModel *mymodel = qobject_cast<CylindersModel *>(currCombo.model);
@@ -302,6 +315,8 @@ TankUseDelegate::TankUseDelegate(QObject *parent) : QStyledItemDelegate(parent)
QWidget *TankUseDelegate::createEditor(QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index) const
{
+ Q_UNUSED(option)
+ Q_UNUSED(index)
QComboBox *comboBox = new QComboBox(parent);
for (int i = 0; i < NUM_GAS_USE; i++)
comboBox->addItem(gettextFromC::instance()->trGettext(cylinderuse_text[i]));
@@ -328,6 +343,7 @@ struct RevertWeightData {
void WSInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
{
+ Q_UNUSED(widget)
if (hint == QAbstractItemDelegate::NoHint ||
hint == QAbstractItemDelegate::RevertModelCache) {
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
@@ -338,6 +354,10 @@ void WSInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::End
void WSInfoDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &thisindex) const
{
+ Q_UNUSED(editor)
+ Q_UNUSED(model)
+ Q_UNUSED(thisindex)
+
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
WSInfoModel *wsim = WSInfoModel::instance();
QModelIndexList matches = wsim->match(wsim->index(0, 0), Qt::DisplayRole, currCombo.activeText);
@@ -374,6 +394,8 @@ QWidget *WSInfoDelegate::createEditor(QWidget *parent, const QStyleOptionViewIte
void AirTypesDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
{
+ Q_UNUSED(widget)
+ Q_UNUSED(hint)
}
void AirTypesDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
@@ -422,6 +444,7 @@ QWidget *DoubleSpinBoxDelegate::createEditor(QWidget *parent, const QStyleOption
LocationFilterDelegate::LocationFilterDelegate(QObject *parent)
{
+ Q_UNUSED(parent)
}
void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &origIdx) const
diff --git a/desktop-widgets/plugins/facebook/facebook_integration.cpp b/desktop-widgets/plugins/facebook/facebook_integration.cpp
index 21ad6f733..58d757e87 100644
--- a/desktop-widgets/plugins/facebook/facebook_integration.cpp
+++ b/desktop-widgets/plugins/facebook/facebook_integration.cpp
@@ -7,6 +7,7 @@ FacebookPlugin::FacebookPlugin(QObject* parent) :
fbConnectWidget(new FacebookConnectWidget()),
fbUploadDialog(new SocialNetworkDialog())
{
+ Q_UNUSED(parent)
}
bool FacebookPlugin::isConnected()
diff --git a/desktop-widgets/preferences/preferences_network.h b/desktop-widgets/preferences/preferences_network.h
index 3e17d51b0..b56d7bb1a 100644
--- a/desktop-widgets/preferences/preferences_network.h
+++ b/desktop-widgets/preferences/preferences_network.h
@@ -18,11 +18,11 @@ public:
public slots:
void proxyType_changed(int i);
+ void cloudPinNeeded();
private:
Ui::PreferencesNetwork *ui;
- void cloudPinNeeded();
void passwordUpdateSuccessfull();
};
-#endif \ No newline at end of file
+#endif
diff --git a/desktop-widgets/printdialog.cpp b/desktop-widgets/printdialog.cpp
index d10e67921..72e4d20c8 100644
--- a/desktop-widgets/printdialog.cpp
+++ b/desktop-widgets/printdialog.cpp
@@ -203,6 +203,7 @@ void PrintDialog::printClicked(void)
void PrintDialog::onPaintRequested(QPrinter *printerPtr)
{
+ Q_UNUSED(printerPtr)
createPrinterObj();
connect(printer, SIGNAL(progessUpdated(int)), progressBar, SLOT(setValue(int)));
printer->print();
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp
index c3c7072ca..6d46a49c7 100644
--- a/desktop-widgets/simplewidgets.cpp
+++ b/desktop-widgets/simplewidgets.cpp
@@ -67,6 +67,7 @@ double MinMaxAvgWidget::minimum() const
MinMaxAvgWidget::MinMaxAvgWidget(QWidget *parent) : d(new MinMaxAvgWidgetPrivate(this))
{
+ Q_UNUSED(parent)
}
MinMaxAvgWidget::~MinMaxAvgWidget()
@@ -243,6 +244,7 @@ void ShiftTimesDialog::buttonClicked(QAbstractButton *button)
void ShiftTimesDialog::showEvent(QShowEvent *event)
{
+ Q_UNUSED(event)
ui.timeEdit->setTime(QTime(0, 0, 0, 0));
when = get_times(); //get time of first selected dive
ui.currentTime->setText(get_dive_date_string(when));
@@ -475,6 +477,7 @@ void DateWidget::changeEvent(QEvent *event)
#define DATEWIDGETWIDTH 80
void DateWidget::paintEvent(QPaintEvent *event)
{
+ Q_UNUSED(event)
static QPixmap pix = QPixmap(":/calendar").scaled(DATEWIDGETWIDTH, 64);
QPainter painter(this);
diff --git a/desktop-widgets/starwidget.cpp b/desktop-widgets/starwidget.cpp
index d959ed3b9..a810883c2 100644
--- a/desktop-widgets/starwidget.cpp
+++ b/desktop-widgets/starwidget.cpp
@@ -62,6 +62,7 @@ void StarWidget::mouseReleaseEvent(QMouseEvent *event)
void StarWidget::paintEvent(QPaintEvent *event)
{
+ Q_UNUSED(event)
QPainter p(this);
QImage star = hasFocus() ? focusedImage(starActive()) : starActive();
QPixmap selected = QPixmap::fromImage(star);
diff --git a/desktop-widgets/statistics/statisticswidget.cpp b/desktop-widgets/statistics/statisticswidget.cpp
index 3e91fa317..d06f51a98 100644
--- a/desktop-widgets/statistics/statisticswidget.cpp
+++ b/desktop-widgets/statistics/statisticswidget.cpp
@@ -23,6 +23,9 @@ void YearlyStatisticsWidget::setModel(YearlyStatisticsModel *m)
void YearlyStatisticsWidget::modelRowsInserted(const QModelIndex &index, int first, int last)
{
+ Q_UNUSED(index)
+ Q_UNUSED(first)
+ Q_UNUSED(last)
// stub
}
diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp
index 0dd9ad4ef..2ca3de187 100644
--- a/desktop-widgets/subsurfacewebservices.cpp
+++ b/desktop-widgets/subsurfacewebservices.cpp
@@ -194,7 +194,7 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile,
const char *membuf;
xmlDoc *transformed;
struct zip_source *s;
- struct membuffer mb = { 0 };
+ struct membuffer mb = {};
/*
* Get the i'th dive in XML format so we can process it.
@@ -961,6 +961,7 @@ void DivelogsDeWebServices::uploadFinished()
void DivelogsDeWebServices::setStatusText(int status)
{
+ Q_UNUSED(status)
}
void DivelogsDeWebServices::downloadError(QNetworkReply::NetworkError)
diff --git a/desktop-widgets/subsurfacewebservices.h b/desktop-widgets/subsurfacewebservices.h
index c00b6f63f..f7d15d0fd 100644
--- a/desktop-widgets/subsurfacewebservices.h
+++ b/desktop-widgets/subsurfacewebservices.h
@@ -106,7 +106,7 @@ slots:
// need to declare them as no ops or Qt4 is unhappy
virtual void startDownload() { }
virtual void startUpload() { }
- virtual void buttonClicked(QAbstractButton *button) { }
+ virtual void buttonClicked(QAbstractButton *button) { Q_UNUSED(button) }
};
#ifdef __cplusplus