Fix some warnings that have crept up since I last fixed warnings

qgtkstyle.cpp:3177:103: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses]
qcups.cpp:517:66: error: ‘QString::QString(const char*)’ is deprecated
itemviews.cpp:795:13: error: unused parameter ‘actionName’ [-Werror=unused-parameter]
qeglconvenience.cpp:268:9: error: ‘cfg’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

Change-Id: I9b8a175ff1c2ddc443363e08b92e09cf7c2f91cf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Thiago Macieira 2013-02-22 18:17:12 -08:00 committed by The Qt Project
parent cafb02911a
commit 7b2d98d906
4 changed files with 4 additions and 4 deletions

View File

@ -245,7 +245,7 @@ EGLConfig QEglConfigChooser::chooseConfig()
configureAttributes.append(EGL_NONE);
EGLConfig cfg;
EGLConfig cfg = 0;
do {
// Get the number of matching configurations for this set of properties.
EGLint matching = 0;

View File

@ -792,7 +792,7 @@ void QAccessibleTableCell::doAction(const QString& actionName)
}
}
QStringList QAccessibleTableCell::keyBindingsForAction(const QString& actionName) const
QStringList QAccessibleTableCell::keyBindingsForAction(const QString &) const
{
return QStringList();
}

View File

@ -514,7 +514,7 @@ QList<QPair<QString, QSizeF> > QCUPSSupport::getCupsPrinterPaperSizesWithNames(i
for (int j = 0; j < size->num_choices; ++j) {
double multiplier = qt_multiplierForUnit(QPrinter::Millimeter, 0); // resolution is not needed here
QSize sz = cups.paperRect(size->choices[j].choice).size();
result.append(qMakePair(QString(size->choices[j].text), QSizeF(sz.width() / multiplier, sz.height() / multiplier)));
result.append(qMakePair(QString::fromUtf8(size->choices[j].text), QSizeF(sz.width() / multiplier, sz.height() / multiplier)));
}
}
return result;

View File

@ -3174,7 +3174,7 @@ void QGtkStyle::drawControl(ControlElement element,
#ifndef QT_NO_COMBOBOX
if (qobject_cast<const QComboBox*>(widget) ||
option->styleObject && option->styleObject->property("_q_isComboBoxPopupItem").toBool())
(option->styleObject && option->styleObject->property("_q_isComboBoxPopupItem").toBool()))
ignoreCheckMark = true; // Ignore the checkmarks provided by the QComboMenuDelegate
#endif