Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/designer/src/lib/shared/formwindowbase.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    7373#include <QtGui/QMenu>
    7474#include <QtGui/QAction>
     75
    7576
    7677QT_BEGIN_NAMESPACE
     
    182183        while (itIndex.hasNext()) {
    183184            const int index = itIndex.next().key();
    184             sheet->setProperty(index, sheet->property(index));
     185            const QVariant newValue = sheet->property(index);
     186            if (qobject_cast<QLabel *>(sheet->object()) && sheet->propertyName(index) == QLatin1String("text")) {
     187                const PropertySheetStringValue newString = qVariantValue<PropertySheetStringValue>(newValue);
     188                // optimize a bit, reset only if the text value might contain a reference to qt resources
     189                // (however reloading of icons other than taken from resources might not work here)
     190                if (newString.value().contains(QLatin1String(":/"))) {
     191                    const QVariant resetValue = qVariantFromValue(PropertySheetStringValue());
     192                    sheet->setProperty(index, resetValue);
     193                }
     194            }
     195            sheet->setProperty(index, newValue);
    185196        }
    186197        if (QTabWidget *tabWidget = qobject_cast<QTabWidget *>(sheet->object())) {
Note: See TracChangeset for help on using the changeset viewer.