QtDeclarative: Fix warnings in tests.
- Unused parameters - Missing interfaces - tst_QQuickListView: Fix call canvas->rootContext()->setContextProperty to use a QVariant (instead of implicitly converting to QObject*) which was apparently intended. Change-Id: Idc95d9408051e6f5b7005a7eccd764ac218ff867 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
d0d12171b0
commit
7f20428c91
|
@ -137,7 +137,7 @@ bool operator ==(const tst_qdeclarativemodelchange::Signal &left, const tst_qdec
|
|||
return left.index == right.index
|
||||
&& left.count == right.count
|
||||
&& left.to == right.to
|
||||
&& ((left.moveId == -1 && right.moveId == -1) || left.moveId != -1 && right.moveId != -1);
|
||||
&& ((left.moveId == -1 && right.moveId == -1) || (left.moveId != -1 && right.moveId != -1));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -86,7 +86,8 @@ private:
|
|||
|
||||
class CompletionRegisteringType : public QObject, public QDeclarativeParserStatus
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDeclarativeParserStatus)
|
||||
public:
|
||||
CompletionRegisteringType();
|
||||
|
||||
|
@ -102,7 +103,8 @@ private:
|
|||
|
||||
class CompletionCallbackType : public QObject, public QDeclarativeParserStatus
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDeclarativeParserStatus)
|
||||
public:
|
||||
CompletionCallbackType();
|
||||
|
||||
|
|
|
@ -811,7 +811,7 @@ void tst_qdeclarativeincubator::chainedAsynchronousIfNestedOnCompleted()
|
|||
QDeclarativeComponent *component;
|
||||
MyIncubator *incubator;
|
||||
QDeclarativeContext *ctxt;
|
||||
static void callback(CompletionCallbackType *o, void *data) {
|
||||
static void callback(CompletionCallbackType *, void *data) {
|
||||
CallbackData *d = (CallbackData *)data;
|
||||
d->component->create(*d->incubator, 0, d->ctxt);
|
||||
}
|
||||
|
|
|
@ -597,6 +597,7 @@ public:
|
|||
|
||||
class MyParserStatus : public QObject, public QDeclarativeParserStatus
|
||||
{
|
||||
Q_INTERFACES(QDeclarativeParserStatus)
|
||||
Q_OBJECT
|
||||
public:
|
||||
MyParserStatus() : m_cbc(0), m_ccc(0) {}
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
class BarPluginType : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int value READ value);
|
||||
Q_PROPERTY(int value READ value)
|
||||
|
||||
public:
|
||||
int value() const { return 16; }
|
||||
|
|
|
@ -793,7 +793,7 @@ void tst_QJSEngine::newVariant_promoteNonQScriptObject()
|
|||
|
||||
void tst_QJSEngine::newRegExp()
|
||||
{
|
||||
QSKIP("Test failing - QTBUG-22238", SkipAll);
|
||||
QSKIP("Test failing - QTBUG-22238");
|
||||
QJSEngine eng;
|
||||
for (int x = 0; x < 2; ++x) {
|
||||
QJSValue rexp;
|
||||
|
@ -817,7 +817,7 @@ void tst_QJSEngine::newRegExp()
|
|||
|
||||
void tst_QJSEngine::jsRegExp()
|
||||
{
|
||||
QSKIP("Test failing - QTBUG-22238", SkipAll);
|
||||
QSKIP("Test failing - QTBUG-22238");
|
||||
|
||||
// See ECMA-262 Section 15.10, "RegExp Objects".
|
||||
// These should really be JS-only tests, as they test the implementation's
|
||||
|
@ -1463,7 +1463,7 @@ static QScriptValue getSetFoo(QScriptContext *ctx, QScriptEngine *)
|
|||
|
||||
void tst_QJSEngine::globalObjectProperties()
|
||||
{
|
||||
QSKIP("Test failing - QTBUG-22238", SkipAll);
|
||||
QSKIP("Test failing - QTBUG-22238");
|
||||
// See ECMA-262 Section 15.1, "The Global Object".
|
||||
|
||||
QJSEngine eng;
|
||||
|
@ -1552,7 +1552,7 @@ void tst_QJSEngine::globalObjectEquals()
|
|||
|
||||
void tst_QJSEngine::globalObjectProperties_enumerate()
|
||||
{
|
||||
QSKIP("Test failing - QTBUG-22238", SkipAll);
|
||||
QSKIP("Test failing - QTBUG-22238");
|
||||
QJSEngine eng;
|
||||
QJSValue global = eng.globalObject();
|
||||
|
||||
|
@ -3072,6 +3072,7 @@ class Klazz : public QWidget,
|
|||
public QStandardItem,
|
||||
public QGraphicsItem
|
||||
{
|
||||
Q_INTERFACES(QGraphicsItem)
|
||||
Q_OBJECT
|
||||
public:
|
||||
Klazz(QWidget *parent = 0) : QWidget(parent) { }
|
||||
|
@ -6080,7 +6081,7 @@ void tst_QJSEngine::qRegExpInport_data()
|
|||
|
||||
void tst_QJSEngine::qRegExpInport()
|
||||
{
|
||||
QSKIP("Test failing - QTBUG-22238", SkipAll);
|
||||
QSKIP("Test failing - QTBUG-22238");
|
||||
QFETCH(QRegExp, rx);
|
||||
QFETCH(QString, string);
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ protected:
|
|||
event->accept();
|
||||
}
|
||||
|
||||
virtual void mousePressEvent(QMouseEvent *event) {
|
||||
virtual void mousePressEvent(QMouseEvent *) {
|
||||
mousePressId = ++mousePressNum;
|
||||
}
|
||||
|
||||
|
|
|
@ -339,6 +339,8 @@ void tst_qquickimage::mirror()
|
|||
p_e.setTransform(transform);
|
||||
p_e.drawTiledPixmap(QRect(0, 0, width, height), srcPixmap);
|
||||
break;
|
||||
case QQuickImage::Pad:
|
||||
break;
|
||||
}
|
||||
|
||||
QImage img = expected.toImage();
|
||||
|
|
|
@ -911,7 +911,7 @@ void tst_QQuickListView::insertBeforeVisible_data()
|
|||
}
|
||||
|
||||
template <class T>
|
||||
void tst_QQuickListView::removed(bool animated)
|
||||
void tst_QQuickListView::removed(bool /* animated */)
|
||||
{
|
||||
QQuickView *canvas = createView();
|
||||
|
||||
|
@ -3027,7 +3027,7 @@ void tst_QQuickListView::header_delayItemCreation()
|
|||
|
||||
TestModel model;
|
||||
|
||||
canvas->rootContext()->setContextProperty("setCurrentToZero", false);
|
||||
canvas->rootContext()->setContextProperty("setCurrentToZero", QVariant(false));
|
||||
canvas->setSource(QUrl::fromLocalFile(TESTDATA("fillModelOnComponentCompleted.qml")));
|
||||
qApp->processEvents();
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ class SingleRoleModel : public QAbstractListModel
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SingleRoleModel(const QByteArray &role = "name", QObject *parent = 0) {
|
||||
SingleRoleModel(const QByteArray &role = "name", QObject * /* parent */ = 0) {
|
||||
QHash<int, QByteArray> roles;
|
||||
roles.insert(Qt::DisplayRole , role);
|
||||
setRoleNames(roles);
|
||||
|
@ -101,7 +101,7 @@ public slots:
|
|||
}
|
||||
|
||||
protected:
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const {
|
||||
int rowCount(const QModelIndex & /* parent */ = QModelIndex()) const {
|
||||
return list.count();
|
||||
}
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const {
|
||||
|
|
Loading…
Reference in New Issue