Mercurial > hg > svgui
changeset 249:e6d0b097d102 sv1-1.0rc1
* more compile warning fixes
author | Chris Cannam |
---|---|
date | Mon, 30 Apr 2007 14:06:45 +0000 |
parents | 28c8e8e3c537 |
children | 3fe622570b35 |
files | widgets/AudioDial.cpp widgets/ListInputDialog.cpp widgets/Panner.cpp widgets/PluginParameterBox.cpp widgets/PluginParameterDialog.cpp widgets/PropertyBox.cpp widgets/PropertyStack.cpp widgets/Thumbwheel.cpp |
diffstat | 8 files changed, 15 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/widgets/AudioDial.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/AudioDial.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -137,7 +137,7 @@ int m_size = width() < height() ? width() : height(); int scale = 1; - int width = m_size - 2*scale, height = m_size - 2*scale; + int width = m_size - 2*scale; paint.begin(this); paint.setRenderHint(QPainter::Antialiasing, true);
--- a/widgets/ListInputDialog.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/ListInputDialog.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -77,7 +77,7 @@ QString ListInputDialog::getCurrentString() const { - for (int i = 0; i < m_radioButtons.size(); ++i) { + for (size_t i = 0; i < m_radioButtons.size(); ++i) { if (m_radioButtons[i]->isChecked()) { return m_strings[i]; }
--- a/widgets/Panner.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/Panner.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -127,7 +127,7 @@ } void -Panner::paintEvent(QPaintEvent *e) +Panner::paintEvent(QPaintEvent *) { QPainter paint(this); paint.setRenderHint(QPainter::Antialiasing, false); @@ -187,8 +187,8 @@ void Panner::setRectExtents(float x0, float y0, float width, float height) { - std::cerr << "Panner::setRectExtents(" << x0 << ", " << y0 << ", " - << width << ", " << height << ")" << std::endl; +// std::cerr << "Panner::setRectExtents(" << x0 << ", " << y0 << ", " +// << width << ", " << height << ")" << std::endl; if (m_rectX == x0 && m_rectY == y0 &&
--- a/widgets/PluginParameterBox.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/PluginParameterBox.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -69,7 +69,7 @@ QComboBox *programCombo = new QComboBox; programCombo->setMaxVisibleItems(20); - for (int i = 0; i < programs.size(); ++i) { + for (size_t i = 0; i < programs.size(); ++i) { programCombo->addItem(programs[i].c_str()); if (programs[i] == currentProgram) { programCombo->setCurrentIndex(i); @@ -133,7 +133,7 @@ combobox->setObjectName(identifier); for (unsigned int j = 0; j < valueNames.size(); ++j) { combobox->addItem(valueNames[j].c_str()); - if (lrintf((value - min) / qtz) == j) { + if ((unsigned int)(lrintf(fabsf((value - min) / qtz))) == j) { combobox->setCurrentIndex(j); } } @@ -301,7 +301,7 @@ value = min + step * qtz; } - int imin = 0, imax = 100; + int imax = 100; if (qtz > 0.0) { imax = int((max - min) / qtz); @@ -309,7 +309,7 @@ qtz = (max - min) / 100.0; } - int ival = (value - min) / qtz; + int ival = lrintf((value - min) / qtz); AudioDial *dial = m_params[identifier].dial; if (dial) { @@ -359,7 +359,7 @@ if (i->second.combo) { i->second.combo->blockSignals(true); - i->second.combo->setCurrentIndex(value); + i->second.combo->setCurrentIndex(lrintf(value)); i->second.combo->blockSignals(false); } }
--- a/widgets/PluginParameterDialog.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/PluginParameterDialog.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -193,8 +193,6 @@ m_advanced->setLayout(advancedLayout); grid->addWidget(m_advanced, 3, 0); - bool haveAdvanced = false; - m_channelBox = new QGroupBox; m_channelBox->setTitle(tr("Channels")); advancedLayout->addWidget(m_channelBox); @@ -373,7 +371,7 @@ blockSizeCombo->setEditable(true); bool found = false; for (int i = 0; i < 14; ++i) { - int val = pow(2, i + 3); + int val = 1 << (i + 3); blockSizeCombo->addItem(QString("%1").arg(val)); if (val == size) { blockSizeCombo->setCurrentIndex(i); @@ -395,7 +393,7 @@ incrementCombo->setEditable(true); found = false; for (int i = 0; i < 14; ++i) { - int val = pow(2, i + 3); + int val = 1 << (i + 3); incrementCombo->addItem(QString("%1").arg(val)); if (val == increment) { incrementCombo->setCurrentIndex(i);
--- a/widgets/PropertyBox.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/PropertyBox.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -501,7 +501,7 @@ } void -PropertyBox::propertyContainerPropertyRangeChanged(PropertyContainer *pc) +PropertyBox::propertyContainerPropertyRangeChanged(PropertyContainer *) { blockSignals(true);
--- a/widgets/PropertyStack.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/PropertyStack.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -199,7 +199,7 @@ } void -PropertyStack::propertyContainerNameChanged(PropertyContainer *pc) +PropertyStack::propertyContainerNameChanged(PropertyContainer *) { if (sender() != m_client) return; repopulate();