forked from qt-creator/qt-creator
Fix more krazy warnings.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user