Fix warnings in qtdeclarative.
- QString from ASCII conversions - Unused variables - Pointer mismatches Change-Id: I5f76dce4f2ba481c2c2bce8681cf8107bd629566 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
This commit is contained in:
parent
831c2bf638
commit
5534768481
|
@ -297,16 +297,16 @@ QList<QQmlDirParser::TypeInfo> QQmlDirParser::typeInfos() const
|
|||
|
||||
QDebug &operator<< (QDebug &debug, const QQmlDirParser::Component &component)
|
||||
{
|
||||
return debug << qPrintable(QString("{%1 %2.%3}").arg(component.typeName)
|
||||
.arg(component.majorVersion)
|
||||
.arg(component.minorVersion));
|
||||
const QString output = QString::fromLatin1("{%1 %2.%3}").
|
||||
arg(component.typeName).arg(component.majorVersion).arg(component.minorVersion);
|
||||
return debug << qPrintable(output);
|
||||
}
|
||||
|
||||
QDebug &operator<< (QDebug &debug, const QQmlDirParser::Script &script)
|
||||
{
|
||||
return debug << qPrintable(QString("{%1 %2.%3}").arg(script.nameSpace)
|
||||
.arg(script.majorVersion)
|
||||
.arg(script.minorVersion));
|
||||
const QString output = QString::fromLatin1("{%1 %2.%3}").
|
||||
arg(script.nameSpace).arg(script.majorVersion).arg(script.minorVersion);
|
||||
return debug << qPrintable(output);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
@ -327,7 +327,7 @@ v8::Handle<v8::Value> QV8ContextWrapper::Getter(v8::Local<v8::String> property,
|
|||
|
||||
const QVariant &value = cp->propertyValues.at(propertyIdx);
|
||||
if (value.userType() == qMetaTypeId<QList<QObject*> >()) {
|
||||
QQmlListProperty<QObject> prop(context->asQQmlContext(), (void*)propertyIdx,
|
||||
QQmlListProperty<QObject> prop(context->asQQmlContext(), (void*) qintptr(propertyIdx),
|
||||
0,
|
||||
QQmlContextPrivate::context_count,
|
||||
QQmlContextPrivate::context_at);
|
||||
|
|
|
@ -748,7 +748,6 @@ QRectF QQuickTextPrivate::setupTextLayout(qreal *const naturalWidth)
|
|||
QTextLine line;
|
||||
int visibleCount = 0;
|
||||
bool elide;
|
||||
bool widthChanged;
|
||||
qreal height = 0;
|
||||
QString elideText;
|
||||
bool once = true;
|
||||
|
@ -776,7 +775,6 @@ QRectF QQuickTextPrivate::setupTextLayout(qreal *const naturalWidth)
|
|||
bool truncateHeight = false;
|
||||
truncated = false;
|
||||
elide = false;
|
||||
widthChanged = false;
|
||||
int characterCount = 0;
|
||||
int unwrappedLineCount = 1;
|
||||
int maxLineCount = maximumLineCount();
|
||||
|
@ -911,10 +909,8 @@ QRectF QQuickTextPrivate::setupTextLayout(qreal *const naturalWidth)
|
|||
|
||||
const qreal oldWidth = lineWidth;
|
||||
lineWidth = q->widthValid() && q->width() > 0 ? q->width() : FLT_MAX;
|
||||
if (lineWidth != oldWidth && (singlelineElide || multilineElide || canWrap || horizontalFit)) {
|
||||
widthChanged = true;
|
||||
if (lineWidth != oldWidth && (singlelineElide || multilineElide || canWrap || horizontalFit))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// If the next needs to be elided and there's an abbreviated string available
|
||||
|
|
|
@ -1221,7 +1221,7 @@ void QQuickTrivialWindowManager::renderCanvas(QQuickCanvas *canvas)
|
|||
maybeUpdate(canvas);
|
||||
}
|
||||
|
||||
void QQuickTrivialWindowManager::exposureChanged(QQuickCanvas *canvas)
|
||||
void QQuickTrivialWindowManager::exposureChanged(QQuickCanvas *)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -709,6 +709,7 @@ void tst_qquickitem::changeParent()
|
|||
focusState[item].set(true, true);
|
||||
focusState.active(item);
|
||||
FVERIFY();
|
||||
delete child2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -636,7 +636,7 @@ void tst_qquickpositioners::moveTransitions(const QString &positionerObjectName)
|
|||
|
||||
QQuickView *canvas = QQuickViewTestUtil::createView();
|
||||
QQmlContext *ctxt = canvas->rootContext();
|
||||
ctxt->setContextProperty("enableAddTransition", false);
|
||||
ctxt->setContextProperty("enableAddTransition", QVariant(false));
|
||||
ctxt->setContextProperty("model_targetItems_transitionFrom", &model_targetItems_transitionFrom);
|
||||
ctxt->setContextProperty("model_displacedItems_transitionVia", &model_displacedItems_transitionVia);
|
||||
ctxt->setContextProperty("targetItems_transitionFrom", targetItems_transitionFrom);
|
||||
|
|
|
@ -2707,9 +2707,6 @@ void tst_qquickvisualdatamodel::resolve_data()
|
|||
const QUrl stringListSource[] = {
|
||||
testFileUrl("stringlistproperties.qml"),
|
||||
testFileUrl("stringlistproperties-package.qml") };
|
||||
const QUrl objectListSource[] = {
|
||||
testFileUrl("objectlistproperties.qml"),
|
||||
testFileUrl("objectlistproperties-package.qml") };
|
||||
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
// List Model.
|
||||
|
|
Loading…
Reference in New Issue