Changeset 846 for trunk/tools/shared
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 deleted
- 59 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/tools/shared/deviceskin/deviceskin.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/deviceskin/deviceskin.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/deviceskin/deviceskin.pri
r561 r846 3 3 SOURCES += $$PWD/deviceskin.cpp 4 4 RESOURCES += $$PWD/skins/ClamshellPhone.qrc \ 5 $$PWD/skins/PDAPhone.qrc \6 5 $$PWD/skins/SmartPhone2.qrc \ 7 6 $$PWD/skins/SmartPhone.qrc \ 8 7 $$PWD/skins/SmartPhoneWithButtons.qrc \ 9 8 $$PWD/skins/TouchscreenPhone.qrc \ 10 $$PWD/skins/Trolltech-Keypad.qrc \11 $$PWD/skins/Trolltech-Touchscreen.qrc \12 9 $$PWD/skins/PortableMedia.qrc \ 13 10 $$PWD/skins/S60-QVGA-Candybar.qrc \ -
trunk/tools/shared/findwidget/abstractfindwidget.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/findwidget/abstractfindwidget.h
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/findwidget/itemviewfindwidget.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/findwidget/itemviewfindwidget.h
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/findwidget/texteditfindwidget.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/findwidget/texteditfindwidget.h
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/fontpanel/fontpanel.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 97 97 rc.setPointSize(pointSize()); 98 98 const QString styleDescription = styleString(); 99 rc.setItalic(m_fontDatabase.italic(family, styleDescription)); 100 99 if (styleDescription.contains(QLatin1String("Italic"))) 100 rc.setStyle(QFont::StyleItalic); 101 else if (styleDescription.contains(QLatin1String("Oblique"))) 102 rc.setStyle(QFont::StyleOblique); 103 else 104 rc.setStyle(QFont::StyleNormal); 101 105 rc.setBold(m_fontDatabase.bold(family, styleDescription)); 102 106 -
trunk/tools/shared/fontpanel/fontpanel.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtcolorbutton.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtcolorbutton.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtcolorline.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtcolorline.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientdialog.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientdialog.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientdialog.ui
r651 r846 2 2 <comment>********************************************************************* 3 3 ** 4 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).4 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 5 5 ** All rights reserved. 6 6 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradienteditor.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradienteditor.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradienteditor.ui
r651 r846 2 2 <comment>********************************************************************* 3 3 ** 4 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).4 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 5 5 ** All rights reserved. 6 6 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientmanager.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientmanager.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientstopscontroller.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientstopsmodel.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientstopswidget.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientutils.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientutils.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientview.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientview.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientviewdialog.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientviewdialog.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientviewdialog.ui
r651 r846 2 2 <comment>********************************************************************* 3 3 ** 4 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).4 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 5 5 ** All rights reserved. 6 6 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientwidget.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtgradienteditor/qtgradientwidget.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qteditorfactory.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qteditorfactory.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qtpropertybrowser.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 2400 2400 return QString(); 2401 2401 2402 QLocale loc = it.value();2402 const QLocale loc = it.value(); 2403 2403 2404 2404 int langIdx = 0; 2405 2405 int countryIdx = 0; 2406 metaEnumProvider()->localeToIndex(loc.language(), loc.country(), &langIdx, &countryIdx); 2407 QString str = tr("%1, %2") 2408 .arg(metaEnumProvider()->languageEnumNames().at(langIdx)) 2409 .arg(metaEnumProvider()->countryEnumNames(loc.language()).at(countryIdx)); 2410 return str; 2406 const QtMetaEnumProvider *me = metaEnumProvider(); 2407 me->localeToIndex(loc.language(), loc.country(), &langIdx, &countryIdx); 2408 if (langIdx < 0) { 2409 qWarning("QtLocalePropertyManager::valueText: Unknown language %d", loc.language()); 2410 return tr("<Invalid>"); 2411 } 2412 const QString languageName = me->languageEnumNames().at(langIdx); 2413 if (countryIdx < 0) { 2414 qWarning("QtLocalePropertyManager::valueText: Unknown country %d for %s", loc.country(), qPrintable(languageName)); 2415 return languageName; 2416 } 2417 const QString countryName = me->countryEnumNames(loc.language()).at(countryIdx); 2418 return tr("%1, %2").arg(languageName, countryName); 2411 2419 } 2412 2420 … … 2636 2644 return QString(); 2637 2645 const QPoint v = it.value(); 2638 return QString(tr("(%1, %2)").arg(QString::number(v.x()))2639 .arg(QString::number(v.y())));2646 return tr("(%1, %2)").arg(QString::number(v.x())) 2647 .arg(QString::number(v.y())); 2640 2648 } 2641 2649 … … 2877 2885 const QPointF v = it.value().val; 2878 2886 const int dec = it.value().decimals; 2879 return QString(tr("(%1, %2)").arg(QString::number(v.x(), 'f', dec))2880 .arg(QString::number(v.y(), 'f', dec)));2887 return tr("(%1, %2)").arg(QString::number(v.x(), 'f', dec)) 2888 .arg(QString::number(v.y(), 'f', dec)); 2881 2889 } 2882 2890 … … 3197 3205 return QString(); 3198 3206 const QSize v = it.value().val; 3199 return QString(tr("%1 x %2").arg(QString::number(v.width()))3200 .arg(QString::number(v.height())));3207 return tr("%1 x %2").arg(QString::number(v.width())) 3208 .arg(QString::number(v.height())); 3201 3209 } 3202 3210 … … 3562 3570 const QSizeF v = it.value().val; 3563 3571 const int dec = it.value().decimals; 3564 return QString(tr("%1 x %2").arg(QString::number(v.width(), 'f', dec))3565 .arg(QString::number(v.height(), 'f', dec)));3572 return tr("%1 x %2").arg(QString::number(v.width(), 'f', dec)) 3573 .arg(QString::number(v.height(), 'f', dec)); 3566 3574 } 3567 3575 … … 3955 3963 return QString(); 3956 3964 const QRect v = it.value().val; 3957 return QString(tr("[(%1, %2), %3 x %4]").arg(QString::number(v.x()))3958 .arg(QString::number(v.y()))3959 .arg(QString::number(v.width()))3960 .arg(QString::number(v.height())));3965 return tr("[(%1, %2), %3 x %4]").arg(QString::number(v.x())) 3966 .arg(QString::number(v.y())) 3967 .arg(QString::number(v.width())) 3968 .arg(QString::number(v.height())); 3961 3969 } 3962 3970 -
trunk/tools/shared/qtpropertybrowser/qtpropertymanager.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qttreepropertybrowser.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qtvariantproperty.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qtpropertybrowser/qtvariantproperty.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qttoolbardialog/qttoolbardialog.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/qttoolbardialog/qttoolbardialog.h
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/tools/shared/symbian/epocroot.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 40 40 ****************************************************************************/ 41 41 42 #include <iostream>43 44 42 #include <QtCore/qdir.h> 45 43 #include <QtCore/qxmlstream.h> 46 44 47 #include "epocroot.h" 48 #include "../windows/registry.h" 45 #include "epocroot_p.h" 46 #include "../windows/registry_p.h" 47 48 QT_BEGIN_NAMESPACE 49 49 50 50 // Registry key under which the location of the Symbian devices.xml file is … … 65 65 static QString epocRootValue; 66 66 67 #ifdef QT_BUILD_QMAKE 68 std::ostream &operator<<(std::ostream &s, const QString &val) { 69 s << val.toLocal8Bit().data(); 70 return s; 71 } 72 #else 73 // Operator implemented in configureapp.cpp 74 std::ostream &operator<<(std::ostream &s, const QString &val); 75 #endif 76 77 QString getDevicesXmlPath() 67 static QString getDevicesXmlPath() 78 68 { 79 69 // Note that the following call will return a null string on platforms other … … 81 71 // an alternative mechanism for retrieving the location of this file will 82 72 // be required. 83 return readRegistryKey(SYMBIAN_SDKS_REG_HANDLE, SYMBIAN_SDKS_REG_SUBKEY);73 return qt_readRegistryKey(SYMBIAN_SDKS_REG_HANDLE, QLatin1String(SYMBIAN_SDKS_REG_SUBKEY)); 84 74 } 85 75 … … 88 78 * If not, epocRootValue is set to an empty string and an error message is printed. 89 79 */ 90 void checkEpocRootExists(const QString &source)80 static void checkEpocRootExists(const QString &source) 91 81 { 92 82 if (!epocRootValue.isEmpty()) { 93 83 QDir dir(epocRootValue); 94 84 if (!dir.exists()) { 95 std::cerr << "Warning: " << source << " is set to an invalid path: " << epocRootValue << std::endl; 85 qWarning("Warning: %s is set to an invalid path: '%s'", qPrintable(source), 86 qPrintable(epocRootValue)); 96 87 epocRootValue = QString(); 97 88 } … … 104 95 static void fixEpocRoot(QString &path) 105 96 { 106 path.replace("\\", "/"); 107 108 if (path.size() > 1 && path[1] == QChar(':')) { 109 path = path.mid(2); 110 } 111 112 if (!path.size() || path[path.size()-1] != QChar('/')) { 113 path += QChar('/'); 97 path.replace(QLatin1Char('\\'), QLatin1Char('/')); 98 99 if (!path.size() || path[path.size()-1] != QLatin1Char('/')) { 100 path += QLatin1Char('/'); 114 101 } 115 102 } … … 118 105 * Determine the epoc root for the currently active SDK. 119 106 */ 120 QString epocRoot()107 QString qt_epocRoot() 121 108 { 122 109 if (epocRootValue.isEmpty()) { 123 110 // 1. If environment variable EPOCROOT is set and points to an existent 124 111 // directory, this is returned. 125 epocRootValue = qgetenv("EPOCROOT");126 checkEpocRootExists( "EPOCROOT");112 epocRootValue = QString::fromLocal8Bit(qgetenv("EPOCROOT").constData()); 113 checkEpocRootExists(QLatin1String("EPOCROOT environment variable")); 127 114 128 115 if (epocRootValue.isEmpty()) { … … 130 117 // file exists, it is parsed. 131 118 QString devicesXmlPath = getDevicesXmlPath(); 132 if (devicesXmlPath.isEmpty()) { 133 std::cerr << "Error: Symbian SDK registry key not found" << std::endl; 134 } else { 135 devicesXmlPath += "/devices.xml"; 119 if (!devicesXmlPath.isEmpty()) { 120 devicesXmlPath += QLatin1String("/devices.xml"); 136 121 QFile devicesFile(devicesXmlPath); 137 122 if (devicesFile.open(QIODevice::ReadOnly)) { … … 143 128 // epocroot value points to an existent directory, this is returned. 144 129 145 const QString epocDeviceValue = qgetenv("EPOCDEVICE");130 const QString epocDeviceValue = QString::fromLocal8Bit(qgetenv("EPOCDEVICE").constData()); 146 131 bool epocDeviceFound = false; 147 132 … … 149 134 while (!xml.atEnd()) { 150 135 xml.readNext(); 151 if (xml.isStartElement() && xml.name() == "devices") {152 if (xml.attributes().value( "version") == "1.0") {153 while (!(xml.isEndElement() && xml.name() == "devices") && !xml.atEnd()) {136 if (xml.isStartElement() && xml.name() == QLatin1String("devices")) { 137 if (xml.attributes().value(QLatin1String("version")) == QLatin1String("1.0")) { 138 while (!(xml.isEndElement() && xml.name() == QLatin1String("devices")) && !xml.atEnd()) { 154 139 xml.readNext(); 155 if (xml.isStartElement() && xml.name() == "device") { 156 const bool isDefault = xml.attributes().value("default") == "yes"; 157 const QString id = xml.attributes().value("id").toString(); 158 const QString name = xml.attributes().value("name").toString(); 159 const bool epocDeviceMatch = (id + ":" + name) == epocDeviceValue; 140 if (xml.isStartElement() && xml.name() == QLatin1String("device")) { 141 const bool isDefault = xml.attributes().value(QLatin1String("default")) == QLatin1String("yes"); 142 const QString id = xml.attributes().value(QLatin1String("id")).toString(); 143 const QString name = xml.attributes().value(QLatin1String("name")).toString(); 144 const QString alias = xml.attributes().value(QLatin1String("alias")).toString(); 145 bool epocDeviceMatch = QString(id + QLatin1String(":") + name) == epocDeviceValue; 146 if (!alias.isEmpty()) 147 epocDeviceMatch |= alias == epocDeviceValue; 160 148 epocDeviceFound |= epocDeviceMatch; 161 149 162 150 if((epocDeviceValue.isEmpty() && isDefault) || epocDeviceMatch) { 163 151 // Found a matching device 164 while (!(xml.isEndElement() && xml.name() == "device") && !xml.atEnd()) {152 while (!(xml.isEndElement() && xml.name() == QLatin1String("device")) && !xml.atEnd()) { 165 153 xml.readNext(); 166 if (xml.isStartElement() && xml.name() == "epocroot") {154 if (xml.isStartElement() && xml.name() == QLatin1String("epocroot")) { 167 155 epocRootValue = xml.readElementText(); 168 156 const QString deviceSource = epocDeviceValue.isEmpty() 169 ? "default device"170 : "EPOCDEVICE (" + epocDeviceValue + ")";157 ? QLatin1String("default device") 158 : QString(QLatin1String("EPOCDEVICE (") + epocDeviceValue + QLatin1String(")")); 171 159 checkEpocRootExists(deviceSource); 172 160 } … … 174 162 175 163 if (epocRootValue.isEmpty()) 176 xml.raiseError( "No epocroot element found");164 xml.raiseError(QLatin1String("No epocroot element found")); 177 165 } 178 166 } 179 167 } 180 168 } else { 181 xml.raiseError( "Invalid 'devices' element version");169 xml.raiseError(QLatin1String("Invalid 'devices' element version")); 182 170 } 183 171 } 184 172 } 185 173 if (xml.hasError()) { 186 std::cerr << "Error: \"" << xml.errorString() << "\" when parsing devices.xml" << std::endl; 174 qWarning("Warning: Error \"%s\" when parsing devices.xml", 175 qPrintable(xml.errorString())); 187 176 } else { 188 177 if (epocRootValue.isEmpty()) { 189 178 if (!epocDeviceValue.isEmpty()) { 190 179 if (epocDeviceFound) { 191 std::cerr << "Error: missing or invalid epocroot attribute "192 << "in device '" << epocDeviceValue << "'";180 qWarning("Warning: Missing or invalid epocroot attribute in device '%s' in devices.xml.", 181 qPrintable(epocDeviceValue)); 193 182 } else { 194 std::cerr << "Error: no device matching EPOCDEVICE ("195 << epocDeviceValue << ")";183 qWarning("Warning: No device matching EPOCDEVICE (%s) in devices.xml.", 184 qPrintable(epocDeviceValue)); 196 185 } 197 186 } else { 198 187 if (epocDeviceFound) { 199 std::cerr << "Error: missing or invalid epocroot attribute " 200 << "in default device"; 188 qWarning("Warning: Missing or invalid epocroot attribute in default device in devices.xml."); 201 189 } else { 202 std::cerr << "Error: no default device";190 qWarning("Warning: No default device set in devices.xml."); 203 191 } 204 192 } 205 std::cerr << " found in devices.xml file." << std::endl;206 193 } 207 194 } 208 195 } else { 209 std::cerr << "Error: could not open file " << devicesXmlPath << std::endl;196 qWarning("Warning: Could not open file: '%s'.", qPrintable(devicesXmlPath)); 210 197 } 211 198 } … … 214 201 if (epocRootValue.isEmpty()) { 215 202 // 5. An empty string is returned. 216 std::cerr << "Error: failed to find epoc root" << std::endl 217 << "Either" << std::endl 218 << " 1. Set EPOCROOT environment variable to a valid value" << std::endl 219 << " or 2. Ensure that the HKEY_LOCAL_MACHINE\\" SYMBIAN_SDKS_REG_SUBKEY 220 " registry key is set, and then" << std::endl 221 << " a. Set EPOCDEVICE environment variable to a valid device" << std::endl 222 << " or b. Specify a default device in the devices.xml file." << std::endl; 203 qWarning("Warning: failed to resolve epocroot." 204 #ifdef Q_OS_WIN32 205 "\nEither\n" 206 " 1. Set EPOCROOT environment variable to a valid value.\n" 207 " or 2. Ensure that the HKEY_LOCAL_MACHINE\\" SYMBIAN_SDKS_REG_SUBKEY 208 " registry key is set, and then\n" 209 " a. Set EPOCDEVICE environment variable to a valid device\n" 210 " or b. Specify a default device in the devices.xml file."); 211 #else 212 " Set EPOCROOT environment variable to a valid value."); 213 #endif 223 214 } else { 224 215 fixEpocRoot(epocRootValue); … … 229 220 } 230 221 222 QT_END_NAMESPACE -
trunk/tools/shared/windows/registry.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 41 41 42 42 #include <QtCore/qstringlist.h> 43 #include "registry .h"43 #include "registry_p.h" 44 44 45 QT_BEGIN_NAMESPACE 46 47 #ifdef Q_OS_WIN32 45 48 /*! 46 49 Returns the path part of a registry key. … … 74 77 75 78 QString res(rKey.mid(idx + 1)); 76 if (res == "Default" || res == ".")77 res = "";79 if (res == QLatin1String("Default") || res == QLatin1String(".")) 80 res = QString(); 78 81 return res; 79 82 } 83 #endif 80 84 81 QString readRegistryKey(HKEY parentHandle, const QString &rSubkey)85 QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey) 82 86 { 83 87 QString result; … … 129 133 l.append(s); 130 134 } 131 result = l.join( ", ");135 result = l.join(QLatin1String(", ")); 132 136 break; 133 137 } … … 149 153 150 154 default: 151 qWarning("QSettings: unknown data % d type in windows registry", dataType);155 qWarning("QSettings: unknown data %u type in windows registry", quint32(dataType)); 152 156 break; 153 157 } 154 158 155 159 RegCloseKey(handle); 160 #else 161 Q_UNUSED(parentHandle); 162 Q_UNUSED(rSubkey) 156 163 #endif 157 164 … … 159 166 } 160 167 168 QT_END_NAMESPACE 161 169
Note:
See TracChangeset
for help on using the changeset viewer.