Fix compiler warnings.
- Fix gcc 4.6.X warnings about assigned but unused variables - Remove trailing ';' from inline functions (Clang) Change-Id: I8670afd6b149748a740f22c65de137762e9f18e1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
parent
d2aaa13820
commit
434824aede
@ -145,8 +145,8 @@ class ResultReporter<void>
|
||||
{
|
||||
public:
|
||||
inline ResultReporter(ThreadEngine<void> *) { }
|
||||
inline void reserveSpace(int) { };
|
||||
inline void reportResults(int) { };
|
||||
inline void reserveSpace(int) { }
|
||||
inline void reportResults(int) { }
|
||||
inline void * getPointer() { return 0; }
|
||||
};
|
||||
|
||||
|
@ -134,7 +134,7 @@ public:
|
||||
ResultIteratorBase resultAt(int index) const;
|
||||
bool contains(int index) const;
|
||||
int count() const;
|
||||
virtual ~ResultStoreBase() { };
|
||||
virtual ~ResultStoreBase() { }
|
||||
|
||||
protected:
|
||||
int insertResultItem(int index, ResultItem &resultItem);
|
||||
|
@ -2284,7 +2284,7 @@ struct QForeachContainerBase {};
|
||||
template <typename T>
|
||||
class QForeachContainer : public QForeachContainerBase {
|
||||
public:
|
||||
inline QForeachContainer(const T& t): c(t), brk(0), i(c.begin()), e(c.end()){};
|
||||
inline QForeachContainer(const T& t): c(t), brk(0), i(c.begin()), e(c.end()){}
|
||||
const T c;
|
||||
mutable int brk;
|
||||
mutable typename T::const_iterator i, e;
|
||||
|
@ -169,9 +169,13 @@ QDragManager *QDragManager::self()
|
||||
|
||||
QPixmap QDragManager::dragCursor(Qt::DropAction action) const
|
||||
{
|
||||
QDragPrivate * d = dragPrivate();
|
||||
if (d && d->customCursors.contains(action))
|
||||
return d->customCursors[action];
|
||||
typedef QMap<Qt::DropAction, QPixmap>::const_iterator Iterator;
|
||||
|
||||
if (const QDragPrivate *d = dragPrivate()) {
|
||||
const Iterator it = d->customCursors.constFind(action);
|
||||
if (it != d->customCursors.constEnd())
|
||||
return it.value();
|
||||
}
|
||||
|
||||
Qt::CursorShape shape = Qt::ForbiddenCursor;
|
||||
switch (action) {
|
||||
@ -187,8 +191,7 @@ QPixmap QDragManager::dragCursor(Qt::DropAction action) const
|
||||
default:
|
||||
shape = Qt::ForbiddenCursor;
|
||||
}
|
||||
|
||||
return QGuiApplicationPrivate::instance()->getPixmapCursor(Qt::DragMoveCursor);
|
||||
return QGuiApplicationPrivate::instance()->getPixmapCursor(shape);
|
||||
}
|
||||
|
||||
Qt::DropAction QDragManager::defaultAction(Qt::DropActions possibleActions,
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
|
||||
virtual QMimeData *platformDropData() = 0;
|
||||
|
||||
virtual void startDrag() {};
|
||||
virtual void startDrag() {}
|
||||
virtual void move(const QMouseEvent *me) = 0;
|
||||
virtual void drop(const QMouseEvent *me) = 0;
|
||||
virtual void cancel() = 0;
|
||||
|
@ -513,21 +513,18 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c
|
||||
m_dash_stroker.setMiterLimit(pen.miterLimit());
|
||||
m_dash_stroker.setClipRect(clip);
|
||||
|
||||
float curvynessAdd, curvynessMul, roundness = 0;
|
||||
float curvynessAdd, curvynessMul;
|
||||
|
||||
// simplfy pens that are thin in device size (2px wide or less)
|
||||
// simplify pens that are thin in device size (2px wide or less)
|
||||
if (width < 2.5 && (cosmetic || m_inv_scale == 1)) {
|
||||
curvynessAdd = 0.5;
|
||||
curvynessMul = CURVE_FLATNESS / m_inv_scale;
|
||||
roundness = 1;
|
||||
} else if (cosmetic) {
|
||||
curvynessAdd= width / 2;
|
||||
curvynessMul= CURVE_FLATNESS;
|
||||
roundness = qMax<int>(4, width * CURVE_FLATNESS);
|
||||
} else {
|
||||
curvynessAdd = width * m_inv_scale;
|
||||
curvynessMul = CURVE_FLATNESS / m_inv_scale;
|
||||
roundness = qMax<int>(4, width * curvynessMul);
|
||||
}
|
||||
|
||||
if (count < 2)
|
||||
|
@ -518,7 +518,6 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
|
||||
Q_ASSERT(type == path.elements() || *type == QPainterPath::MoveToElement);
|
||||
|
||||
QPointF p = QPointF(points[0], points[1]) * state->matrix;
|
||||
QPointF movedTo = p;
|
||||
patternOffset = state->lastPen.dashOffset()*64;
|
||||
lastPixel.x = -1;
|
||||
|
||||
|
@ -596,6 +596,7 @@ void QTextOdfWriter::writeCharacterFormat(QXmlStreamWriter &writer, QTextCharFor
|
||||
case QTextCharFormat::AlignSubScript: value = QString::fromLatin1("sub"); break;
|
||||
case QTextCharFormat::AlignTop: value = QString::fromLatin1("100%"); break;
|
||||
case QTextCharFormat::AlignBottom : value = QString::fromLatin1("-100%"); break;
|
||||
case QTextCharFormat::AlignBaseline: break;
|
||||
}
|
||||
writer.writeAttribute(styleNS, QString::fromLatin1("text-position"), value);
|
||||
}
|
||||
|
@ -513,21 +513,18 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c
|
||||
m_dash_stroker.setMiterLimit(pen.miterLimit());
|
||||
m_dash_stroker.setClipRect(clip);
|
||||
|
||||
float curvynessAdd, curvynessMul, roundness = 0;
|
||||
float curvynessAdd, curvynessMul;
|
||||
|
||||
// simplfy pens that are thin in device size (2px wide or less)
|
||||
if (width < 2.5 && (cosmetic || m_inv_scale == 1)) {
|
||||
curvynessAdd = 0.5;
|
||||
curvynessMul = CURVE_FLATNESS / m_inv_scale;
|
||||
roundness = 1;
|
||||
} else if (cosmetic) {
|
||||
curvynessAdd= width / 2;
|
||||
curvynessMul= CURVE_FLATNESS;
|
||||
roundness = qMax<int>(4, width * CURVE_FLATNESS);
|
||||
} else {
|
||||
curvynessAdd = width * m_inv_scale;
|
||||
curvynessMul = CURVE_FLATNESS / m_inv_scale;
|
||||
roundness = qMax<int>(4, width * curvynessMul);
|
||||
}
|
||||
|
||||
if (count < 2)
|
||||
|
@ -930,11 +930,8 @@ void QOfonoSmsInterface::sendMessage(const QString &to, const QString &message)
|
||||
QDBusReply<QString> reply = this->call(QLatin1String("SendMessage"),
|
||||
QVariant::fromValue(to),
|
||||
QVariant::fromValue(message));
|
||||
bool ok = true;
|
||||
if(reply.error().type() == QDBusError::InvalidArgs) {
|
||||
qWarning() << reply.error().message();
|
||||
ok = false;
|
||||
}
|
||||
if (reply.error().type() == QDBusError::InvalidArgs)
|
||||
qWarning("%s", qPrintable(reply.error().message()));
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -630,12 +630,6 @@ static QSqlField qMakeFieldInfo(const QODBCPrivate* p, int i )
|
||||
QString qColName = QString::fromUtf8((const char *)colName.constData());
|
||||
#endif
|
||||
// nullable can be SQL_NO_NULLS, SQL_NULLABLE or SQL_NULLABLE_UNKNOWN
|
||||
int required = -1;
|
||||
if (nullable == SQL_NO_NULLS) {
|
||||
required = 1;
|
||||
} else if (nullable == SQL_NULLABLE) {
|
||||
required = 0;
|
||||
}
|
||||
QVariant::Type type = qDecodeODBCType(colType, p, unsignedFlag == SQL_FALSE);
|
||||
QSqlField f(qColName, type);
|
||||
f.setSqlType(colType);
|
||||
|
@ -64,8 +64,8 @@ QT_BEGIN_NAMESPACE
|
||||
class QBenchmarkMeasurerBase
|
||||
{
|
||||
public:
|
||||
virtual ~QBenchmarkMeasurerBase(){};
|
||||
virtual void init() {};
|
||||
virtual ~QBenchmarkMeasurerBase() {}
|
||||
virtual void init() {}
|
||||
virtual void start() = 0;
|
||||
virtual qint64 checkpoint() = 0;
|
||||
virtual qint64 stop() = 0;
|
||||
|
@ -687,11 +687,6 @@ void WriteInitialization::acceptWidget(DomWidget *node)
|
||||
|
||||
const QString pageDefaultString = QLatin1String("Page");
|
||||
|
||||
int id = -1;
|
||||
if (const DomProperty *pid = attributes.value(QLatin1String("id"))) {
|
||||
id = pid->elementNumber();
|
||||
}
|
||||
|
||||
if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QMainWindow"))) {
|
||||
if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QMenuBar"))) {
|
||||
m_output << m_indent << parentWidget << "->setMenuBar(" << varName <<");\n";
|
||||
|
@ -86,7 +86,7 @@ class Q_WIDGETS_EXPORT QGuiPlatformPlugin : public QObject, public QGuiPlatformP
|
||||
explicit QGuiPlatformPlugin(QObject *parent = 0);
|
||||
~QGuiPlatformPlugin();
|
||||
|
||||
virtual QStringList keys() const { return QStringList() << QLatin1String("default"); };
|
||||
virtual QStringList keys() const { return QStringList(QStringLiteral("default")); }
|
||||
|
||||
virtual QString styleName();
|
||||
virtual QPalette palette();
|
||||
|
@ -53,6 +53,8 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <private/qobject_p.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
#ifndef QT_NO_SOFTKEYMANAGER
|
||||
@ -64,7 +66,7 @@ class QSoftKeyManagerPrivate : public QObjectPrivate
|
||||
Q_DECLARE_PUBLIC(QSoftKeyManager)
|
||||
|
||||
public:
|
||||
virtual void updateSoftKeys_sys() {};
|
||||
virtual void updateSoftKeys_sys() {}
|
||||
|
||||
protected:
|
||||
static QSoftKeyManager *self;
|
||||
|
Loading…
x
Reference in New Issue
Block a user