Fix more krazy warnings.

This commit is contained in:
Friedemann Kleint
2011-04-19 15:42:14 +02:00
parent cca52b6d30
commit 774fa49412
66 changed files with 137 additions and 136 deletions

View File

@@ -165,10 +165,10 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
if (gfxObject) {
className = gfxObject->metaObject()->className();
className.replace(QRegExp("_QMLTYPE_\\d+"), "");
className.replace(QRegExp("_QML_\\d+"), "");
className.remove(QRegExp("_QMLTYPE_\\d+"));
className.remove(QRegExp("_QML_\\d+"));
if (className.startsWith(QLatin1String("QDeclarative")))
className = className.replace(QLatin1String("QDeclarative"), "");
className = className.remove(QLatin1String("QDeclarative"));
QDeclarativeItem *declarativeItem = qobject_cast<QDeclarativeItem*>(gfxObject);
if (declarativeItem) {
@@ -176,10 +176,10 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
}
if (!objectStringId.isEmpty()) {
constructedName = objectStringId + " (" + className + ")";
constructedName = objectStringId + " (" + className + QLatin1Char(')');
} else {
if (!gfxObject->objectName().isEmpty()) {
constructedName = gfxObject->objectName() + " (" + className + ")";
constructedName = gfxObject->objectName() + " (" + className + QLatin1Char(')');
} else {
constructedName = className;
}

View File

@@ -105,7 +105,7 @@ void LiveSelectionIndicator::setItems(const QList<QWeakPointer<QGraphicsObject>
// set selections to also all children if they are not editor items
foreach (QWeakPointer<QGraphicsObject> object, itemList) {
foreach (const QWeakPointer<QGraphicsObject> &object, itemList) {
if (object.isNull())
continue;

View File

@@ -382,7 +382,7 @@ void LiveSelectionTool::clear()
void LiveSelectionTool::selectedItemsChanged(const QList<QGraphicsItem*> &itemList)
{
foreach (QWeakPointer<QGraphicsObject> obj, m_selectedItemList) {
foreach (const QWeakPointer<QGraphicsObject> &obj, m_selectedItemList) {
if (!obj.isNull()) {
disconnect(obj.data(), SIGNAL(xChanged()), this, SLOT(repaintBoundingRects()));
disconnect(obj.data(), SIGNAL(yChanged()), this, SLOT(repaintBoundingRects()));