diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-20 09:21:30 +0100 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-20 09:22:03 +0100 |
commit | 914530faf25767a9a5ae7b35423661c4438a356e (patch) | |
tree | cf39ce5f445c9503d55209e915343efd7716c0f8 | |
parent | f212e46fe930ee89a8cb52beeeccc03369c015a1 (diff) | |
parent | 8b725e3f41e244c9f3d65a701c7242369fd88e11 (diff) | |
download | qttools-914530faf25767a9a5ae7b35423661c4438a356e.tar.gz |
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle
Change-Id: I359d5bfaa62a4d37a2deec79f80963ae5c19d918
133 files changed, 185 insertions, 1997 deletions
diff --git a/src/assistant/clucene/qclucene_global_p.h b/src/assistant/clucene/qclucene_global_p.h index 738e9672d..6d8e8197c 100644 --- a/src/assistant/clucene/qclucene_global_p.h +++ b/src/assistant/clucene/qclucene_global_p.h @@ -44,8 +44,6 @@ # include <qt_windows.h> #endif -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE #ifdef QT_STATIC @@ -130,6 +128,4 @@ using namespace QtCLuceneHelpers; QT_END_NAMESPACE -QT_END_HEADER - #endif // QCLUCENE_GLOBAL_P_H diff --git a/src/assistant/help/qhelp_global.h b/src/assistant/help/qhelp_global.h index 409d49b9d..23adc25db 100644 --- a/src/assistant/help/qhelp_global.h +++ b/src/assistant/help/qhelp_global.h @@ -46,8 +46,6 @@ #include <QtCore/QString> #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE @@ -72,6 +70,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QHELP_GLOBAL_H diff --git a/src/assistant/help/qhelpcontentwidget.h b/src/assistant/help/qhelpcontentwidget.h index f10cb35f2..ba5c1789e 100644 --- a/src/assistant/help/qhelpcontentwidget.h +++ b/src/assistant/help/qhelpcontentwidget.h @@ -48,8 +48,6 @@ #include <QtCore/QString> #include <QtWidgets/QTreeView> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE @@ -139,7 +137,5 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif diff --git a/src/assistant/help/qhelpdatainterface_p.h b/src/assistant/help/qhelpdatainterface_p.h index 3b4e3ac84..ebb2bc172 100644 --- a/src/assistant/help/qhelpdatainterface_p.h +++ b/src/assistant/help/qhelpdatainterface_p.h @@ -58,8 +58,6 @@ #include <QtCore/QStringList> #include <QtCore/QSharedData> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QHELP_EXPORT QHelpDataContentItem @@ -150,6 +148,4 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // QHELPDATAINTERFACE_H diff --git a/src/assistant/help/qhelpengine.h b/src/assistant/help/qhelpengine.h index 45bdec090..1a7ffb539 100644 --- a/src/assistant/help/qhelpengine.h +++ b/src/assistant/help/qhelpengine.h @@ -44,8 +44,6 @@ #include <QtHelp/qhelpenginecore.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE @@ -80,6 +78,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif diff --git a/src/assistant/help/qhelpenginecore.h b/src/assistant/help/qhelpenginecore.h index e17ae880c..76a384fb2 100644 --- a/src/assistant/help/qhelpenginecore.h +++ b/src/assistant/help/qhelpenginecore.h @@ -49,8 +49,6 @@ #include <QtCore/QObject> #include <QtCore/QVariant> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE @@ -130,6 +128,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QHELPENGINECORE_H diff --git a/src/assistant/help/qhelpgenerator_p.h b/src/assistant/help/qhelpgenerator_p.h index 3c447e898..49de20c1a 100644 --- a/src/assistant/help/qhelpgenerator_p.h +++ b/src/assistant/help/qhelpgenerator_p.h @@ -58,8 +58,6 @@ #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QHelpGeneratorPrivate; @@ -113,6 +111,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif diff --git a/src/assistant/help/qhelpindexwidget.h b/src/assistant/help/qhelpindexwidget.h index f852f44ed..fb043c503 100644 --- a/src/assistant/help/qhelpindexwidget.h +++ b/src/assistant/help/qhelpindexwidget.h @@ -48,8 +48,6 @@ #include <QtCore/QStringListModel> #include <QtWidgets/QListView> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE @@ -108,6 +106,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif diff --git a/src/assistant/help/qhelpprojectdata_p.h b/src/assistant/help/qhelpprojectdata_p.h index 198bac8fc..97db84c9a 100644 --- a/src/assistant/help/qhelpprojectdata_p.h +++ b/src/assistant/help/qhelpprojectdata_p.h @@ -56,8 +56,6 @@ #include "qhelp_global.h" #include "qhelpdatainterface_p.h" -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QHelpProjectDataPrivate; @@ -84,6 +82,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif diff --git a/src/assistant/help/qhelpsearchengine.h b/src/assistant/help/qhelpsearchengine.h index 5312ff25a..697987151 100644 --- a/src/assistant/help/qhelpsearchengine.h +++ b/src/assistant/help/qhelpsearchengine.h @@ -50,8 +50,6 @@ #include <QtCore/QString> #include <QtCore/QStringList> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE @@ -119,6 +117,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QHELPSEARCHENGINE_H diff --git a/src/assistant/help/qhelpsearchquerywidget.h b/src/assistant/help/qhelpsearchquerywidget.h index b55961c23..f72e2ae39 100644 --- a/src/assistant/help/qhelpsearchquerywidget.h +++ b/src/assistant/help/qhelpsearchquerywidget.h @@ -51,8 +51,6 @@ #include <QtWidgets/QWidget> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE @@ -86,6 +84,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QHELPSEARCHQUERYWIDGET_H diff --git a/src/assistant/help/qhelpsearchresultwidget.h b/src/assistant/help/qhelpsearchresultwidget.h index a8af7f04d..13f8ac201 100644 --- a/src/assistant/help/qhelpsearchresultwidget.h +++ b/src/assistant/help/qhelpsearchresultwidget.h @@ -51,8 +51,6 @@ #include <QtWidgets/QWidget> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE @@ -79,6 +77,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QHELPSEARCHRESULTWIDGET_H diff --git a/src/designer/src/components/formeditor/formeditor.qrc b/src/designer/src/components/formeditor/formeditor.qrc index 492729040..38fbb6200 100644 --- a/src/designer/src/components/formeditor/formeditor.qrc +++ b/src/designer/src/components/formeditor/formeditor.qrc @@ -29,6 +29,7 @@ <file>images/downplus.png</file> <file>images/leveldown.png</file> <file>images/levelup.png</file> + <file>images/righttoleft.png</file> <file>images/mac/adjustsize.png</file> <file>images/mac/widgettool.png</file> <file>images/mac/signalslottool.png</file> diff --git a/src/designer/src/components/formeditor/images/righttoleft.png b/src/designer/src/components/formeditor/images/righttoleft.png Binary files differnew file mode 100644 index 000000000..26a69d5ba --- /dev/null +++ b/src/designer/src/components/formeditor/images/righttoleft.png diff --git a/src/designer/src/lib/components/qdesigner_components.h b/src/designer/src/lib/components/qdesigner_components.h index f27a49b37..e5c168292 100644 --- a/src/designer/src/lib/components/qdesigner_components.h +++ b/src/designer/src/lib/components/qdesigner_components.h @@ -45,8 +45,6 @@ #include <QtDesigner/qdesigner_components_global.h> #include <QtCore/qglobal.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QObject; @@ -77,6 +75,4 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // QDESIGNER_COMPONENTS_H diff --git a/src/designer/src/lib/components/qdesigner_components_global.h b/src/designer/src/lib/components/qdesigner_components_global.h index 1a7701fdb..98b289a85 100644 --- a/src/designer/src/lib/components/qdesigner_components_global.h +++ b/src/designer/src/lib/components/qdesigner_components_global.h @@ -44,8 +44,6 @@ #include <QtCore/qglobal.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE #define QDESIGNER_COMPONENTS_EXTERN Q_DECL_EXPORT @@ -61,6 +59,4 @@ QT_BEGIN_NAMESPACE QT_END_NAMESPACE -QT_END_HEADER - #endif // QDESIGNER_COMPONENTS_GLOBAL_H diff --git a/src/designer/src/lib/extension/default_extensionfactory.h b/src/designer/src/lib/extension/default_extensionfactory.h index 685444700..c9ae32397 100644 --- a/src/designer/src/lib/extension/default_extensionfactory.h +++ b/src/designer/src/lib/extension/default_extensionfactory.h @@ -49,8 +49,6 @@ #include <QtCore/QHash> #include <QtCore/QPair> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QExtensionManager; @@ -81,6 +79,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // DEFAULT_EXTENSIONFACTORY_H diff --git a/src/designer/src/lib/extension/extension.h b/src/designer/src/lib/extension/extension.h index 75fd12937..7f0685588 100644 --- a/src/designer/src/lib/extension/extension.h +++ b/src/designer/src/lib/extension/extension.h @@ -45,8 +45,6 @@ #include <QtCore/QString> #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE #define Q_TYPEID(IFace) QLatin1String(IFace##_iid) @@ -104,6 +102,4 @@ template <> inline IFace *qt_extension<IFace *>(QAbstractExtensionManager *manag QT_END_NAMESPACE -QT_END_HEADER - #endif // EXTENSION_H diff --git a/src/designer/src/lib/extension/extension_global.h b/src/designer/src/lib/extension/extension_global.h index f1c9adf8c..1ea217e5f 100644 --- a/src/designer/src/lib/extension/extension_global.h +++ b/src/designer/src/lib/extension/extension_global.h @@ -44,7 +44,6 @@ #include <QtCore/qglobal.h> -QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #define QDESIGNER_EXTENSION_EXTERN Q_DECL_EXPORT @@ -59,6 +58,5 @@ QT_BEGIN_NAMESPACE #endif QT_END_NAMESPACE -QT_END_HEADER #endif // EXTENSION_GLOBAL_H diff --git a/src/designer/src/lib/extension/qextensionmanager.h b/src/designer/src/lib/extension/qextensionmanager.h index aaf413fec..e220cee46 100644 --- a/src/designer/src/lib/extension/qextensionmanager.h +++ b/src/designer/src/lib/extension/qextensionmanager.h @@ -46,8 +46,6 @@ #include <QtDesigner/extension.h> #include <QtCore/QHash> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QObject; // Fool syncqt @@ -74,6 +72,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QEXTENSIONMANAGER_H diff --git a/src/designer/src/lib/sdk/abstractactioneditor.h b/src/designer/src/lib/sdk/abstractactioneditor.h index a1e124283..5ab553244 100644 --- a/src/designer/src/lib/sdk/abstractactioneditor.h +++ b/src/designer/src/lib/sdk/abstractactioneditor.h @@ -46,8 +46,6 @@ #include <QtWidgets/QWidget> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerFormEditorInterface; @@ -71,6 +69,4 @@ public Q_SLOTS: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTACTIONEDITOR_H diff --git a/src/designer/src/lib/sdk/abstractdialoggui_p.h b/src/designer/src/lib/sdk/abstractdialoggui_p.h index 9b533b3bf..635646456 100644 --- a/src/designer/src/lib/sdk/abstractdialoggui_p.h +++ b/src/designer/src/lib/sdk/abstractdialoggui_p.h @@ -57,8 +57,6 @@ #include <QtWidgets/QMessageBox> #include <QtWidgets/QFileDialog> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QWidget; @@ -102,6 +100,4 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTDIALOGGUI_H diff --git a/src/designer/src/lib/sdk/abstractdnditem.h b/src/designer/src/lib/sdk/abstractdnditem.h index d43f13a1c..342f58468 100644 --- a/src/designer/src/lib/sdk/abstractdnditem.h +++ b/src/designer/src/lib/sdk/abstractdnditem.h @@ -44,8 +44,6 @@ #include <QtDesigner/sdk_global.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class DomUI; @@ -70,6 +68,4 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTDNDITEM_H diff --git a/src/designer/src/lib/sdk/abstractformeditor.h b/src/designer/src/lib/sdk/abstractformeditor.h index 1ced0611f..1e7ae1d5b 100644 --- a/src/designer/src/lib/sdk/abstractformeditor.h +++ b/src/designer/src/lib/sdk/abstractformeditor.h @@ -47,8 +47,6 @@ #include <QtCore/QObject> #include <QtCore/QPointer> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerWidgetBoxInterface; @@ -141,6 +139,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTFORMEDITOR_H diff --git a/src/designer/src/lib/sdk/abstractformeditorplugin.h b/src/designer/src/lib/sdk/abstractformeditorplugin.h index 57dbba0c2..54d007162 100644 --- a/src/designer/src/lib/sdk/abstractformeditorplugin.h +++ b/src/designer/src/lib/sdk/abstractformeditorplugin.h @@ -46,8 +46,6 @@ #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerFormEditorInterface; @@ -68,6 +66,4 @@ Q_DECLARE_INTERFACE(QDesignerFormEditorPluginInterface, "org.qt-project.Qt.Desig QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTFORMEDITORPLUGIN_H diff --git a/src/designer/src/lib/sdk/abstractformwindow.h b/src/designer/src/lib/sdk/abstractformwindow.h index d7667d5fc..b38d2ca41 100644 --- a/src/designer/src/lib/sdk/abstractformwindow.h +++ b/src/designer/src/lib/sdk/abstractformwindow.h @@ -46,8 +46,6 @@ #include <QtWidgets/QWidget> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerFormEditorInterface; @@ -196,6 +194,4 @@ Q_SIGNALS: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTFORMWINDOW_H diff --git a/src/designer/src/lib/sdk/abstractformwindowcursor.h b/src/designer/src/lib/sdk/abstractformwindowcursor.h index a03149c35..707f65751 100644 --- a/src/designer/src/lib/sdk/abstractformwindowcursor.h +++ b/src/designer/src/lib/sdk/abstractformwindowcursor.h @@ -44,8 +44,6 @@ #include <QtDesigner/sdk_global.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerFormWindowInterface; @@ -104,6 +102,4 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTFORMWINDOWCURSOR_H diff --git a/src/designer/src/lib/sdk/abstractformwindowmanager.h b/src/designer/src/lib/sdk/abstractformwindowmanager.h index 9f16ded6f..e70ebdd54 100644 --- a/src/designer/src/lib/sdk/abstractformwindowmanager.h +++ b/src/designer/src/lib/sdk/abstractformwindowmanager.h @@ -48,8 +48,6 @@ #include <QtCore/QObject> #include <QtCore/QScopedPointer> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerFormEditorInterface; @@ -157,6 +155,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTFORMWINDOWMANAGER_H diff --git a/src/designer/src/lib/sdk/abstractformwindowtool.h b/src/designer/src/lib/sdk/abstractformwindowtool.h index 74e1f7afb..28ed11d16 100644 --- a/src/designer/src/lib/sdk/abstractformwindowtool.h +++ b/src/designer/src/lib/sdk/abstractformwindowtool.h @@ -46,8 +46,6 @@ #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerFormEditorInterface; @@ -80,6 +78,4 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTFORMWINDOWTOOL_H diff --git a/src/designer/src/lib/sdk/abstractintegration.h b/src/designer/src/lib/sdk/abstractintegration.h index e15f0df15..d28f61f32 100644 --- a/src/designer/src/lib/sdk/abstractintegration.h +++ b/src/designer/src/lib/sdk/abstractintegration.h @@ -49,8 +49,6 @@ #include <QtCore/QStringList> #include <QtCore/QFlags> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerFormWindowInterface; @@ -189,6 +187,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTINTEGRATION_H diff --git a/src/designer/src/lib/sdk/abstractintrospection_p.h b/src/designer/src/lib/sdk/abstractintrospection_p.h index 12dbdc461..327e40d73 100644 --- a/src/designer/src/lib/sdk/abstractintrospection_p.h +++ b/src/designer/src/lib/sdk/abstractintrospection_p.h @@ -57,8 +57,6 @@ #include <QtCore/QVariant> #include <QtCore/QFlags> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDESIGNER_SDK_EXPORT QDesignerMetaEnumInterface @@ -169,6 +167,4 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTMETAOBJECT_H diff --git a/src/designer/src/lib/sdk/abstractlanguage.h b/src/designer/src/lib/sdk/abstractlanguage.h index 1d20b8c89..11c56c3d1 100644 --- a/src/designer/src/lib/sdk/abstractlanguage.h +++ b/src/designer/src/lib/sdk/abstractlanguage.h @@ -55,8 +55,6 @@ #include <QtDesigner/extension.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDialog; @@ -103,6 +101,4 @@ Q_DECLARE_EXTENSION_INTERFACE(QDesignerLanguageExtension, "org.qt-project.Qt.Des QT_END_NAMESPACE -QT_END_HEADER - #endif // QDESIGNER_ABTRACT_LANGUAGE_H diff --git a/src/designer/src/lib/sdk/abstractmetadatabase.h b/src/designer/src/lib/sdk/abstractmetadatabase.h index bd97bde93..80aae6bf3 100644 --- a/src/designer/src/lib/sdk/abstractmetadatabase.h +++ b/src/designer/src/lib/sdk/abstractmetadatabase.h @@ -48,8 +48,6 @@ #include <QtCore/QList> #include <QtCore/QHash> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QCursor; @@ -94,6 +92,4 @@ Q_SIGNALS: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTMETADATABASE_H diff --git a/src/designer/src/lib/sdk/abstractnewformwidget.h b/src/designer/src/lib/sdk/abstractnewformwidget.h index c40f99696..b1295851b 100644 --- a/src/designer/src/lib/sdk/abstractnewformwidget.h +++ b/src/designer/src/lib/sdk/abstractnewformwidget.h @@ -46,8 +46,6 @@ #include <QtWidgets/QWidget> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerFormEditorInterface; @@ -72,6 +70,4 @@ Q_SIGNALS: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTNEWFORMWIDGET_H diff --git a/src/designer/src/lib/sdk/abstractobjectinspector.h b/src/designer/src/lib/sdk/abstractobjectinspector.h index 4462c5834..d461c6116 100644 --- a/src/designer/src/lib/sdk/abstractobjectinspector.h +++ b/src/designer/src/lib/sdk/abstractobjectinspector.h @@ -46,8 +46,6 @@ #include <QtWidgets/QWidget> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerFormEditorInterface; @@ -68,6 +66,4 @@ public Q_SLOTS: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTOBJECTINSPECTOR_H diff --git a/src/designer/src/lib/sdk/abstractoptionspage.h b/src/designer/src/lib/sdk/abstractoptionspage.h index e98e5b012..2e3aecea6 100644 --- a/src/designer/src/lib/sdk/abstractoptionspage.h +++ b/src/designer/src/lib/sdk/abstractoptionspage.h @@ -44,8 +44,6 @@ #include <QtDesigner/sdk_global.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QString; @@ -63,6 +61,4 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTOPTIONSPAGE_P_H diff --git a/src/designer/src/lib/sdk/abstractpromotioninterface.h b/src/designer/src/lib/sdk/abstractpromotioninterface.h index 3d1eb716a..dd8510071 100644 --- a/src/designer/src/lib/sdk/abstractpromotioninterface.h +++ b/src/designer/src/lib/sdk/abstractpromotioninterface.h @@ -48,8 +48,6 @@ #include <QtCore/QList> #include <QtCore/QSet> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerWidgetDataBaseItemInterface; @@ -86,6 +84,4 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTPROMOTIONINTERFACE_H diff --git a/src/designer/src/lib/sdk/abstractpropertyeditor.h b/src/designer/src/lib/sdk/abstractpropertyeditor.h index 87dc43a45..39a6ad2b3 100644 --- a/src/designer/src/lib/sdk/abstractpropertyeditor.h +++ b/src/designer/src/lib/sdk/abstractpropertyeditor.h @@ -46,8 +46,6 @@ #include <QtWidgets/QWidget> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerFormEditorInterface; @@ -79,6 +77,4 @@ public Q_SLOTS: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTPROPERTYEDITOR_H diff --git a/src/designer/src/lib/sdk/abstractresourcebrowser.h b/src/designer/src/lib/sdk/abstractresourcebrowser.h index 317781828..d369a8cbd 100644 --- a/src/designer/src/lib/sdk/abstractresourcebrowser.h +++ b/src/designer/src/lib/sdk/abstractresourcebrowser.h @@ -46,8 +46,6 @@ #include <QtWidgets/QWidget> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QWidget; // FIXME: fool syncqt @@ -69,7 +67,5 @@ Q_SIGNALS: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTFORMEDITOR_H diff --git a/src/designer/src/lib/sdk/abstractsettings.h b/src/designer/src/lib/sdk/abstractsettings.h index deb0f0763..8aa787861 100644 --- a/src/designer/src/lib/sdk/abstractsettings.h +++ b/src/designer/src/lib/sdk/abstractsettings.h @@ -46,8 +46,6 @@ #include <QtCore/QVariant> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QString; @@ -68,6 +66,4 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTSETTINGS_P_H diff --git a/src/designer/src/lib/sdk/abstractwidgetbox.h b/src/designer/src/lib/sdk/abstractwidgetbox.h index 6f37129fe..15396fc17 100644 --- a/src/designer/src/lib/sdk/abstractwidgetbox.h +++ b/src/designer/src/lib/sdk/abstractwidgetbox.h @@ -49,8 +49,6 @@ #include <QtWidgets/QWidget> #include <QtGui/QIcon> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class DomUI; @@ -141,6 +139,4 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QDesignerWidgetBoxInterface::Widget)) -QT_END_HEADER - #endif // ABSTRACTWIDGETBOX_H diff --git a/src/designer/src/lib/sdk/abstractwidgetdatabase.h b/src/designer/src/lib/sdk/abstractwidgetdatabase.h index 44e9e7bea..b993ef49a 100644 --- a/src/designer/src/lib/sdk/abstractwidgetdatabase.h +++ b/src/designer/src/lib/sdk/abstractwidgetdatabase.h @@ -47,8 +47,6 @@ #include <QtCore/QObject> #include <QtCore/QList> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QIcon; @@ -132,6 +130,4 @@ protected: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTWIDGETDATABASE_H diff --git a/src/designer/src/lib/sdk/abstractwidgetfactory.h b/src/designer/src/lib/sdk/abstractwidgetfactory.h index 24084ac6c..eb76da598 100644 --- a/src/designer/src/lib/sdk/abstractwidgetfactory.h +++ b/src/designer/src/lib/sdk/abstractwidgetfactory.h @@ -45,8 +45,6 @@ #include <QtDesigner/sdk_global.h> #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QDesignerFormEditorInterface; @@ -74,6 +72,4 @@ public: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTWIDGETFACTORY_H diff --git a/src/designer/src/lib/sdk/dynamicpropertysheet.h b/src/designer/src/lib/sdk/dynamicpropertysheet.h index 9904bc12e..9bf431ef2 100644 --- a/src/designer/src/lib/sdk/dynamicpropertysheet.h +++ b/src/designer/src/lib/sdk/dynamicpropertysheet.h @@ -55,8 +55,6 @@ #include <QtDesigner/extension.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QString; // FIXME: fool syncqt @@ -76,6 +74,4 @@ Q_DECLARE_EXTENSION_INTERFACE(QDesignerDynamicPropertySheetExtension, "org.qt-pr QT_END_NAMESPACE -QT_END_HEADER - #endif // DYNAMICPROPERTYSHEET_H diff --git a/src/designer/src/lib/sdk/extrainfo.h b/src/designer/src/lib/sdk/extrainfo.h index 34be80b3a..96930dffd 100644 --- a/src/designer/src/lib/sdk/extrainfo.h +++ b/src/designer/src/lib/sdk/extrainfo.h @@ -45,8 +45,6 @@ #include <QtDesigner/sdk_global.h> #include <QtDesigner/extension.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class DomWidget; @@ -79,6 +77,4 @@ Q_DECLARE_EXTENSION_INTERFACE(QDesignerExtraInfoExtension, "org.qt-project.Qt.De QT_END_NAMESPACE -QT_END_HEADER - #endif // EXTRAINFO_H diff --git a/src/designer/src/lib/sdk/layoutdecoration.h b/src/designer/src/lib/sdk/layoutdecoration.h index 2965cf765..91d08964b 100644 --- a/src/designer/src/lib/sdk/layoutdecoration.h +++ b/src/designer/src/lib/sdk/layoutdecoration.h @@ -47,8 +47,6 @@ #include <QtCore/QObject> #include <QtCore/QPair> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QPoint; @@ -94,6 +92,4 @@ Q_DECLARE_EXTENSION_INTERFACE(QDesignerLayoutDecorationExtension, "org.qt-projec QT_END_NAMESPACE -QT_END_HEADER - #endif // LAYOUTDECORATION_H diff --git a/src/designer/src/lib/sdk/membersheet.h b/src/designer/src/lib/sdk/membersheet.h index a2d87c324..4b33a11cf 100644 --- a/src/designer/src/lib/sdk/membersheet.h +++ b/src/designer/src/lib/sdk/membersheet.h @@ -47,8 +47,6 @@ #include <QtCore/QList> #include <QtCore/QByteArray> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QString; // FIXME: fool syncqt @@ -84,6 +82,4 @@ Q_DECLARE_EXTENSION_INTERFACE(QDesignerMemberSheetExtension, "org.qt-project.Qt. QT_END_NAMESPACE -QT_END_HEADER - #endif // MEMBERSHEET_H diff --git a/src/designer/src/lib/sdk/propertysheet.h b/src/designer/src/lib/sdk/propertysheet.h index c29102389..ca1dfd4eb 100644 --- a/src/designer/src/lib/sdk/propertysheet.h +++ b/src/designer/src/lib/sdk/propertysheet.h @@ -44,8 +44,6 @@ #include <QtDesigner/extension.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QVariant; @@ -88,6 +86,4 @@ Q_DECLARE_EXTENSION_INTERFACE(QDesignerPropertySheetExtension, QT_END_NAMESPACE -QT_END_HEADER - #endif // PROPERTYSHEET_H diff --git a/src/designer/src/lib/sdk/sdk_global.h b/src/designer/src/lib/sdk/sdk_global.h index 8eb0d0a31..3621b660e 100644 --- a/src/designer/src/lib/sdk/sdk_global.h +++ b/src/designer/src/lib/sdk/sdk_global.h @@ -44,7 +44,6 @@ #include <QtCore/qglobal.h> -QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #define QDESIGNER_SDK_EXTERN Q_DECL_EXPORT @@ -59,6 +58,5 @@ QT_BEGIN_NAMESPACE #endif QT_END_NAMESPACE -QT_END_HEADER #endif // SDK_GLOBAL_H diff --git a/src/designer/src/lib/sdk/taskmenu.h b/src/designer/src/lib/sdk/taskmenu.h index a483b0880..7948d7181 100644 --- a/src/designer/src/lib/sdk/taskmenu.h +++ b/src/designer/src/lib/sdk/taskmenu.h @@ -44,8 +44,6 @@ #include <QtDesigner/extension.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QAction; @@ -67,6 +65,4 @@ inline QAction *QDesignerTaskMenuExtension::preferredEditAction() const QT_END_NAMESPACE -QT_END_HEADER - #endif // TASKMENU_H diff --git a/src/designer/src/lib/shared/formwindowbase.cpp b/src/designer/src/lib/shared/formwindowbase.cpp index b86f40b93..4feda3f1e 100644 --- a/src/designer/src/lib/shared/formwindowbase.cpp +++ b/src/designer/src/lib/shared/formwindowbase.cpp @@ -495,7 +495,7 @@ QStringList FormWindowBase::checkContents() const QStringList problems; foreach (const Spacer *spacer, mainContainer()->findChildren<Spacer *>()) { if (spacer->parentWidget() && !spacer->parentWidget()->layout()) { - problems.push_back(tr("<p>This file contains top level spacers.<br>" + problems.push_back(tr("<p>This file contains top level spacers.<br/>" "They will <b>not</b> be saved.</p><p>" "Perhaps you forgot to create a layout?</p>")); break; diff --git a/src/designer/src/lib/shared/layout.cpp b/src/designer/src/lib/shared/layout.cpp index a5ec912cc..9f1ae8273 100644 --- a/src/designer/src/lib/shared/layout.cpp +++ b/src/designer/src/lib/shared/layout.cpp @@ -1099,21 +1099,11 @@ bool Grid::locateWidget(QWidget *w, int &row, int &col, int &rowspan, int &colsp // QGridLayout/QFormLayout Helpers: get item position/add item (overloads to make templates work) -void getGridItemPosition(QGridLayout *gridLayout, int index, int *row, int *column, int *rowspan, int *colspan) -{ - gridLayout->getItemPosition(index, row, column, rowspan, colspan); -} - void addWidgetToGrid(QGridLayout *lt, QWidget * widget, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment) { lt->addWidget(widget, row, column, rowSpan, columnSpan, alignment); } -inline void getGridItemPosition(QFormLayout *formLayout, int index, int *row, int *column, int *rowspan, int *colspan) -{ - getFormLayoutItemPosition(formLayout, index, row, column, rowspan, colspan); -} - inline void addWidgetToGrid(QFormLayout *lt, QWidget * widget, int row, int column, int, int columnSpan, Qt::Alignment) { formLayoutAddWidget(lt, widget, QRect(column, row, columnSpan, 1), false); @@ -1130,9 +1120,6 @@ public: virtual void sort() { setWidgets(buildGrid(widgets())); } protected: - QWidget *widgetAt(GridLikeLayout *layout, int row, int column) const; - -protected: QWidgetList buildGrid(const QWidgetList &); Grid m_grid; }; @@ -1145,22 +1132,6 @@ GridLayout<GridLikeLayout, LayoutType, GridMode>::GridLayout(const QWidgetList & } template <class GridLikeLayout, int LayoutType, int GridMode> -QWidget *GridLayout<GridLikeLayout, LayoutType, GridMode>::widgetAt(GridLikeLayout *layout, int row, int column) const -{ - int index = 0; - while (QLayoutItem *item = layout->itemAt(index)) { - if (item->widget()) { - int r, c, rowspan, colspan; - getGridItemPosition(layout, index, &r, &c, &rowspan, &colspan); - if (row == r && column == c) - return item->widget(); - } - ++index; - } - return 0; -} - -template <class GridLikeLayout, int LayoutType, int GridMode> void GridLayout<GridLikeLayout, LayoutType, GridMode>::doLayout() { bool needMove, needReparent; @@ -1207,7 +1178,7 @@ void removeIntVecDuplicates(QVector<int> &v) return; for (QVector<int>::iterator current = v.begin() ; (current != v.end()) && ((current+1) != v.end()) ; ) - if ( (*current == *(current+1)) ) + if ( *current == *(current+1) ) v.erase(current+1); else ++current; diff --git a/src/designer/src/lib/shared/qdesigner_propertyeditor.cpp b/src/designer/src/lib/shared/qdesigner_propertyeditor.cpp index d8a7a7c6c..406037993 100644 --- a/src/designer/src/lib/shared/qdesigner_propertyeditor.cpp +++ b/src/designer/src/lib/shared/qdesigner_propertyeditor.cpp @@ -43,6 +43,9 @@ #include "pluginmanager_p.h" #include <QtDesigner/QDesignerFormEditorInterface> +#include <QtDesigner/QDesignerDynamicPropertySheetExtension> +#include <QtDesigner/QDesignerPropertySheetExtension> +#include <QtDesigner/QExtensionManager> #include <widgetfactory_p.h> #include <QtWidgets/QAction> #include <QtWidgets/QLineEdit> @@ -99,6 +102,20 @@ QDesignerPropertyEditor::QDesignerPropertyEditor(QWidget *parent, Qt::WindowFlag connect(this, SIGNAL(propertyChanged(QString,QVariant)), this, SLOT(slotPropertyChanged(QString,QVariant))); } +static inline bool isDynamicProperty(QDesignerFormEditorInterface *core, QObject *object, + const QString &propertyName) +{ + if (const QDesignerDynamicPropertySheetExtension *dynamicSheet = qt_extension<QDesignerDynamicPropertySheetExtension*>(core->extensionManager(), object)) { + if (dynamicSheet->dynamicPropertiesAllowed()) { + if (QDesignerPropertySheetExtension *propertySheet = qt_extension<QDesignerPropertySheetExtension*>(core->extensionManager(), object)) { + const int index = propertySheet->indexOf(propertyName); + return index >= 0 && dynamicSheet->isDynamicProperty(index); + } + } + } + return false; +} + QDesignerPropertyEditor::StringPropertyParameters QDesignerPropertyEditor::textPropertyValidationMode( QDesignerFormEditorInterface *core, const QObject *object, const QString &propertyName, bool isMainContainer) @@ -118,6 +135,9 @@ QDesignerPropertyEditor::StringPropertyParameters QDesignerPropertyEditor::textP return customType; } + if (isDynamicProperty(core, const_cast<QObject *>(object), propertyName)) + return StringPropertyParameters(ValidationMultiLine, true); + // Check hardcoded property ames const PropertyNameTypeMap::const_iterator hit = stringPropertyTypes().constFind(propertyName); if (hit != stringPropertyTypes().constEnd()) diff --git a/src/designer/src/lib/shared/qlayout_widget.cpp b/src/designer/src/lib/shared/qlayout_widget.cpp index 48118d74c..23c6885ee 100644 --- a/src/designer/src/lib/shared/qlayout_widget.cpp +++ b/src/designer/src/lib/shared/qlayout_widget.cpp @@ -57,6 +57,7 @@ #include <QtWidgets/QVBoxLayout> #include <QtWidgets/QGridLayout> #include <QtWidgets/QFormLayout> +#include <QtWidgets/QApplication> #include <QtGui/qevent.h> #include <QtCore/qdebug.h> @@ -1388,7 +1389,9 @@ void QLayoutSupport::adjustIndicator(const QPoint &pos, int index) const bool closeToLeft = fromLeftRight == fromLeft; showIndicator(RightIndicator, QRect(closeToLeft ? g.x() : g.right() + 1 - indicatorSize, 0, indicatorSize, r.height()), bluePalette); - const int incr = closeToLeft ? 0 : +1; + const QWidget *parent = layout()->parentWidget(); + const bool leftToRight = Qt::LeftToRight == (parent ? parent->layoutDirection() : QApplication::layoutDirection()); + const int incr = leftToRight == closeToLeft ? 0 : +1; setCurrentCellFromIndicator(indicatorOrientation, m_currentIndex, incr); } break; diff --git a/src/designer/src/lib/shared/richtexteditor.cpp b/src/designer/src/lib/shared/richtexteditor.cpp index 0da3a1010..92cf34048 100644 --- a/src/designer/src/lib/shared/richtexteditor.cpp +++ b/src/designer/src/lib/shared/richtexteditor.cpp @@ -394,6 +394,7 @@ private slots: void setVAlignSub(bool sub); void insertLink(); void insertImage(); + void layoutDirectionChanged(); private: QAction *m_bold_action; @@ -405,6 +406,7 @@ private: QAction *m_align_center_action; QAction *m_align_right_action; QAction *m_align_justify_action; + QAction *m_layoutDirectionAction; QAction *m_link_action; QAction *m_image_action; QAction *m_simplify_richtext_action; @@ -500,6 +502,11 @@ RichTextEditorToolBar::RichTextEditorToolBar(QDesignerFormEditorInterface *core, tr("Justify"), editor, 0, alignment_group); addAction(m_align_justify_action); + m_layoutDirectionAction = createCheckableAction( + createIconSet(QStringLiteral("righttoleft.png")), + tr("Right to Left"), this, SLOT(layoutDirectionChanged())); + addAction(m_layoutDirectionAction); + addSeparator(); // Superscript and subscript buttons @@ -626,6 +633,20 @@ void RichTextEditorToolBar::insertImage() m_editor->insertHtml(QStringLiteral("<img src=\"") + path + QStringLiteral("\"/>")); } +void RichTextEditorToolBar::layoutDirectionChanged() +{ + QTextCursor cursor = m_editor->textCursor(); + QTextBlock block = cursor.block(); + if (block.isValid()) { + QTextBlockFormat format = block.blockFormat(); + const Qt::LayoutDirection newDirection = m_layoutDirectionAction->isChecked() ? Qt::RightToLeft : Qt::LeftToRight; + if (format.layoutDirection() != newDirection) { + format.setLayoutDirection(newDirection); + cursor.setBlockFormat(format); + } + } +} + void RichTextEditorToolBar::updateActions() { if (m_editor == 0) { @@ -651,6 +672,7 @@ void RichTextEditorToolBar::updateActions() } else { m_align_justify_action->setChecked(true); } + m_layoutDirectionAction->setChecked(cursor.blockFormat().layoutDirection() == Qt::RightToLeft); m_bold_action->setChecked(font.bold()); m_italic_action->setChecked(font.italic()); diff --git a/src/designer/src/lib/shared/widgetfactory.cpp b/src/designer/src/lib/shared/widgetfactory.cpp index 28f488642..1cadf1b68 100644 --- a/src/designer/src/lib/shared/widgetfactory.cpp +++ b/src/designer/src/lib/shared/widgetfactory.cpp @@ -594,16 +594,6 @@ void WidgetFactory::initializeCommon(QWidget *widget) const // Apply style if (m_currentStyle) widget->setStyle(m_currentStyle); - // Prevent the wizard from emulating the Windows Vista Theme. - // This theme (in both Aero and Basic mode) is tricky to - // emulate properly in designer due to 1) the manipulation of the non-client area of - // the top-level window, and 2) the upper-right location of the Back button. - // The wizard falls back to QWizard::ModernStyle whenever the Vista theme - // would normally apply. - if (QWizard *wizard = qobject_cast<QWizard *>(widget)) { - wizard->setProperty("_q_wizard_vista_off", QVariant(true)); - return; - } } // Necessary initializations for preview objects diff --git a/src/designer/src/lib/uilib/abstractformbuilder.h b/src/designer/src/lib/uilib/abstractformbuilder.h index c0b7bf16d..332291bbd 100644 --- a/src/designer/src/lib/uilib/abstractformbuilder.h +++ b/src/designer/src/lib/uilib/abstractformbuilder.h @@ -52,8 +52,6 @@ #include <QtWidgets/QSizePolicy> #include <QtGui/QPalette> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE #if 0 // pragma for syncqt, don't remove. @@ -268,6 +266,4 @@ protected: QT_END_NAMESPACE -QT_END_HEADER - #endif // ABSTRACTFORMBUILDER_H diff --git a/src/designer/src/lib/uilib/container.h b/src/designer/src/lib/uilib/container.h index 2da07c77a..f4ed62d77 100644 --- a/src/designer/src/lib/uilib/container.h +++ b/src/designer/src/lib/uilib/container.h @@ -45,8 +45,6 @@ #include <QtDesigner/extension.h> #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QWidget; @@ -77,6 +75,4 @@ Q_DECLARE_EXTENSION_INTERFACE(QDesignerContainerExtension, "org.qt-project.Qt.De QT_END_NAMESPACE -QT_END_HEADER - #endif // CONTAINER_H diff --git a/src/designer/src/lib/uilib/customwidget.h b/src/designer/src/lib/uilib/customwidget.h index 75e15ad0b..d051866f0 100644 --- a/src/designer/src/lib/uilib/customwidget.h +++ b/src/designer/src/lib/uilib/customwidget.h @@ -47,8 +47,6 @@ #include <QtCore/QString> #include <QtGui/QIcon> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QWidget; @@ -100,6 +98,4 @@ Q_DECLARE_INTERFACE(QDesignerCustomWidgetCollectionInterface, QDesignerCustomWid QT_END_NAMESPACE -QT_END_HEADER - #endif // CUSTOMWIDGET_H diff --git a/src/designer/src/lib/uilib/extension.h b/src/designer/src/lib/uilib/extension.h index 75fd12937..7f0685588 100644 --- a/src/designer/src/lib/uilib/extension.h +++ b/src/designer/src/lib/uilib/extension.h @@ -45,8 +45,6 @@ #include <QtCore/QString> #include <QtCore/QObject> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE #define Q_TYPEID(IFace) QLatin1String(IFace##_iid) @@ -104,6 +102,4 @@ template <> inline IFace *qt_extension<IFace *>(QAbstractExtensionManager *manag QT_END_NAMESPACE -QT_END_HEADER - #endif // EXTENSION_H diff --git a/src/designer/src/lib/uilib/formbuilder.h b/src/designer/src/lib/uilib/formbuilder.h index bbbb0919a..91d34275f 100644 --- a/src/designer/src/lib/uilib/formbuilder.h +++ b/src/designer/src/lib/uilib/formbuilder.h @@ -45,8 +45,6 @@ #include "uilib_global.h" #include "abstractformbuilder.h" -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE #if 0 // pragma for syncqt, don't remove. @@ -105,6 +103,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // FORMBUILDER_H diff --git a/src/designer/src/lib/uilib/qdesignerexportwidget.h b/src/designer/src/lib/uilib/qdesignerexportwidget.h index f5f62571c..74ffe27fe 100644 --- a/src/designer/src/lib/uilib/qdesignerexportwidget.h +++ b/src/designer/src/lib/uilib/qdesignerexportwidget.h @@ -44,8 +44,6 @@ #include <QtCore/QtGlobal> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE #if 0 @@ -61,6 +59,4 @@ QT_BEGIN_NAMESPACE QT_END_NAMESPACE -QT_END_HEADER - #endif //QDESIGNEREXPORTWIDGET_H diff --git a/src/designer/src/lib/uilib/uilib_global.h b/src/designer/src/lib/uilib/uilib_global.h index 873c540ce..f8624cb73 100644 --- a/src/designer/src/lib/uilib/uilib_global.h +++ b/src/designer/src/lib/uilib/uilib_global.h @@ -44,7 +44,6 @@ #include <QtCore/qglobal.h> -QT_BEGIN_HEADER QT_BEGIN_NAMESPACE #define QDESIGNER_UILIB_EXTERN Q_DECL_EXPORT @@ -59,6 +58,5 @@ QT_BEGIN_NAMESPACE #endif QT_END_NAMESPACE -QT_END_HEADER #endif // UILIB_GLOBAL_H diff --git a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp index 39a5c5614..2917f586b 100644 --- a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp +++ b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp @@ -48,6 +48,7 @@ #include <QtDesigner/QDesignerPropertyEditorInterface> #include <QtDesigner/QExtensionManager> +#include <private/qdesigner_utils_p.h> #include <QtCore/QDebug> #include <QtCore/QTimer> @@ -111,7 +112,9 @@ void QAxWidgetPropertySheet::setProperty(int index, const QVariant &value) } // Loading forms: Reload if (name == m_controlProperty) { - const QString clsid = value.toString(); + const QString clsid = value.canConvert<qdesigner_internal::PropertySheetStringValue>() ? + qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value).value() : + value.toString(); if (clsid.isEmpty() || !axWidget()->loadControl(clsid)) reset(index); else diff --git a/src/designer/src/uitools/quiloader.h b/src/designer/src/uitools/quiloader.h index 6977d20a4..12124dc0c 100644 --- a/src/designer/src/uitools/quiloader.h +++ b/src/designer/src/uitools/quiloader.h @@ -45,8 +45,6 @@ #include <QtCore/QObject> #include <QtCore/QScopedPointer> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QWidget; @@ -97,6 +95,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QUILOADER_H diff --git a/src/designer/src/uitools/quiloader_p.h b/src/designer/src/uitools/quiloader_p.h index 6ee4ca325..e7cbfb607 100644 --- a/src/designer/src/uitools/quiloader_p.h +++ b/src/designer/src/uitools/quiloader_p.h @@ -66,8 +66,6 @@ #define PROP_TABPAGETOOLTIP "_q_tabPageToolTip_notr" #define PROP_TABPAGEWHATSTHIS "_q_tabPageWhatsThis_notr" -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QUiTranslatableStringValue @@ -101,8 +99,6 @@ extern const QUiItemRolePair qUiItemRoles[]; QT_END_NAMESPACE -QT_END_HEADER - Q_DECLARE_METATYPE(QUiTranslatableStringValue) diff --git a/src/linguist/lconvert/lconvert.pro b/src/linguist/lconvert/lconvert.pro index 1f091cbff..e52e8d729 100644 --- a/src/linguist/lconvert/lconvert.pro +++ b/src/linguist/lconvert/lconvert.pro @@ -1,3 +1,4 @@ +option(host_build) QT = core-private DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII diff --git a/src/linguist/lconvert/main.cpp b/src/linguist/lconvert/main.cpp index af1576c97..21b7a682c 100644 --- a/src/linguist/lconvert/main.cpp +++ b/src/linguist/lconvert/main.cpp @@ -90,12 +90,6 @@ static int usage(const QStringList &args) " -of <outformat>\n" " --output-format <outformat>\n" " Specify output format. See -if.\n\n" - " --input-codec <codec>\n" - " Specify encoding for QM and PO input files. Default is 'Latin1'\n" - " for QM and 'UTF-8' for PO files. UTF-8 is always tried as well for\n" - " QM, corresponding to the possible use of the trUtf8() function.\n\n" - " --output-codec <codec>\n" - " Specify encoding for PO output files. Default is 'UTF-8'.\n\n" " --drop-tags <regexp>\n" " Drop named extra tags when writing TS or XLIFF files.\n" " May be specified repeatedly.\n\n" @@ -140,6 +134,7 @@ struct File int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); +#ifndef QT_BOOTSTRAPPED #ifndef Q_OS_WIN32 QTranslator translator; QTranslator qtTranslator; @@ -151,6 +146,7 @@ int main(int argc, char *argv[]) app.installTranslator(&qtTranslator); } #endif // Q_OS_WIN32 +#endif QStringList args = app.arguments(); QList<File> inFiles; @@ -195,14 +191,6 @@ int main(int argc, char *argv[]) if (++i >= args.size()) return usage(args); inFormat = args[i]; - } else if (args[i] == QLatin1String("-input-codec")) { - if (++i >= args.size()) - return usage(args); - cd.m_codecForSource = args[i].toLatin1(); - } else if (args[i] == QLatin1String("-output-codec")) { - if (++i >= args.size()) - return usage(args); - cd.m_outputCodec = args[i].toLatin1(); } else if (args[i] == QLatin1String("-drop-tag")) { if (++i >= args.size()) return usage(args); diff --git a/src/linguist/linguist/doc/snippets/doc_src_linguist-manual.pro b/src/linguist/linguist/doc/snippets/doc_src_linguist-manual.pro index 772bdf1b7..d89cb10b5 100644 --- a/src/linguist/linguist/doc/snippets/doc_src_linguist-manual.pro +++ b/src/linguist/linguist/doc/snippets/doc_src_linguist-manual.pro @@ -52,11 +52,6 @@ TRANSLATIONS = superapp_dk.ts \ #! [0] -#! [1] -CODECFORTR = ISO-8859-5 -#! [1] - - #! [2] CODECFORSRC = UTF-8 #! [2] diff --git a/src/linguist/linguist/doc/src/linguist-manual.qdoc b/src/linguist/linguist/doc/src/linguist-manual.qdoc index 852a006bd..d1af32be2 100644 --- a/src/linguist/linguist/doc/src/linguist-manual.qdoc +++ b/src/linguist/linguist/doc/src/linguist-manual.qdoc @@ -159,22 +159,9 @@ files: \snippet doc_src_linguist-manual.pro 0 - \snippet doc_src_linguist-manual.pro 1 - QTextCodec::setCodecForTr() makes it possible to choose a 8-bit - encoding for literal strings that appear within \c tr() calls. - This is useful for applications whose source language is, for - example, Chinese or Japanese. If no encoding is set, \c tr() uses - Latin1. - - If you do use the QTextCodec::codecForTr() mechanism in your - application, \QL needs you to set the \c CODECFORTR - entry in the \c .pro file as well. For example: - - \snippet doc_src_linguist-manual.pro 1 - - Also, if your compiler uses a different encoding for its runtime - system as for its source code and you want to use non-ASCII + If your compiler uses a different encoding for its runtime + system than for its source code and you want to use non-ASCII characters in string literals, you will need to set the \c CODECFORSRC. For example: @@ -1269,15 +1256,6 @@ \snippet arrowpad/arrowpad.pro 1 - If your sources contain genuine non-Latin1 strings, - lupdate needs - to be told about it in the \c .pro file by using, for example, - the following line: - - \code - CODECFORTR = UTF-8 - \endcode - For more information, see \l{Using lupdate} and \l{Using lrelease}. \section2 Loading Translations @@ -1297,12 +1275,6 @@ \snippet arrowpad/main.cpp 0 \snippet arrowpad/main.cpp 1 - For non-Latin1 strings in the sources you will also need for example: - - \code - QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8")); - \endcode - In production applications a more flexible approach, for example, loading translations according to locale, might be more appropriate. If the TS files are all named according to a convention such as diff --git a/src/linguist/linguist/main.cpp b/src/linguist/linguist/main.cpp index f53399f79..1ca3b293c 100644 --- a/src/linguist/linguist/main.cpp +++ b/src/linguist/linguist/main.cpp @@ -46,7 +46,6 @@ #include <QtCore/QLibraryInfo> #include <QtCore/QLocale> #include <QtCore/QSettings> -#include <QtCore/QTextCodec> #include <QtCore/QTranslator> #include <QtWidgets/QApplication> diff --git a/src/linguist/linguist/messagemodel.cpp b/src/linguist/linguist/messagemodel.cpp index 553e223e9..bf45ea8fc 100644 --- a/src/linguist/linguist/messagemodel.cpp +++ b/src/linguist/linguist/messagemodel.cpp @@ -43,7 +43,6 @@ #include <QtCore/QCoreApplication> #include <QtCore/QDebug> -#include <QtCore/QTextCodec> #include <QtWidgets/QMessageBox> #include <QtGui/QPainter> @@ -243,7 +242,6 @@ bool DataModel::load(const QString &fileName, bool *langGuessed, QWidget *parent } m_srcFileName = fileName; - m_codecName = tor.codecName(); m_relativeLocations = (tor.locationsType() == Translator::RelativeLocations); m_extra = tor.extras(); m_contextList.clear(); @@ -336,7 +334,6 @@ bool DataModel::save(const QString &fileName, QWidget *parent) tor.setLanguageCode(Translator::makeLanguageCode(m_language, m_country)); tor.setSourceLanguageCode(Translator::makeLanguageCode(m_sourceLanguage, m_sourceCountry)); - tor.setCodecName(m_codecName); tor.setLocationsType(m_relativeLocations ? Translator::RelativeLocations : Translator::AbsoluteLocations); tor.setExtras(m_extra); diff --git a/src/linguist/linguist/messagemodel.h b/src/linguist/linguist/messagemodel.h index 9c2e75c90..76dd2db23 100644 --- a/src/linguist/linguist/messagemodel.h +++ b/src/linguist/linguist/messagemodel.h @@ -257,7 +257,6 @@ private: QLocale::Language m_sourceLanguage; QLocale::Country m_country; QLocale::Country m_sourceCountry; - QByteArray m_codecName; bool m_relativeLocations; Translator::ExtraData m_extra; diff --git a/src/linguist/lrelease/lrelease.pro b/src/linguist/lrelease/lrelease.pro index 792bc9922..df026fe48 100644 --- a/src/linguist/lrelease/lrelease.pro +++ b/src/linguist/lrelease/lrelease.pro @@ -1,5 +1,5 @@ option(host_build) -QT = bootstrap-private +QT = core-private DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII SOURCES += main.cpp diff --git a/src/linguist/lupdate/cpp.cpp b/src/linguist/lupdate/cpp.cpp index 985781486..ec02be157 100644 --- a/src/linguist/lupdate/cpp.cpp +++ b/src/linguist/lupdate/cpp.cpp @@ -246,15 +246,15 @@ private: bool getMacroArgs(); bool match(uint t); bool matchString(QString *s); - bool matchEncoding(bool *utf8); + bool matchEncoding(); bool matchStringOrNull(QString *s); bool matchExpression(); - QString transcode(const QString &str, bool utf8); + QString transcode(const QString &str); void recordMessage( int line, const QString &context, const QString &text, const QString &comment, const QString &extracomment, const QString &msgid, const TranslatorMessage::ExtraData &extra, - bool utf8, bool plural); + bool plural); void processInclude(const QString &file, ConversionData &cd, const QStringList &includeStack, QSet<QString> &inclusions); @@ -308,8 +308,6 @@ private: QString yyFileName; int yyCh; bool yyAtNewline; - bool yyCodecIsUtf8; - bool yyForceUtf8; QString yyWord; qlonglong yyInteger; QStack<IfdefState> yyIfdefStack; @@ -378,7 +376,6 @@ void CppParser::setInput(const QString &in) yyInStr = in; yyFileName = QString(); yySourceCodec = 0; - yyForceUtf8 = true; } void CppParser::setInput(QTextStream &ts, const QString &fileName) @@ -386,7 +383,6 @@ void CppParser::setInput(QTextStream &ts, const QString &fileName) yyInStr = ts.readAll(); yyFileName = fileName; yySourceCodec = ts.codec(); - yyForceUtf8 = false; } /* @@ -1460,7 +1456,7 @@ STRING(UnicodeUTF8); STRING(DefaultCodec); STRING(CodecForTr); -bool CppParser::matchEncoding(bool *utf8) +bool CppParser::matchEncoding() { if (yyTok != Tok_Ident) return false; @@ -1469,16 +1465,11 @@ bool CppParser::matchEncoding(bool *utf8) if (yyTok == Tok_ColonColon) yyTok = getToken(); } - if (yyWord == strUnicodeUTF8) { - *utf8 = true; - yyTok = getToken(); - return true; - } - if (yyWord == strDefaultCodec || yyWord == strCodecForTr) { - *utf8 = false; + if (yyWord == strUnicodeUTF8 || yyWord == strDefaultCodec || yyWord == strCodecForTr) { yyTok = getToken(); return true; } + yyMsg() << qPrintable(LU::tr("Unsupported encoding Latin1\n")); return false; } @@ -1530,12 +1521,12 @@ bool CppParser::matchExpression() return true; } -QString CppParser::transcode(const QString &str, bool utf8) +QString CppParser::transcode(const QString &str) { static const char tab[] = "abfnrtv"; static const char backTab[] = "\a\b\f\n\r\t\v"; // This function has to convert back to bytes, as C's \0* sequences work at that level. - const QByteArray in = yyForceUtf8 ? str.toUtf8() : tor->codec()->fromUnicode(str); + const QByteArray in = str.toUtf8(); QByteArray out; out.reserve(in.length()); @@ -1574,33 +1565,25 @@ QString CppParser::transcode(const QString &str, bool utf8) out += c; } } - return (utf8 || yyForceUtf8) ? QString::fromUtf8(out.constData(), out.length()) - : tor->codec()->toUnicode(out); + return QString::fromUtf8(out.constData(), out.length()); } -void CppParser::recordMessage( - int line, const QString &context, const QString &text, const QString &comment, - const QString &extracomment, const QString &msgid, const TranslatorMessage::ExtraData &extra, - bool utf8, bool plural) +void CppParser::recordMessage(int line, const QString &context, const QString &text, const QString &comment, + const QString &extracomment, const QString &msgid, const TranslatorMessage::ExtraData &extra, bool plural) { TranslatorMessage msg( - transcode(context, utf8), transcode(text, utf8), transcode(comment, utf8), QString(), + transcode(context), transcode(text), transcode(comment), QString(), yyFileName, line, QStringList(), TranslatorMessage::Unfinished, plural); - msg.setExtraComment(transcode(extracomment.simplified(), utf8)); + msg.setExtraComment(transcode(extracomment.simplified())); msg.setId(msgid); msg.setExtras(extra); - if ((utf8 || yyForceUtf8) && !yyCodecIsUtf8 && msg.needs8Bit()) - msg.setUtf8(true); tor->append(msg); } void CppParser::parse(const QString &initialContext, ConversionData &cd, const QStringList &includeStack, QSet<QString> &inclusions) { - if (tor) - yyCodecIsUtf8 = (tor->codecName() == "UTF-8"); - namespaces << HashString(); functionContext = namespaces; functionContextUnresolved = initialContext; @@ -1624,7 +1607,6 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac QString functionName; #endif int line; - bool utf8; bool yyTokColonSeen = false; // Start of c'tor's initializer list yyWord.reserve(yyInStr.size()); // Rather insane. That's because we do no length checking. @@ -1834,7 +1816,6 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac goto case_default; if (!sourcetext.isEmpty()) yyMsg() << qPrintable(LU::tr("//% cannot be used with tr() / QT_TR_NOOP(). Ignoring\n")); - utf8 = (yyTok == Tok_trUtf8); line = yyLineNo; yyTok = getToken(); if (match(Tok_LeftParen) && matchString(&text) && !text.isEmpty()) { @@ -1927,7 +1908,7 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac } gotctx: - recordMessage(line, context, text, comment, extracomment, msgid, extra, utf8, plural); + recordMessage(line, context, text, comment, extracomment, msgid, extra, plural); } sourcetext.clear(); // Will have warned about that already extracomment.clear(); @@ -1940,7 +1921,6 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac goto case_default; if (!sourcetext.isEmpty()) yyMsg() << qPrintable(LU::tr("//% cannot be used with translate() / QT_TRANSLATE_NOOP(). Ignoring\n")); - utf8 = (yyTok == Tok_translateUtf8); line = yyLineNo; yyTok = getToken(); if (match(Tok_LeftParen) @@ -1956,7 +1936,7 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac if (!match(Tok_RightParen)) { // look for encoding if (match(Tok_Comma)) { - if (matchEncoding(&utf8)) { + if (matchEncoding()) { if (!match(Tok_RightParen)) { // look for the plural quantifier, // this can be a number, an identifier or @@ -1983,7 +1963,7 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac break; } } - recordMessage(line, context, text, comment, extracomment, msgid, extra, utf8, plural); + recordMessage(line, context, text, comment, extracomment, msgid, extra, plural); } sourcetext.clear(); // Will have warned about that already extracomment.clear(); @@ -1995,13 +1975,12 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac goto case_default; if (!msgid.isEmpty()) yyMsg() << qPrintable(LU::tr("//= cannot be used with qtTrId() / QT_TRID_NOOP(). Ignoring\n")); - //utf8 = false; // Maybe use //%% or something like that line = yyLineNo; yyTok = getToken(); if (match(Tok_LeftParen) && matchString(&msgid) && !msgid.isEmpty()) { bool plural = match(Tok_Comma); recordMessage(line, QString(), sourcetext, QString(), extracomment, - msgid, extra, false, plural); + msgid, extra, plural); } sourcetext.clear(); extracomment.clear(); @@ -2102,11 +2081,11 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac context = comment.left(k); comment.remove(0, k + 1); TranslatorMessage msg( - transcode(context, false), QString(), - transcode(comment, false), QString(), + transcode(context), QString(), + transcode(comment), QString(), yyFileName, yyLineNo, QStringList(), TranslatorMessage::Finished, false); - msg.setExtraComment(transcode(extracomment.simplified(), false)); + msg.setExtraComment(transcode(extracomment.simplified())); extracomment.clear(); tor->append(msg); tor->setExtras(extra); @@ -2236,26 +2215,9 @@ const ParseResults *CppParser::recordResults(bool isHeader) } } -/* - Fetches tr() calls in C++ code in UI files (inside "<function>" - tag). This mechanism is obsolete. -*/ -void fetchtrInlinedCpp(const QString &in, Translator &translator, const QString &context) -{ - CppParser parser; - parser.setInput(in); - ConversionData cd; - QSet<QString> inclusions; - parser.setTranslator(&translator); - parser.parse(context, cd, QStringList(), inclusions); - parser.deleteResults(); -} - void loadCPP(Translator &translator, const QStringList &filenames, ConversionData &cd) { - QByteArray codecName = cd.m_codecForSource.isEmpty() - ? translator.codecName() : cd.m_codecForSource; - QTextCodec *codec = QTextCodec::codecForName(codecName); + QTextCodec *codec = QTextCodec::codecForName(cd.m_sourceIsUtf16 ? "UTF-16" : "UTF-8"); foreach (const QString &filename, filenames) { if (!CppFiles::getResults(filename).isEmpty() || CppFiles::isBlacklisted(filename)) @@ -2272,10 +2234,7 @@ void loadCPP(Translator &translator, const QStringList &filenames, ConversionDat ts.setCodec(codec); ts.setAutoDetectUnicode(true); parser.setInput(ts, filename); - if (cd.m_outputCodec.isEmpty() && ts.codec()->name() == "UTF-16") - translator.setCodecName("System"); Translator *tor = new Translator; - tor->setCodecName(translator.codecName()); parser.setTranslator(tor); QSet<QString> inclusions; parser.parse(cd.m_defaultContext, cd, QStringList(), inclusions); diff --git a/src/linguist/lupdate/java.cpp b/src/linguist/lupdate/java.cpp index 2d22f1a0e..210b85458 100644 --- a/src/linguist/lupdate/java.cpp +++ b/src/linguist/lupdate/java.cpp @@ -622,12 +622,7 @@ bool loadJava(Translator &translator, const QString &filename, ConversionData &c yyParenLineNo = 1; QTextStream ts(&file); - QByteArray codecName; - if (!cd.m_codecForSource.isEmpty()) - codecName = cd.m_codecForSource; - else - codecName = translator.codecName(); // Just because it should be latin1 already - ts.setCodec(QTextCodec::codecForName(codecName)); + ts.setCodec(QTextCodec::codecForName(cd.m_sourceIsUtf16 ? "UTF-16" : "UTF-8")); ts.setAutoDetectUnicode(true); yyInStr = ts.readAll(); yyInPos = 0; @@ -636,9 +631,6 @@ bool loadJava(Translator &translator, const QString &filename, ConversionData &c yyParenLineNo = 1; parse(&translator); - - // Java uses UTF-16 internally and Jambi makes UTF-8 for tr() purposes of it. - translator.setCodecName("UTF-8"); return true; } diff --git a/src/linguist/lupdate/lupdate.h b/src/linguist/lupdate/lupdate.h index 2f9064453..05a3ce583 100644 --- a/src/linguist/lupdate/lupdate.h +++ b/src/linguist/lupdate/lupdate.h @@ -65,7 +65,8 @@ enum UpdateOption { AbsoluteLocations = 256, RelativeLocations = 512, NoLocations = 1024, - NoUiLines = 2048 + NoUiLines = 2048, + SourceIsUtf16 = 4096 }; Q_DECLARE_FLAGS(UpdateOptions, UpdateOption) @@ -75,7 +76,6 @@ Translator merge( const Translator &tor, const Translator &virginTor, const QList<Translator> &aliens, UpdateOptions options, QString &err); -void fetchtrInlinedCpp(const QString &in, Translator &translator, const QString &context); void loadCPP(Translator &translator, const QStringList &filenames, ConversionData &cd); bool loadJava(Translator &translator, const QString &filename, ConversionData &cd); bool loadUI(Translator &translator, const QString &filename, ConversionData &cd); diff --git a/src/linguist/lupdate/lupdate.pro b/src/linguist/lupdate/lupdate.pro index ee4256878..da3807881 100644 --- a/src/linguist/lupdate/lupdate.pro +++ b/src/linguist/lupdate/lupdate.pro @@ -1,3 +1,4 @@ +option(host_build) QT = core-private qtHaveModule(qmldevtools) { diff --git a/src/linguist/lupdate/main.cpp b/src/linguist/lupdate/main.cpp index a60b8bdb6..cc0d42aa6 100644 --- a/src/linguist/lupdate/main.cpp +++ b/src/linguist/lupdate/main.cpp @@ -52,7 +52,6 @@ #include <QtCore/QFileInfo> #include <QtCore/QString> #include <QtCore/QStringList> -#include <QtCore/QTextCodec> #include <QtCore/QTranslator> #include <QtCore/QLibraryInfo> @@ -135,10 +134,7 @@ static void printUsage() " Specify the language of the translations for new files.\n" " Guessed from the file name if not specified.\n" " -ts <ts-file>...\n" - " Specify the output file(s). This will override the TRANSLATIONS\n" - " and nullify the CODECFORTR from possibly specified project files.\n" - " -codecfortr <codec>\n" - " Specify the codec assumed for tr() calls. Effective only with -ts.\n" + " Specify the output file(s). This will override the TRANSLATIONS.\n" " -version\n" " Display the version of lupdate and exit.\n" " @lst-file\n" @@ -149,7 +145,7 @@ static void printUsage() static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFileNames, const QStringList &alienFiles, - bool setCodec, const QString &sourceLanguage, const QString &targetLanguage, + const QString &sourceLanguage, const QString &targetLanguage, UpdateOptions options, bool *fail) { QList<Translator> aliens; @@ -180,11 +176,6 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil } tor.resolveDuplicates(); cd.clearErrors(); - if (setCodec && fetchedTor.codec() != tor.codec()) - printErr(LU::tr("lupdate warning: Codec for tr() '%1' disagrees with" - " existing file's codec '%2'. Expect trouble.\n") - .arg(QString::fromLatin1(fetchedTor.codecName()), - QString::fromLatin1(tor.codecName()))); if (!targetLanguage.isEmpty() && targetLanguage != tor.languageCode()) printErr(LU::tr("lupdate warning: Specified target language '%1' disagrees with" " existing file's language '%2'. Ignoring.\n") @@ -194,8 +185,6 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil " existing file's language '%2'. Ignoring.\n") .arg(sourceLanguage, tor.sourceLanguageCode())); } else { - if (setCodec) - tor.setCodec(fetchedTor.codec()); if (!targetLanguage.isEmpty()) tor.setLanguageCode(targetLanguage); else @@ -217,8 +206,6 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil if (tor.locationsType() == Translator::NoLocations) // Could be set from file theseOptions |= NoLocations; Translator out = merge(tor, fetchedTor, aliens, theseOptions, err); - if (setCodec) - out.setCodec(fetchedTor.codec()); if ((options & Verbose) && !err.isEmpty()) { printOut(err); @@ -366,26 +353,29 @@ static void processSources(Translator &fetchedTor, static void processProjects(bool topLevel, bool nestComplain, const QStringList &proFiles, const QHash<QString, QString> &outDirMap, ProFileGlobals *option, QMakeParser *parser, - UpdateOptions options, const QByteArray &codecForSource, + UpdateOptions options, const QString &targetLanguage, const QString &sourceLanguage, Translator *parentTor, bool *fail); static void processProject( bool nestComplain, const QString &proFile, ProFileGlobals *option, QMakeParser *parser, ProFileEvaluator &visitor, - UpdateOptions options, const QByteArray &_codecForSource, + UpdateOptions options, const QString &targetLanguage, const QString &sourceLanguage, Translator *fetchedTor, bool *fail) { - QByteArray codecForSource = _codecForSource; QStringList tmp = visitor.values(QLatin1String("CODECFORSRC")); if (!tmp.isEmpty()) { - codecForSource = tmp.last().toLatin1(); - if (!QTextCodec::codecForName(codecForSource)) { + QByteArray codecForSource = tmp.last().toLatin1().toUpper(); + if (codecForSource == "UTF16" || codecForSource == "UTF-16") { + options |= SourceIsUtf16; + } else if (codecForSource == "UTF8" || codecForSource == "UTF-8") { + options &= ~SourceIsUtf16; + } else { printErr(LU::tr("lupdate warning: Codec for source '%1' is invalid." - " Falling back to codec for tr().\n") + " Falling back to UTF-8.\n") .arg(QString::fromLatin1(codecForSource))); - codecForSource.clear(); + options &= ~SourceIsUtf16; } } QString proPath = QFileInfo(proFile).path(); @@ -407,12 +397,12 @@ static void processProject( subProFiles << subPro; } processProjects(false, nestComplain, subProFiles, QHash<QString, QString>(), - option, parser, options, codecForSource, + option, parser, options, targetLanguage, sourceLanguage, fetchedTor, fail); } else { ConversionData cd; cd.m_noUiLines = options & NoUiLines; - cd.m_codecForSource = codecForSource; + cd.m_sourceIsUtf16 = options & SourceIsUtf16; cd.m_includePath = visitor.values(QLatin1String("INCLUDEPATH")); QStringList sourceFiles = getSources(visitor, proPath); QSet<QString> sourceDirs; @@ -433,7 +423,7 @@ static void processProject( static void processProjects(bool topLevel, bool nestComplain, const QStringList &proFiles, const QHash<QString, QString> &outDirMap, ProFileGlobals *option, QMakeParser *parser, - UpdateOptions options, const QByteArray &codecForSource, + UpdateOptions options, const QString &targetLanguage, const QString &sourceLanguage, Translator *parentTor, bool *fail) { @@ -483,18 +473,10 @@ static void processProjects(bool topLevel, bool nestComplain, const QStringList continue; } Translator tor; - bool setCodec = false; - QStringList tmp = visitor.values(QLatin1String("CODEC")) - + visitor.values(QLatin1String("DEFAULTCODEC")) - + visitor.values(QLatin1String("CODECFORTR")); - if (!tmp.isEmpty()) { - tor.setCodecName(tmp.last().toLatin1()); - setCodec = true; - } - processProject(false, proFile, option, parser, visitor, options, codecForSource, + processProject(false, proFile, option, parser, visitor, options, targetLanguage, sourceLanguage, &tor, fail); updateTsFiles(tor, tsFiles, QStringList(), - setCodec, sourceLanguage, targetLanguage, options, fail); + sourceLanguage, targetLanguage, options, fail); pro->deref(); continue; } @@ -504,10 +486,10 @@ static void processProjects(bool topLevel, bool nestComplain, const QStringList printErr(LU::tr("lupdate warning: no TS files specified. Only diagnostics " "will be produced for '%1'.\n").arg(proFile)); Translator tor; - processProject(nestComplain, proFile, option, parser, visitor, options, codecForSource, + processProject(nestComplain, proFile, option, parser, visitor, options, targetLanguage, sourceLanguage, &tor, fail); } else { - processProject(nestComplain, proFile, option, parser, visitor, options, codecForSource, + processProject(nestComplain, proFile, option, parser, visitor, options, targetLanguage, sourceLanguage, parentTor, fail); } pro->deref(); @@ -517,6 +499,7 @@ static void processProjects(bool topLevel, bool nestComplain, const QStringList int main(int argc, char **argv) { QCoreApplication app(argc, argv); +#ifndef QT_BOOTSTRAPPED #ifndef Q_OS_WIN32 QTranslator translator; QTranslator qtTranslator; @@ -528,6 +511,7 @@ int main(int argc, char **argv) app.installTranslator(&qtTranslator); } #endif // Q_OS_WIN32 +#endif m_defaultExtensions = QLatin1String("java,jui,ui,c,c++,cc,cpp,cxx,ch,h,h++,hh,hpp,hxx,js,qs,qml"); @@ -543,7 +527,6 @@ int main(int argc, char **argv) QStringList alienFiles; QString targetLanguage; QString sourceLanguage; - QByteArray codecForTr; UpdateOptions options = Verbose | // verbose is on by default starting with Qt 4.2 @@ -643,16 +626,8 @@ int main(int argc, char **argv) options |= NoSort; continue; } else if (arg == QLatin1String("-version")) { - printOut(QObject::tr("lupdate version %1\n").arg(QLatin1String(QT_VERSION_STR))); + printOut(LU::tr("lupdate version %1\n").arg(QLatin1String(QT_VERSION_STR))); return 0; - } else if (arg == QLatin1String("-codecfortr")) { - ++i; - if (i == argc) { - printErr(LU::tr("The -codecfortr option should be followed by a codec name.\n")); - return 1; - } - codecForTr = args[i].toLatin1(); - continue; } else if (arg == QLatin1String("-ts")) { metTsFlag = true; continue; @@ -821,8 +796,6 @@ int main(int argc, char **argv) if (!targetLanguage.isEmpty() && tsFileNames.count() != 1) printErr(LU::tr("lupdate warning: -target-language usually only" " makes sense with exactly one TS file.\n")); - if (!codecForTr.isEmpty() && tsFileNames.isEmpty()) - printErr(LU::tr("lupdate warning: -codecfortr has no effect without -ts.\n")); bool fail = false; if (proFiles.isEmpty()) { @@ -833,12 +806,12 @@ int main(int argc, char **argv) Translator fetchedTor; ConversionData cd; cd.m_noUiLines = options & NoUiLines; + cd.m_sourceIsUtf16 = options & SourceIsUtf16; cd.m_projectRoots = projectRoots; cd.m_includePath = includePath; cd.m_allCSources = allCSources; - fetchedTor.setCodecName(codecForTr); processSources(fetchedTor, sourceFiles, cd); - updateTsFiles(fetchedTor, tsFileNames, alienFiles, !codecForTr.isEmpty(), + updateTsFiles(fetchedTor, tsFileNames, alienFiles, sourceLanguage, targetLanguage, options, &fail); } else { if (!sourceFiles.isEmpty() || !includePath.isEmpty()) { @@ -859,13 +832,12 @@ int main(int argc, char **argv) if (!tsFileNames.isEmpty()) { Translator fetchedTor; - fetchedTor.setCodecName(codecForTr); - processProjects(true, true, proFiles, outDirMap, &option, &parser, options, QByteArray(), + processProjects(true, true, proFiles, outDirMap, &option, &parser, options, targetLanguage, sourceLanguage, &fetchedTor, &fail); - updateTsFiles(fetchedTor, tsFileNames, alienFiles, !codecForTr.isEmpty(), + updateTsFiles(fetchedTor, tsFileNames, alienFiles, sourceLanguage, targetLanguage, options, &fail); } else { - processProjects(true, false, proFiles, outDirMap, &option, &parser, options, QByteArray(), + processProjects(true, false, proFiles, outDirMap, &option, &parser, options, targetLanguage, sourceLanguage, 0, &fail); } } diff --git a/src/linguist/lupdate/merge.cpp b/src/linguist/lupdate/merge.cpp index 9808399d6..3160f914b 100644 --- a/src/linguist/lupdate/merge.cpp +++ b/src/linguist/lupdate/merge.cpp @@ -48,7 +48,6 @@ #include <QtCore/QDebug> #include <QtCore/QMap> #include <QtCore/QStringList> -#include <QtCore/QTextCodec> #include <QtCore/QVector> QT_BEGIN_NAMESPACE @@ -338,7 +337,6 @@ Translator merge( outTor.setLanguageCode(tor.languageCode()); outTor.setSourceLanguageCode(tor.sourceLanguageCode()); outTor.setLocationsType(tor.locationsType()); - outTor.setCodecName(tor.codecName()); /* The types of all the messages from the vernacular translator @@ -439,7 +437,6 @@ Translator merge( copyAttribs: m.setReferences(mv->allReferences()); m.setPlural(mv->isPlural()); - m.setUtf8(mv->isUtf8()); m.setExtraComment(mv->extraComment()); m.setId(mv->id()); } diff --git a/src/linguist/lupdate/ui.cpp b/src/linguist/lupdate/ui.cpp index c99958d8a..537f0a92b 100644 --- a/src/linguist/lupdate/ui.cpp +++ b/src/linguist/lupdate/ui.cpp @@ -65,7 +65,7 @@ class UiReader : public QXmlDefaultHandler public: UiReader(Translator &translator, ConversionData &cd) : m_translator(translator), m_cd(cd), m_lineNumber(-1), m_isTrString(false), - m_needUtf8(translator.codecName() != "UTF-8"), m_insideStringList(false) + m_insideStringList(false) {} bool startElement(const QString &namespaceURI, const QString &localName, @@ -92,7 +92,6 @@ private: QString m_accum; int m_lineNumber; bool m_isTrString; - bool m_needUtf8; bool m_insideStringList; }; @@ -102,15 +101,7 @@ bool UiReader::startElement(const QString &namespaceURI, Q_UNUSED(namespaceURI); Q_UNUSED(localName); - if (qName == QLatin1String("item")) { // UI3 menu entries - flush(); - if (!atts.value(QLatin1String("text")).isEmpty()) { - m_source = atts.value(QLatin1String("text")); - m_isTrString = true; - if (!m_cd.m_noUiLines) - m_lineNumber = m_locator->lineNumber(); - } - } else if (qName == QLatin1String("string")) { + if (qName == QLatin1String("string")) { flush(); if (!m_insideStringList) readTranslationAttributes(atts); @@ -139,8 +130,6 @@ bool UiReader::endElement(const QString &namespaceURI, } else if (qName == QLatin1String("comment")) { // FIXME: what's that? m_comment = m_accum; flush(); - } else if (qName == QLatin1String("function")) { // UI3 embedded code - fetchtrInlinedCpp(m_accum, m_translator, m_context); } else if (qName == QLatin1String("stringlist")) { m_insideStringList = false; } else { @@ -171,8 +160,6 @@ void UiReader::flush() m_comment, QString(), m_cd.m_sourceFileName, m_lineNumber, QStringList()); msg.setExtraComment(m_extracomment); - if (m_needUtf8 && msg.needs8Bit()) - msg.setUtf8(true); m_translator.extend(msg); } m_source.clear(); diff --git a/src/linguist/shared/formats.pri b/src/linguist/shared/formats.pri index 6f18ab594..985f6dbb8 100644 --- a/src/linguist/shared/formats.pri +++ b/src/linguist/shared/formats.pri @@ -1,6 +1,6 @@ # infrastructure -!host_build: QT *= xml +QT *= xml INCLUDEPATH *= $$PWD diff --git a/src/linguist/shared/po.cpp b/src/linguist/shared/po.cpp index 5e4da8417..3cf3a72e6 100644 --- a/src/linguist/shared/po.cpp +++ b/src/linguist/shared/po.cpp @@ -404,8 +404,7 @@ static QByteArray QByteArrayList_join(const QList<QByteArray> &that, char sep) bool loadPO(Translator &translator, QIODevice &dev, ConversionData &cd) { - QTextCodec *codec = QTextCodec::codecForName( - cd.m_codecForSource.isEmpty() ? QByteArray("UTF-8") : cd.m_codecForSource); + QTextCodec *codec = QTextCodec::codecForName("UTF-8"); bool error = false; // format of a .po file entry: @@ -478,7 +477,6 @@ bool loadPO(Translator &translator, QIODevice &dev, ConversionData &cd) } else if (hdrName == "MIME-Version") { // just assume it is 1.0 } else if (hdrName == "Content-Type") { - if (cd.m_codecForSource.isEmpty()) { if (!hdrValue.startsWith("text/plain; charset=")) { cd.appendError(QString::fromLatin1("Unexpected Content-Type header '%1'") .arg(QString::fromLatin1(hdrValue))); @@ -498,7 +496,6 @@ bool loadPO(Translator &translator, QIODevice &dev, ConversionData &cd) codec = cdc; } } - } } else if (hdrName == "Content-Transfer-Encoding") { if (hdrValue != "8bit") { cd.appendError(QString::fromLatin1("Unexpected Content-Transfer-Encoding '%1'") @@ -723,13 +720,13 @@ static QString escapeComment(const QString &in, bool escape) return out; } -bool savePO(const Translator &translator, QIODevice &dev, ConversionData &cd) +bool savePO(const Translator &translator, QIODevice &dev, ConversionData &) { QString str_format = QLatin1String("-format"); bool ok = true; QTextStream out(&dev); - out.setCodec(cd.m_outputCodec.isEmpty() ? QByteArray("UTF-8") : cd.m_outputCodec); + out.setCodec("UTF-8"); bool qtContexts = false; foreach (const TranslatorMessage &msg, translator.messages()) @@ -881,14 +878,14 @@ int initPO() { Translator::FileFormat format; format.extension = QLatin1String("po"); - format.description = QObject::tr("GNU Gettext localization files"); + format.description = FMT::tr("GNU Gettext localization files"); format.loader = &loadPO; format.saver = &savePO; format.fileType = Translator::FileFormat::TranslationSource; format.priority = 1; Translator::registerFileFormat(format); format.extension = QLatin1String("pot"); - format.description = QObject::tr("GNU Gettext localization template files"); + format.description = FMT::tr("GNU Gettext localization template files"); format.loader = &loadPO; format.saver = &savePOT; format.fileType = Translator::FileFormat::TranslationSource; diff --git a/src/linguist/shared/qm.cpp b/src/linguist/shared/qm.cpp index 3697ff4f5..4b6cfdbce 100644 --- a/src/linguist/shared/qm.cpp +++ b/src/linguist/shared/qm.cpp @@ -165,12 +165,7 @@ public: enum { Contexts = 0x2f, Hashes = 0x42, Messages = 0x69, NumerusRules = 0x88, Dependencies = 0x96 }; - Releaser() : m_codec(0) {} - - void setCodecName(const QByteArray &codecName) - { - m_codec = QTextCodec::codecForName(codecName); - } + Releaser() {} bool save(QIODevice *iod); @@ -187,10 +182,7 @@ private: // This should reproduce the byte array fetched from the source file, which // on turn should be the same as passed to the actual tr(...) calls - QByteArray originalBytes(const QString &str, bool isUtf8) const; - - void insertInternal(const TranslatorMessage &message, const QStringList &tlns, - bool forceComment, bool isUtf8); + QByteArray originalBytes(const QString &str) const; static Prefix commonPrefix(const ByteTranslatorMessage &m1, const ByteTranslatorMessage &m2); @@ -207,21 +199,16 @@ private: QByteArray m_numerusRules; QStringList m_dependencies; QByteArray m_dependencyArray; - - // Used to reproduce the original bytes - QTextCodec *m_codec; }; -QByteArray Releaser::originalBytes(const QString &str, bool isUtf8) const +QByteArray Releaser::originalBytes(const QString &str) const { if (str.isEmpty()) { // Do not use QByteArray() here as the result of the serialization // will be different. return QByteArray(""); } - if (isUtf8) - return str.toUtf8(); - return m_codec ? m_codec->fromUnicode(str) : str.toLatin1(); + return str.toUtf8(); } uint Releaser::msgHash(const ByteTranslatorMessage &msg) @@ -429,12 +416,11 @@ void Releaser::squeeze(TranslatorSaveMode mode) } } -void Releaser::insertInternal(const TranslatorMessage &message, const QStringList &tlns, - bool forceComment, bool isUtf8) +void Releaser::insert(const TranslatorMessage &message, const QStringList &tlns, bool forceComment) { - ByteTranslatorMessage bmsg(originalBytes(message.context(), isUtf8), - originalBytes(message.sourceText(), isUtf8), - originalBytes(message.comment(), isUtf8), + ByteTranslatorMessage bmsg(originalBytes(message.context()), + originalBytes(message.sourceText()), + originalBytes(message.comment()), tlns); if (!forceComment) { ByteTranslatorMessage bmsg2( @@ -447,16 +433,9 @@ void Releaser::insertInternal(const TranslatorMessage &message, const QStringLis m_messages.insert(bmsg, 0); } -void Releaser::insert(const TranslatorMessage &message, const QStringList &tlns, bool forceComment) -{ - insertInternal(message, tlns, forceComment, message.isUtf8()); - if (message.isUtf8() && message.isNonUtf8()) - insertInternal(message, tlns, forceComment, false); -} - void Releaser::insertIdBased(const TranslatorMessage &message, const QStringList &tlns) { - ByteTranslatorMessage bmsg("", originalBytes(message.id(), false), "", tlns); + ByteTranslatorMessage bmsg("", originalBytes(message.id()), "", tlns); m_messages.insert(bmsg, 0); } @@ -480,30 +459,12 @@ static quint32 read32(const uchar *data) return (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | (data[3]); } -static void fromBytes(const char *str, int len, QTextCodec *codec, QTextCodec *utf8Codec, - QString *out, QString *utf8Out, - bool *isSystem, bool *isUtf8, bool *needs8Bit) +static void fromBytes(const char *str, int len, QString *out, bool *utf8Fail) { - for (int i = 0; i < len; ++i) - if (str[i] & 0x80) { - if (utf8Codec) { - QTextCodec::ConverterState cvtState; - *utf8Out = utf8Codec->toUnicode(str, len, &cvtState); - *isUtf8 = !cvtState.invalidChars; - } - QTextCodec::ConverterState cvtState; - *out = codec->toUnicode(str, len, &cvtState); - *isSystem = !cvtState.invalidChars; - *needs8Bit = true; - return; - } - *out = QString::fromLatin1(str, len); - *isSystem = true; - if (utf8Codec) { - *utf8Out = *out; - *isUtf8 = true; - } - *needs8Bit = false; + static QTextCodec *utf8Codec = QTextCodec::codecForName("UTF-8"); + QTextCodec::ConverterState cvtState; + *out = utf8Codec->toUnicode(str, len, &cvtState); + *utf8Fail = cvtState.invalidChars; } bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd) @@ -565,12 +526,6 @@ bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd) size_t numItems = offsetLength / (2 * sizeof(quint32)); //qDebug() << "NUMITEMS: " << numItems; - QTextCodec *codec = QTextCodec::codecForName( - cd.m_codecForSource.isEmpty() ? QByteArray("Latin1") : cd.m_codecForSource); - QTextCodec *utf8Codec = 0; - if (codec->name() != "UTF-8") - utf8Codec = QTextCodec::codecForName("UTF-8"); - QString strProN = QLatin1String("%n"); QLocale::Language l; QLocale::Country c; @@ -580,12 +535,8 @@ bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd) if (getNumerusInfo(l, c, 0, &numerusForms, 0)) guessPlurals = (numerusForms.count() == 1); - QString context, contextUtf8; - bool contextIsSystem, contextIsUtf8, contextNeeds8Bit; - QString sourcetext, sourcetextUtf8; - bool sourcetextIsSystem, sourcetextIsUtf8, sourcetextNeeds8Bit; - QString comment, commentUtf8; - bool commentIsSystem, commentIsUtf8, commentNeeds8Bit; + QString context, sourcetext, comment; + bool utf8Fail = false; QStringList translations; for (const uchar *start = offsetArray; start != offsetArray + (numItems << 3); start += 8) { @@ -626,9 +577,7 @@ bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd) m += 4; //qDebug() << "SOURCE LEN: " << len; //qDebug() << "SOURCE: " << QByteArray((const char*)m, len); - fromBytes((const char*)m, len, codec, utf8Codec, - &sourcetext, &sourcetextUtf8, - &sourcetextIsSystem, &sourcetextIsUtf8, &sourcetextNeeds8Bit); + fromBytes((const char*)m, len, &sourcetext, &utf8Fail); m += len; break; } @@ -637,9 +586,7 @@ bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd) m += 4; //qDebug() << "CONTEXT LEN: " << len; //qDebug() << "CONTEXT: " << QByteArray((const char*)m, len); - fromBytes((const char*)m, len, codec, utf8Codec, - &context, &contextUtf8, - &contextIsSystem, &contextIsUtf8, &contextNeeds8Bit); + fromBytes((const char*)m, len, &context, &utf8Fail); m += len; break; } @@ -648,9 +595,7 @@ bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd) m += 4; //qDebug() << "COMMENT LEN: " << len; //qDebug() << "COMMENT: " << QByteArray((const char*)m, len); - fromBytes((const char*)m, len, codec, utf8Codec, - &comment, &commentUtf8, - &commentIsSystem, &commentIsUtf8, &commentNeeds8Bit); + fromBytes((const char*)m, len, &comment, &utf8Fail); m += len; break; } @@ -673,28 +618,15 @@ bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd) } msg.setTranslations(translations); translations.clear(); - if (contextNeeds8Bit || sourcetextNeeds8Bit || commentNeeds8Bit) { - if (utf8Codec && contextIsUtf8 && sourcetextIsUtf8 && commentIsUtf8) { - // The message is utf-8, but file is not. - msg.setUtf8(true); - msg.setContext(contextUtf8); - msg.setSourceText(sourcetextUtf8); - msg.setComment(commentUtf8); - translator.append(msg); - continue; - } - if (!(contextIsSystem && sourcetextIsSystem && commentIsSystem)) { - cd.appendError(QLatin1String( - "Cannot read file with specified input codec")); - return false; - } - // The message is 8-bit in the file's encoding (utf-8 or not). - } msg.setContext(context); msg.setSourceText(sourcetext); msg.setComment(comment); translator.append(msg); } + if (utf8Fail) { + cd.appendError(QLatin1String("Cannot read file with UTF-8 codec")); + return false; + } return ok; } @@ -719,7 +651,6 @@ bool saveQM(const Translator &translator, QIODevice &dev, ConversionData &cd) QByteArray rules; if (getNumerusInfo(l, c, &rules, 0, 0)) releaser.setNumerusRules(rules); - releaser.setCodecName(translator.codecName()); int finished = 0; int unfinished = 0; @@ -802,7 +733,7 @@ int initQM() Translator::FileFormat format; format.extension = QLatin1String("qm"); - format.description = QObject::tr("Compiled Qt translations"); + format.description = FMT::tr("Compiled Qt translations"); format.fileType = Translator::FileFormat::TranslationBinary; format.priority = 0; format.loader = &loadQM; diff --git a/src/linguist/shared/qph.cpp b/src/linguist/shared/qph.cpp index 6f2541775..ac80f198e 100644 --- a/src/linguist/shared/qph.cpp +++ b/src/linguist/shared/qph.cpp @@ -191,7 +191,7 @@ int initQPH() Translator::FileFormat format; format.extension = QLatin1String("qph"); - format.description = QObject::tr("Qt Linguist 'Phrase Book'"); + format.description = FMT::tr("Qt Linguist 'Phrase Book'"); format.fileType = Translator::FileFormat::TranslationSource; format.priority = 0; format.loader = &loadQPH; diff --git a/src/linguist/shared/translator.cpp b/src/linguist/shared/translator.cpp index 41be87dc0..e3295e8bf 100644 --- a/src/linguist/shared/translator.cpp +++ b/src/linguist/shared/translator.cpp @@ -60,25 +60,13 @@ #include <QtCore/QDir> #include <QtCore/QFile> #include <QtCore/QFileInfo> -#include <QtCore/QTextCodec> #include <QtCore/QTextStream> #include <private/qtranslator_p.h> QT_BEGIN_NAMESPACE -#ifdef QT_BOOTSTRAPPED -QString QObject::tr(const char *sourceText, const char *, int n) -{ - QString ret = QString::fromLatin1(sourceText); - if (n >= 0) - ret.replace(QLatin1String("%n"), QString::number(n)); - return ret; -} -#endif - Translator::Translator() : - m_codec(QTextCodec::codecForName("ISO-8859-1")), m_locationsType(AbsoluteLocations), m_indexOk(true) { @@ -164,10 +152,6 @@ void Translator::extend(const TranslatorMessage &msg) cmt.append(msg.extraComment()); emsg.setExtraComment(cmt); } - if (msg.isUtf8() != emsg.isUtf8()) { - emsg.setUtf8(true); - emsg.setNonUtf8(true); - } } } @@ -593,14 +577,7 @@ Translator::Duplicates Translator::resolveDuplicates() ++i; continue; gotDupe: - if (omsg->isUtf8() != msg.isUtf8() && !omsg->isNonUtf8()) { - // Dual-encoded message - omsg->setUtf8(true); - omsg->setNonUtf8(true); - } else { - // Duplicate - pDup->insert(oi); - } + pDup->insert(oi); if (!omsg->isTranslated() && msg.isTranslated()) omsg->setTranslations(msg.translations()); m_indexOk = false; @@ -745,23 +722,6 @@ void Translator::setExtra(const QString &key, const QString &value) m_extra[key] = value; } -void Translator::setCodecName(const QByteArray &name) -{ - QTextCodec *codec = QTextCodec::codecForName(name); - if (!codec) { - if (!name.isEmpty()) - std::cerr << "No QTextCodec for " << name.constData() << " available. Using Latin1.\n"; - m_codec = QTextCodec::codecForName("ISO-8859-1"); - } else { - m_codec = codec; - } -} - -QByteArray Translator::codecName() const -{ - return m_codec->name(); -} - void Translator::dump() const { for (int i = 0; i != messageCount(); ++i) diff --git a/src/linguist/shared/translator.h b/src/linguist/shared/translator.h index 41fc9820a..e0820b047 100644 --- a/src/linguist/shared/translator.h +++ b/src/linguist/shared/translator.h @@ -44,6 +44,7 @@ #include "translatormessage.h" +#include <QCoreApplication> #include <QDir> #include <QList> #include <QLocale> @@ -54,18 +55,9 @@ QT_BEGIN_NAMESPACE -#ifdef QT_BOOTSTRAPPED -class QObject { -public: - static QString tr(const char *sourceText, const char * = 0, int n = -1); -}; -class QCoreApplication : public QObject { -public: - static QString translate(const char *, const char *sourceText, const char * = 0, - int n = -1) - { return tr(sourceText, 0, n); } +class FMT { + Q_DECLARE_TR_FUNCTIONS(Linguist) }; -#endif class QIODevice; @@ -97,8 +89,7 @@ public: public: QString m_defaultContext; - QByteArray m_codecForSource; // CPP, PO & QM specific - QByteArray m_outputCodec; // CPP & PO specific + bool m_sourceIsUtf16; // CPP & JAVA specific QString m_unTrPrefix; // QM specific QString m_sourceFileName; QString m_targetFileName; @@ -160,11 +151,6 @@ public: Duplicates resolveDuplicates(); void reportDuplicates(const Duplicates &dupes, const QString &fileName, bool verbose); - void setCodecName(const QByteArray &name); - void setCodec(QTextCodec *codec) { m_codec = codec; } - QByteArray codecName() const; - QTextCodec *codec() const { return m_codec; } - QString languageCode() const { return m_language; } QString sourceLanguageCode() const { return m_sourceLanguage; } @@ -231,7 +217,6 @@ private: typedef QList<TranslatorMessage> TMM; // int stores the sequence position. TMM m_messages; - QTextCodec *m_codec; LocationsType m_locationsType; // A string beginning with a 2 or 3 letter language code (ISO 639-1 diff --git a/src/linguist/shared/translatormessage.cpp b/src/linguist/shared/translatormessage.cpp index 206c535b1..050bc33ee 100644 --- a/src/linguist/shared/translatormessage.cpp +++ b/src/linguist/shared/translatormessage.cpp @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE TranslatorMessage::TranslatorMessage() - : m_lineNumber(-1), m_type(Unfinished), m_utf8(false), m_nonUtf8(false), m_plural(false) + : m_lineNumber(-1), m_type(Unfinished), m_plural(false) { } @@ -64,7 +64,7 @@ TranslatorMessage::TranslatorMessage(const QString &context, : m_context(context), m_sourcetext(sourceText), m_comment(comment), m_userData(userData), m_translations(translations), m_fileName(fileName), m_lineNumber(lineNumber), - m_type(type), m_utf8(false), m_nonUtf8(false), m_plural(plural) + m_type(type), m_plural(plural) { } @@ -124,22 +124,6 @@ TranslatorMessage::References TranslatorMessage::allReferences() const return refs; } -static bool needs8BitHelper(const QString &ba) -{ - for (int i = ba.size(); --i >= 0; ) - if (ba.at(i).unicode() >= 0x80) - return true; - return false; -} - -bool TranslatorMessage::needs8Bit() const -{ - //dump(); - return needs8BitHelper(m_sourcetext) - || needs8BitHelper(m_comment) - || needs8BitHelper(m_context); -} - bool TranslatorMessage::hasExtra(const QString &key) const { diff --git a/src/linguist/shared/translatormessage.h b/src/linguist/shared/translatormessage.h index 01725addd..4680b0ec2 100644 --- a/src/linguist/shared/translatormessage.h +++ b/src/linguist/shared/translatormessage.h @@ -129,10 +129,6 @@ public: Type type() const { return m_type; } void setType(Type t) { m_type = t; } - bool isUtf8() const { return m_utf8; } // codecForTr override - void setUtf8(bool on) { m_utf8 = on; } - bool isNonUtf8() const { return m_nonUtf8; } // codecForTr override - void setNonUtf8(bool on) { m_nonUtf8 = on; } bool isPlural() const { return m_plural; } void setPlural(bool isplural) { m_plural = isplural; } @@ -145,7 +141,6 @@ public: void setExtras(const ExtraData &extras) { m_extra = extras; } void unsetExtra(const QString &key); - bool needs8Bit() const; void dump() const; private: @@ -165,8 +160,6 @@ private: References m_extraRefs; Type m_type; - bool m_utf8; - bool m_nonUtf8; bool m_plural; }; diff --git a/src/linguist/shared/ts.cpp b/src/linguist/shared/ts.cpp index f7dab9c55..2c8840d08 100644 --- a/src/linguist/shared/ts.cpp +++ b/src/linguist/shared/ts.cpp @@ -54,19 +54,6 @@ QT_BEGIN_NAMESPACE -/* - * The encodings are a total mess. - * A Translator has a codecForTr(). Each message's text will be passed to tr() - * in that encoding or as UTF-8 to trUtf8() if it is flagged as such. - * For ts 2.0, the file content is always uniformly in UTF-8. The file stores - * the codecForTr default and marks deviating messages accordingly. - * For ts 1.1, the file content is in mixed encoding. Each message is encoded - * the way it will be passed to tr() (with 8-bit characters encoded as numeric - * entities) or trUtf8(). The file stores the encoding and codecForTr in one - * attribute, for both the default and each deviating message. - */ - - QDebug &operator<<(QDebug &d, const QXmlStreamAttribute &attr) { return d << "[" << attr.name().toString() << "," << attr.value().toString() << "]"; @@ -211,7 +198,6 @@ QString TSReader::readTransContents() bool TSReader::read(Translator &translator) { - STRING(both); STRING(byte); STRING(catalog); STRING(comment); @@ -219,7 +205,6 @@ bool TSReader::read(Translator &translator) STRING(defaultcodec); STRING(dependencies); STRING(dependency); - STRING(encoding); STRING(extracomment); STRING(filename); STRING(id); @@ -237,12 +222,10 @@ bool TSReader::read(Translator &translator) STRING(sourcelanguage); STRING(translation); STRING(translatorcomment); - STRING(true); STRING(TS); STRING(type); STRING(unfinished); STRING(userdata); - STRING(utf8); STRING(value); //STRING(version); STRING(yes); @@ -281,9 +264,8 @@ bool TSReader::read(Translator &translator) // ignore these, just whitespace } else if (elementStarts(strdefaultcodec)) { // <defaultcodec> - const QString &codec = readElementText(); - if (!codec.isEmpty()) - translator.setCodecName(codec.toLatin1()); + readElementText(); + m_cd.appendError(QString::fromLatin1("Warning: ignoring <defaultcodec> element")); // </defaultcodec> } else if (isStartElement() && name().toString().startsWith(strextrans)) { @@ -342,10 +324,6 @@ bool TSReader::read(Translator &translator) msg.setContext(context); msg.setType(TranslatorMessage::Finished); msg.setPlural(attributes().value(strnumerus) == stryes); - const QStringRef &utf8Attr = attributes().value(strutf8); - msg.setNonUtf8(utf8Attr == strboth); - msg.setUtf8(msg.isNonUtf8() || utf8Attr == strtrue - || attributes().value(strencoding) == strUtf8); while (!atEnd()) { readNext(); if (isEndElement()) { @@ -504,33 +482,6 @@ static QString protect(const QString &str) return result; } -static QString evilBytes(const QString& str, - bool isUtf8, int format, const QByteArray &codecName) -{ - //qDebug() << "EVIL: " << str << isUtf8 << format << codecName; - if (isUtf8) - return protect(str); - if (format == 20) - return protect(str); - if (codecName == "UTF-8") - return protect(str); - QTextCodec *codec = QTextCodec::codecForName(codecName); - if (!codec) - return protect(str); - QString t = QString::fromLatin1(codec->fromUnicode(protect(str)).data()); - int len = (int) t.length(); - QString result; - // FIXME: Factor is sensible only for latin scripts, probably. - result.reserve(t.length() * 2); - for (int k = 0; k < len; k++) { - if (t[k].unicode() >= 0x7f) - result += numericEntity(t[k].unicode()); - else - result += t[k]; - } - return result; -} - static void writeExtras(QTextStream &t, const char *indent, const TranslatorMessage::ExtraData &extras, QRegExp drops) { @@ -570,37 +521,26 @@ static void writeVariants(QTextStream &t, const char *indent, const QString &inp } } -bool saveTS(const Translator &translator, QIODevice &dev, ConversionData &cd, int format) +bool saveTS(const Translator &translator, QIODevice &dev, ConversionData &cd) { bool result = true; QTextStream t(&dev); t.setCodec(QTextCodec::codecForName("UTF-8")); - bool trIsUtf8 = (translator.codecName() == "UTF-8"); //qDebug() << translator.codecName(); - bool fileIsUtf8 = (format == 20 || trIsUtf8); // The xml prolog allows processors to easily detect the correct encoding t << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE TS>\n"; - if (format == 11) - t << "<TS version=\"1.1\""; - else - t << "<TS version=\"2.0\""; + t << "<TS version=\"2.0\""; QString languageCode = translator.languageCode(); if (!languageCode.isEmpty() && languageCode != QLatin1String("C")) t << " language=\"" << languageCode << "\""; - if (format == 20) { - languageCode = translator.sourceLanguageCode(); - if (!languageCode.isEmpty() && languageCode != QLatin1String("C")) - t << " sourcelanguage=\"" << languageCode << "\""; - } + languageCode = translator.sourceLanguageCode(); + if (!languageCode.isEmpty() && languageCode != QLatin1String("C")) + t << " sourcelanguage=\"" << languageCode << "\""; t << ">\n"; - QByteArray codecName = translator.codecName(); - if (codecName != "ISO-8859-1") - t << "<defaultcodec>" << codecName << "</defaultcodec>\n"; - QStringList deps = translator.dependencies(); if (!deps.isEmpty()) { t << "<dependencies>\n"; @@ -611,8 +551,7 @@ bool saveTS(const Translator &translator, QIODevice &dev, ConversionData &cd, in QRegExp drops(cd.dropTags().join(QLatin1String("|"))); - if (format == 20) - writeExtras(t, " ", translator.extras(), drops); + writeExtras(t, " ", translator.extras(), drops); QHash<QString, QList<TranslatorMessage> > messageOrder; QList<QString> contextOrder; @@ -632,35 +571,16 @@ bool saveTS(const Translator &translator, QIODevice &dev, ConversionData &cd, in QHash<QString, int> currentLine; QString currentFile; foreach (const QString &context, contextOrder) { - const TranslatorMessage &firstMsg = messageOrder[context].first(); - t << "<context" << ((!fileIsUtf8 && firstMsg.isUtf8()) ? " encoding=\"UTF-8\"" : "") << ">\n"; - - t << " <name>" - << evilBytes(context, firstMsg.isUtf8() || fileIsUtf8, format, codecName) + t << "<context>\n" + " <name>" + << protect(context) << "</name>\n"; foreach (const TranslatorMessage &msg, messageOrder[context]) { //msg.dump(); - bool isUtf8 = msg.isUtf8(); - bool second = false; - forever { - t << " <message"; if (!msg.id().isEmpty()) t << " id=\"" << msg.id() << "\""; - if (!trIsUtf8) { - if (format == 11) { - if (isUtf8) - t << " encoding=\"UTF-8\""; - } else { - if (msg.isUtf8()) { - if (msg.isNonUtf8()) - t << " utf8=\"both\""; - else - t << " utf8=\"true\""; - } - } - } if (msg.isPlural()) t << " numerus=\"yes\""; t << ">\n"; @@ -703,20 +623,18 @@ bool saveTS(const Translator &translator, QIODevice &dev, ConversionData &cd, in } t << " <source>" - << evilBytes(msg.sourceText(), isUtf8, format, codecName) + << protect(msg.sourceText()) << "</source>\n"; - if (format != 11 && !msg.oldSourceText().isEmpty()) + if (!msg.oldSourceText().isEmpty()) t << " <oldsource>" << protect(msg.oldSourceText()) << "</oldsource>\n"; if (!msg.comment().isEmpty()) { t << " <comment>" - << evilBytes(msg.comment(), isUtf8, format, codecName) + << protect(msg.comment()) << "</comment>\n"; } - if (format != 11) { - if (!msg.oldComment().isEmpty()) t << " <oldcomment>" << protect(msg.oldComment()) << "</oldcomment>\n"; @@ -728,8 +646,6 @@ bool saveTS(const Translator &translator, QIODevice &dev, ConversionData &cd, in t << " <translatorcomment>" << protect(msg.translatorComment()) << "</translatorcomment>\n"; - } - t << " <translation"; if (msg.type() == TranslatorMessage::Unfinished) t << " type=\"unfinished\""; @@ -749,18 +665,11 @@ bool saveTS(const Translator &translator, QIODevice &dev, ConversionData &cd, in } t << "</translation>\n"; - if (format != 11) - writeExtras(t, " ", msg.extras(), drops); + writeExtras(t, " ", msg.extras(), drops); if (!msg.userData().isEmpty()) t << " <userdata>" << msg.userData() << "</userdata>\n"; t << " </message>\n"; - - if (format != 11 || second || !msg.isUtf8() || !msg.isNonUtf8()) - break; - isUtf8 = false; - second = true; - } } t << "</context>\n"; } @@ -775,43 +684,16 @@ bool loadTS(Translator &translator, QIODevice &dev, ConversionData &cd) return reader.read(translator); } -bool saveTS11(const Translator &translator, QIODevice &dev, ConversionData &cd) -{ - return saveTS(translator, dev, cd, 11); -} - -bool saveTS20(const Translator &translator, QIODevice &dev, ConversionData &cd) -{ - return saveTS(translator, dev, cd, 20); -} - int initTS() { Translator::FileFormat format; - format.extension = QLatin1String("ts11"); - format.fileType = Translator::FileFormat::TranslationSource; - format.priority = -1; - format.description = QObject::tr("Qt translation sources (format 1.1)"); - format.loader = &loadTS; - format.saver = &saveTS11; - Translator::registerFileFormat(format); - - format.extension = QLatin1String("ts20"); - format.fileType = Translator::FileFormat::TranslationSource; - format.priority = -1; - format.description = QObject::tr("Qt translation sources (format 2.0)"); - format.loader = &loadTS; - format.saver = &saveTS20; - Translator::registerFileFormat(format); - - // "ts" is always the latest. right now it's ts20. format.extension = QLatin1String("ts"); format.fileType = Translator::FileFormat::TranslationSource; format.priority = 0; - format.description = QObject::tr("Qt translation sources (latest format)"); + format.description = FMT::tr("Qt translation sources"); format.loader = &loadTS; - format.saver = &saveTS20; + format.saver = &saveTS; Translator::registerFileFormat(format); return 1; diff --git a/src/linguist/shared/xliff.cpp b/src/linguist/shared/xliff.cpp index b66fa89a7..a29c7bab1 100644 --- a/src/linguist/shared/xliff.cpp +++ b/src/linguist/shared/xliff.cpp @@ -837,7 +837,7 @@ int initXLIFF() { Translator::FileFormat format; format.extension = QLatin1String("xlf"); - format.description = QObject::tr("XLIFF localization files"); + format.description = FMT::tr("XLIFF localization files"); format.fileType = Translator::FileFormat::TranslationSource; format.priority = 1; format.loader = &loadXLIFF; diff --git a/src/pixeltool/qpixeltool.cpp b/src/pixeltool/qpixeltool.cpp index 8adce3e60..0c44dbf52 100644 --- a/src/pixeltool/qpixeltool.cpp +++ b/src/pixeltool/qpixeltool.cpp @@ -44,6 +44,7 @@ #include <qapplication.h> #include <qdesktopwidget.h> #include <qapplication.h> +#include <qscreen.h> #ifndef QT_NO_CLIPBOARD #include <qclipboard.h> #endif @@ -428,6 +429,11 @@ void QPixelTool::grabScreen() if (mousePos == m_lastMousePos && !m_autoUpdate) return; + if (m_lastMousePos != mousePos) { + setWindowTitle(QString::fromLatin1("PixelTool [%1, %2] ") + .arg(mousePos.x()).arg(mousePos.y())); + } + int w = int(width() / float(m_zoom)); int h = int(height() / float(m_zoom)); @@ -439,7 +445,8 @@ void QPixelTool::grabScreen() int x = mousePos.x() - w/2; int y = mousePos.y() - h/2; - m_buffer = QPixmap::grabWindow(qApp->desktop()->winId(), x, y, w, h); + QScreen *screen = qApp->screens().at(qApp->desktop()->screenNumber()); + m_buffer = screen->grabWindow(qApp->desktop()->winId(), x, y, w, h); QRegion geom(x, y, w, h); QRect screenRect; diff --git a/tests/auto/bic/data/QtDesigner.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtDesigner.5.0.0.linux-gcc-ia32.txt index 37e8b00f0..57ae53e39 100644 --- a/tests/auto/bic/data/QtDesigner.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtDesigner.5.0.0.linux-gcc-ia32.txt @@ -4203,157 +4203,6 @@ QAccessibleTableModelChangeEvent (0xb3b05fb4) 0 QAccessibleEvent (0xb387aa48) 0 primary-for QAccessibleTableModelChangeEvent (0xb3b05fb4) -Vtable for QAccessibleTextInterface -QAccessibleTextInterface::_ZTV24QAccessibleTextInterface: 20u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI24QAccessibleTextInterface) -8 (int (*)(...))QAccessibleTextInterface::~QAccessibleTextInterface -12 (int (*)(...))QAccessibleTextInterface::~QAccessibleTextInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual -36 (int (*)(...))__cxa_pure_virtual -40 (int (*)(...))__cxa_pure_virtual -44 (int (*)(...))__cxa_pure_virtual -48 (int (*)(...))QAccessibleTextInterface::textBeforeOffset -52 (int (*)(...))QAccessibleTextInterface::textAfterOffset -56 (int (*)(...))QAccessibleTextInterface::textAtOffset -60 (int (*)(...))__cxa_pure_virtual -64 (int (*)(...))__cxa_pure_virtual -68 (int (*)(...))__cxa_pure_virtual -72 (int (*)(...))__cxa_pure_virtual -76 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleTextInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleTextInterface (0xb388d038) 0 nearly-empty - vptr=((& QAccessibleTextInterface::_ZTV24QAccessibleTextInterface) + 8u) - -Vtable for QAccessibleEditableTextInterface -QAccessibleEditableTextInterface::_ZTV32QAccessibleEditableTextInterface: 7u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI32QAccessibleEditableTextInterface) -8 (int (*)(...))QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface -12 (int (*)(...))QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleEditableTextInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleEditableTextInterface (0xb388d2a0) 0 nearly-empty - vptr=((& QAccessibleEditableTextInterface::_ZTV32QAccessibleEditableTextInterface) + 8u) - -Vtable for QAccessibleValueInterface -QAccessibleValueInterface::_ZTV25QAccessibleValueInterface: 9u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI25QAccessibleValueInterface) -8 (int (*)(...))QAccessibleValueInterface::~QAccessibleValueInterface -12 (int (*)(...))QAccessibleValueInterface::~QAccessibleValueInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleValueInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleValueInterface (0xb388d508) 0 nearly-empty - vptr=((& QAccessibleValueInterface::_ZTV25QAccessibleValueInterface) + 8u) - -Vtable for QAccessibleTableCellInterface -QAccessibleTableCellInterface::_ZTV29QAccessibleTableCellInterface: 13u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI29QAccessibleTableCellInterface) -8 (int (*)(...))QAccessibleTableCellInterface::~QAccessibleTableCellInterface -12 (int (*)(...))QAccessibleTableCellInterface::~QAccessibleTableCellInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual -36 (int (*)(...))__cxa_pure_virtual -40 (int (*)(...))__cxa_pure_virtual -44 (int (*)(...))__cxa_pure_virtual -48 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleTableCellInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleTableCellInterface (0xb388d770) 0 nearly-empty - vptr=((& QAccessibleTableCellInterface::_ZTV29QAccessibleTableCellInterface) + 8u) - -Vtable for QAccessibleTableInterface -QAccessibleTableInterface::_ZTV25QAccessibleTableInterface: 23u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI25QAccessibleTableInterface) -8 (int (*)(...))QAccessibleTableInterface::~QAccessibleTableInterface -12 (int (*)(...))QAccessibleTableInterface::~QAccessibleTableInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual -36 (int (*)(...))__cxa_pure_virtual -40 (int (*)(...))__cxa_pure_virtual -44 (int (*)(...))__cxa_pure_virtual -48 (int (*)(...))__cxa_pure_virtual -52 (int (*)(...))__cxa_pure_virtual -56 (int (*)(...))__cxa_pure_virtual -60 (int (*)(...))__cxa_pure_virtual -64 (int (*)(...))__cxa_pure_virtual -68 (int (*)(...))__cxa_pure_virtual -72 (int (*)(...))__cxa_pure_virtual -76 (int (*)(...))__cxa_pure_virtual -80 (int (*)(...))__cxa_pure_virtual -84 (int (*)(...))__cxa_pure_virtual -88 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleTableInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleTableInterface (0xb388d9d8) 0 nearly-empty - vptr=((& QAccessibleTableInterface::_ZTV25QAccessibleTableInterface) + 8u) - -Vtable for QAccessibleActionInterface -QAccessibleActionInterface::_ZTV26QAccessibleActionInterface: 9u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI26QAccessibleActionInterface) -8 (int (*)(...))QAccessibleActionInterface::~QAccessibleActionInterface -12 (int (*)(...))QAccessibleActionInterface::~QAccessibleActionInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))QAccessibleActionInterface::localizedActionName -24 (int (*)(...))QAccessibleActionInterface::localizedActionDescription -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleActionInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleActionInterface (0xb388dc40) 0 nearly-empty - vptr=((& QAccessibleActionInterface::_ZTV26QAccessibleActionInterface) + 8u) - -Vtable for QAccessibleImageInterface -QAccessibleImageInterface::_ZTV25QAccessibleImageInterface: 7u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI25QAccessibleImageInterface) -8 (int (*)(...))QAccessibleImageInterface::~QAccessibleImageInterface -12 (int (*)(...))QAccessibleImageInterface::~QAccessibleImageInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleImageInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleImageInterface (0xb388df88) 0 nearly-empty - vptr=((& QAccessibleImageInterface::_ZTV25QAccessibleImageInterface) + 8u) - Vtable for QAccessibleBridge QAccessibleBridge::_ZTV17QAccessibleBridge: 6u entries 0 (int (*)(...))0 @@ -6308,56 +6157,6 @@ QRegExpValidator (0xb2ff9f00) 0 QObject (0xb295b460) 0 primary-for QValidator (0xb2ff9f3c) -Vtable for QAccessibleWidget -QAccessibleWidget::_ZTV17QAccessibleWidget: 35u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI17QAccessibleWidget) -8 (int (*)(...))QAccessibleWidget::~QAccessibleWidget -12 (int (*)(...))QAccessibleWidget::~QAccessibleWidget -16 (int (*)(...))QAccessibleObject::isValid -20 (int (*)(...))QAccessibleObject::object -24 (int (*)(...))QAccessibleWidget::window -28 (int (*)(...))QAccessibleWidget::relations -32 (int (*)(...))QAccessibleWidget::focusChild -36 (int (*)(...))QAccessibleObject::childAt -40 (int (*)(...))QAccessibleWidget::parent -44 (int (*)(...))QAccessibleWidget::child -48 (int (*)(...))QAccessibleWidget::childCount -52 (int (*)(...))QAccessibleWidget::indexOfChild -56 (int (*)(...))QAccessibleWidget::text -60 (int (*)(...))QAccessibleObject::setText -64 (int (*)(...))QAccessibleWidget::rect -68 (int (*)(...))QAccessibleWidget::role -72 (int (*)(...))QAccessibleWidget::state -76 (int (*)(...))QAccessibleWidget::foregroundColor -80 (int (*)(...))QAccessibleWidget::backgroundColor -84 (int (*)(...))QAccessibleInterface::virtual_hook -88 (int (*)(...))QAccessibleWidget::interface_cast -92 (int (*)(...))QAccessibleWidget::actionNames -96 (int (*)(...))QAccessibleWidget::doAction -100 (int (*)(...))QAccessibleWidget::keyBindingsForAction -104 (int (*)(...))-0x00000000000000008 -108 (int (*)(...))(& _ZTI17QAccessibleWidget) -112 (int (*)(...))QAccessibleWidget::_ZThn8_N17QAccessibleWidgetD1Ev -116 (int (*)(...))QAccessibleWidget::_ZThn8_N17QAccessibleWidgetD0Ev -120 (int (*)(...))QAccessibleWidget::_ZThn8_NK17QAccessibleWidget11actionNamesEv -124 (int (*)(...))QAccessibleActionInterface::localizedActionName -128 (int (*)(...))QAccessibleActionInterface::localizedActionDescription -132 (int (*)(...))QAccessibleWidget::_ZThn8_N17QAccessibleWidget8doActionERK7QString -136 (int (*)(...))QAccessibleWidget::_ZThn8_NK17QAccessibleWidget20keyBindingsForActionERK7QString - -Class QAccessibleWidget - size=16 align=4 - base size=16 base align=4 -QAccessibleWidget (0xb294d600) 0 - vptr=((& QAccessibleWidget::_ZTV17QAccessibleWidget) + 8u) - QAccessibleObject (0xb2ff9f78) 0 - primary-for QAccessibleWidget (0xb294d600) - QAccessibleInterface (0xb295bd90) 0 nearly-empty - primary-for QAccessibleObject (0xb2ff9f78) - QAccessibleActionInterface (0xb295bdc8) 8 nearly-empty - vptr=((& QAccessibleWidget::_ZTV17QAccessibleWidget) + 112u) - Class QSizePolicy size=4 align=4 base size=4 base align=4 diff --git a/tests/auto/bic/data/QtDesignerComponents.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtDesignerComponents.5.0.0.linux-gcc-ia32.txt index ab667c553..dda839727 100644 --- a/tests/auto/bic/data/QtDesignerComponents.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtDesignerComponents.5.0.0.linux-gcc-ia32.txt @@ -4203,157 +4203,6 @@ QAccessibleTableModelChangeEvent (0xb3b67fb4) 0 QAccessibleEvent (0xb38dba48) 0 primary-for QAccessibleTableModelChangeEvent (0xb3b67fb4) -Vtable for QAccessibleTextInterface -QAccessibleTextInterface::_ZTV24QAccessibleTextInterface: 20u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI24QAccessibleTextInterface) -8 (int (*)(...))QAccessibleTextInterface::~QAccessibleTextInterface -12 (int (*)(...))QAccessibleTextInterface::~QAccessibleTextInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual -36 (int (*)(...))__cxa_pure_virtual -40 (int (*)(...))__cxa_pure_virtual -44 (int (*)(...))__cxa_pure_virtual -48 (int (*)(...))QAccessibleTextInterface::textBeforeOffset -52 (int (*)(...))QAccessibleTextInterface::textAfterOffset -56 (int (*)(...))QAccessibleTextInterface::textAtOffset -60 (int (*)(...))__cxa_pure_virtual -64 (int (*)(...))__cxa_pure_virtual -68 (int (*)(...))__cxa_pure_virtual -72 (int (*)(...))__cxa_pure_virtual -76 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleTextInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleTextInterface (0xb38ee038) 0 nearly-empty - vptr=((& QAccessibleTextInterface::_ZTV24QAccessibleTextInterface) + 8u) - -Vtable for QAccessibleEditableTextInterface -QAccessibleEditableTextInterface::_ZTV32QAccessibleEditableTextInterface: 7u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI32QAccessibleEditableTextInterface) -8 (int (*)(...))QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface -12 (int (*)(...))QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleEditableTextInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleEditableTextInterface (0xb38ee2a0) 0 nearly-empty - vptr=((& QAccessibleEditableTextInterface::_ZTV32QAccessibleEditableTextInterface) + 8u) - -Vtable for QAccessibleValueInterface -QAccessibleValueInterface::_ZTV25QAccessibleValueInterface: 9u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI25QAccessibleValueInterface) -8 (int (*)(...))QAccessibleValueInterface::~QAccessibleValueInterface -12 (int (*)(...))QAccessibleValueInterface::~QAccessibleValueInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleValueInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleValueInterface (0xb38ee508) 0 nearly-empty - vptr=((& QAccessibleValueInterface::_ZTV25QAccessibleValueInterface) + 8u) - -Vtable for QAccessibleTableCellInterface -QAccessibleTableCellInterface::_ZTV29QAccessibleTableCellInterface: 13u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI29QAccessibleTableCellInterface) -8 (int (*)(...))QAccessibleTableCellInterface::~QAccessibleTableCellInterface -12 (int (*)(...))QAccessibleTableCellInterface::~QAccessibleTableCellInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual -36 (int (*)(...))__cxa_pure_virtual -40 (int (*)(...))__cxa_pure_virtual -44 (int (*)(...))__cxa_pure_virtual -48 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleTableCellInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleTableCellInterface (0xb38ee770) 0 nearly-empty - vptr=((& QAccessibleTableCellInterface::_ZTV29QAccessibleTableCellInterface) + 8u) - -Vtable for QAccessibleTableInterface -QAccessibleTableInterface::_ZTV25QAccessibleTableInterface: 23u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI25QAccessibleTableInterface) -8 (int (*)(...))QAccessibleTableInterface::~QAccessibleTableInterface -12 (int (*)(...))QAccessibleTableInterface::~QAccessibleTableInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual -36 (int (*)(...))__cxa_pure_virtual -40 (int (*)(...))__cxa_pure_virtual -44 (int (*)(...))__cxa_pure_virtual -48 (int (*)(...))__cxa_pure_virtual -52 (int (*)(...))__cxa_pure_virtual -56 (int (*)(...))__cxa_pure_virtual -60 (int (*)(...))__cxa_pure_virtual -64 (int (*)(...))__cxa_pure_virtual -68 (int (*)(...))__cxa_pure_virtual -72 (int (*)(...))__cxa_pure_virtual -76 (int (*)(...))__cxa_pure_virtual -80 (int (*)(...))__cxa_pure_virtual -84 (int (*)(...))__cxa_pure_virtual -88 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleTableInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleTableInterface (0xb38ee9d8) 0 nearly-empty - vptr=((& QAccessibleTableInterface::_ZTV25QAccessibleTableInterface) + 8u) - -Vtable for QAccessibleActionInterface -QAccessibleActionInterface::_ZTV26QAccessibleActionInterface: 9u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI26QAccessibleActionInterface) -8 (int (*)(...))QAccessibleActionInterface::~QAccessibleActionInterface -12 (int (*)(...))QAccessibleActionInterface::~QAccessibleActionInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))QAccessibleActionInterface::localizedActionName -24 (int (*)(...))QAccessibleActionInterface::localizedActionDescription -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleActionInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleActionInterface (0xb38eec40) 0 nearly-empty - vptr=((& QAccessibleActionInterface::_ZTV26QAccessibleActionInterface) + 8u) - -Vtable for QAccessibleImageInterface -QAccessibleImageInterface::_ZTV25QAccessibleImageInterface: 7u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI25QAccessibleImageInterface) -8 (int (*)(...))QAccessibleImageInterface::~QAccessibleImageInterface -12 (int (*)(...))QAccessibleImageInterface::~QAccessibleImageInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleImageInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleImageInterface (0xb38eef88) 0 nearly-empty - vptr=((& QAccessibleImageInterface::_ZTV25QAccessibleImageInterface) + 8u) - Vtable for QAccessibleBridge QAccessibleBridge::_ZTV17QAccessibleBridge: 6u entries 0 (int (*)(...))0 @@ -6308,56 +6157,6 @@ QRegExpValidator (0xb305af00) 0 QObject (0xb29bc460) 0 primary-for QValidator (0xb305af3c) -Vtable for QAccessibleWidget -QAccessibleWidget::_ZTV17QAccessibleWidget: 35u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI17QAccessibleWidget) -8 (int (*)(...))QAccessibleWidget::~QAccessibleWidget -12 (int (*)(...))QAccessibleWidget::~QAccessibleWidget -16 (int (*)(...))QAccessibleObject::isValid -20 (int (*)(...))QAccessibleObject::object -24 (int (*)(...))QAccessibleWidget::window -28 (int (*)(...))QAccessibleWidget::relations -32 (int (*)(...))QAccessibleWidget::focusChild -36 (int (*)(...))QAccessibleObject::childAt -40 (int (*)(...))QAccessibleWidget::parent -44 (int (*)(...))QAccessibleWidget::child -48 (int (*)(...))QAccessibleWidget::childCount -52 (int (*)(...))QAccessibleWidget::indexOfChild -56 (int (*)(...))QAccessibleWidget::text -60 (int (*)(...))QAccessibleObject::setText -64 (int (*)(...))QAccessibleWidget::rect -68 (int (*)(...))QAccessibleWidget::role -72 (int (*)(...))QAccessibleWidget::state -76 (int (*)(...))QAccessibleWidget::foregroundColor -80 (int (*)(...))QAccessibleWidget::backgroundColor -84 (int (*)(...))QAccessibleInterface::virtual_hook -88 (int (*)(...))QAccessibleWidget::interface_cast -92 (int (*)(...))QAccessibleWidget::actionNames -96 (int (*)(...))QAccessibleWidget::doAction -100 (int (*)(...))QAccessibleWidget::keyBindingsForAction -104 (int (*)(...))-0x00000000000000008 -108 (int (*)(...))(& _ZTI17QAccessibleWidget) -112 (int (*)(...))QAccessibleWidget::_ZThn8_N17QAccessibleWidgetD1Ev -116 (int (*)(...))QAccessibleWidget::_ZThn8_N17QAccessibleWidgetD0Ev -120 (int (*)(...))QAccessibleWidget::_ZThn8_NK17QAccessibleWidget11actionNamesEv -124 (int (*)(...))QAccessibleActionInterface::localizedActionName -128 (int (*)(...))QAccessibleActionInterface::localizedActionDescription -132 (int (*)(...))QAccessibleWidget::_ZThn8_N17QAccessibleWidget8doActionERK7QString -136 (int (*)(...))QAccessibleWidget::_ZThn8_NK17QAccessibleWidget20keyBindingsForActionERK7QString - -Class QAccessibleWidget - size=16 align=4 - base size=16 base align=4 -QAccessibleWidget (0xb29ae600) 0 - vptr=((& QAccessibleWidget::_ZTV17QAccessibleWidget) + 8u) - QAccessibleObject (0xb305af78) 0 - primary-for QAccessibleWidget (0xb29ae600) - QAccessibleInterface (0xb29bcd90) 0 nearly-empty - primary-for QAccessibleObject (0xb305af78) - QAccessibleActionInterface (0xb29bcdc8) 8 nearly-empty - vptr=((& QAccessibleWidget::_ZTV17QAccessibleWidget) + 112u) - Class QSizePolicy size=4 align=4 base size=4 base align=4 diff --git a/tests/auto/bic/data/QtHelp.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtHelp.5.0.0.linux-gcc-ia32.txt index 7677e979f..7f9db2dbe 100644 --- a/tests/auto/bic/data/QtHelp.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtHelp.5.0.0.linux-gcc-ia32.txt @@ -4203,157 +4203,6 @@ QAccessibleTableModelChangeEvent (0xb3b83ca8) 0 QAccessibleEvent (0xb38b2a48) 0 primary-for QAccessibleTableModelChangeEvent (0xb3b83ca8) -Vtable for QAccessibleTextInterface -QAccessibleTextInterface::_ZTV24QAccessibleTextInterface: 20u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI24QAccessibleTextInterface) -8 (int (*)(...))QAccessibleTextInterface::~QAccessibleTextInterface -12 (int (*)(...))QAccessibleTextInterface::~QAccessibleTextInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual -36 (int (*)(...))__cxa_pure_virtual -40 (int (*)(...))__cxa_pure_virtual -44 (int (*)(...))__cxa_pure_virtual -48 (int (*)(...))QAccessibleTextInterface::textBeforeOffset -52 (int (*)(...))QAccessibleTextInterface::textAfterOffset -56 (int (*)(...))QAccessibleTextInterface::textAtOffset -60 (int (*)(...))__cxa_pure_virtual -64 (int (*)(...))__cxa_pure_virtual -68 (int (*)(...))__cxa_pure_virtual -72 (int (*)(...))__cxa_pure_virtual -76 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleTextInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleTextInterface (0xb38c4038) 0 nearly-empty - vptr=((& QAccessibleTextInterface::_ZTV24QAccessibleTextInterface) + 8u) - -Vtable for QAccessibleEditableTextInterface -QAccessibleEditableTextInterface::_ZTV32QAccessibleEditableTextInterface: 7u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI32QAccessibleEditableTextInterface) -8 (int (*)(...))QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface -12 (int (*)(...))QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleEditableTextInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleEditableTextInterface (0xb38c42a0) 0 nearly-empty - vptr=((& QAccessibleEditableTextInterface::_ZTV32QAccessibleEditableTextInterface) + 8u) - -Vtable for QAccessibleValueInterface -QAccessibleValueInterface::_ZTV25QAccessibleValueInterface: 9u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI25QAccessibleValueInterface) -8 (int (*)(...))QAccessibleValueInterface::~QAccessibleValueInterface -12 (int (*)(...))QAccessibleValueInterface::~QAccessibleValueInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleValueInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleValueInterface (0xb38c4508) 0 nearly-empty - vptr=((& QAccessibleValueInterface::_ZTV25QAccessibleValueInterface) + 8u) - -Vtable for QAccessibleTableCellInterface -QAccessibleTableCellInterface::_ZTV29QAccessibleTableCellInterface: 13u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI29QAccessibleTableCellInterface) -8 (int (*)(...))QAccessibleTableCellInterface::~QAccessibleTableCellInterface -12 (int (*)(...))QAccessibleTableCellInterface::~QAccessibleTableCellInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual -36 (int (*)(...))__cxa_pure_virtual -40 (int (*)(...))__cxa_pure_virtual -44 (int (*)(...))__cxa_pure_virtual -48 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleTableCellInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleTableCellInterface (0xb38c4770) 0 nearly-empty - vptr=((& QAccessibleTableCellInterface::_ZTV29QAccessibleTableCellInterface) + 8u) - -Vtable for QAccessibleTableInterface -QAccessibleTableInterface::_ZTV25QAccessibleTableInterface: 23u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI25QAccessibleTableInterface) -8 (int (*)(...))QAccessibleTableInterface::~QAccessibleTableInterface -12 (int (*)(...))QAccessibleTableInterface::~QAccessibleTableInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual -36 (int (*)(...))__cxa_pure_virtual -40 (int (*)(...))__cxa_pure_virtual -44 (int (*)(...))__cxa_pure_virtual -48 (int (*)(...))__cxa_pure_virtual -52 (int (*)(...))__cxa_pure_virtual -56 (int (*)(...))__cxa_pure_virtual -60 (int (*)(...))__cxa_pure_virtual -64 (int (*)(...))__cxa_pure_virtual -68 (int (*)(...))__cxa_pure_virtual -72 (int (*)(...))__cxa_pure_virtual -76 (int (*)(...))__cxa_pure_virtual -80 (int (*)(...))__cxa_pure_virtual -84 (int (*)(...))__cxa_pure_virtual -88 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleTableInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleTableInterface (0xb38c49d8) 0 nearly-empty - vptr=((& QAccessibleTableInterface::_ZTV25QAccessibleTableInterface) + 8u) - -Vtable for QAccessibleActionInterface -QAccessibleActionInterface::_ZTV26QAccessibleActionInterface: 9u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI26QAccessibleActionInterface) -8 (int (*)(...))QAccessibleActionInterface::~QAccessibleActionInterface -12 (int (*)(...))QAccessibleActionInterface::~QAccessibleActionInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))QAccessibleActionInterface::localizedActionName -24 (int (*)(...))QAccessibleActionInterface::localizedActionDescription -28 (int (*)(...))__cxa_pure_virtual -32 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleActionInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleActionInterface (0xb38c4c40) 0 nearly-empty - vptr=((& QAccessibleActionInterface::_ZTV26QAccessibleActionInterface) + 8u) - -Vtable for QAccessibleImageInterface -QAccessibleImageInterface::_ZTV25QAccessibleImageInterface: 7u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI25QAccessibleImageInterface) -8 (int (*)(...))QAccessibleImageInterface::~QAccessibleImageInterface -12 (int (*)(...))QAccessibleImageInterface::~QAccessibleImageInterface -16 (int (*)(...))__cxa_pure_virtual -20 (int (*)(...))__cxa_pure_virtual -24 (int (*)(...))__cxa_pure_virtual - -Class QAccessibleImageInterface - size=4 align=4 - base size=4 base align=4 -QAccessibleImageInterface (0xb38c4f88) 0 nearly-empty - vptr=((& QAccessibleImageInterface::_ZTV25QAccessibleImageInterface) + 8u) - Vtable for QAccessibleBridge QAccessibleBridge::_ZTV17QAccessibleBridge: 6u entries 0 (int (*)(...))0 @@ -6308,56 +6157,6 @@ QRegExpValidator (0xb2f07bf4) 0 QObject (0xb299c460) 0 primary-for QValidator (0xb2f07c30) -Vtable for QAccessibleWidget -QAccessibleWidget::_ZTV17QAccessibleWidget: 35u entries -0 (int (*)(...))0 -4 (int (*)(...))(& _ZTI17QAccessibleWidget) -8 (int (*)(...))QAccessibleWidget::~QAccessibleWidget -12 (int (*)(...))QAccessibleWidget::~QAccessibleWidget -16 (int (*)(...))QAccessibleObject::isValid -20 (int (*)(...))QAccessibleObject::object -24 (int (*)(...))QAccessibleWidget::window -28 (int (*)(...))QAccessibleWidget::relations -32 (int (*)(...))QAccessibleWidget::focusChild -36 (int (*)(...))QAccessibleObject::childAt -40 (int (*)(...))QAccessibleWidget::parent -44 (int (*)(...))QAccessibleWidget::child -48 (int (*)(...))QAccessibleWidget::childCount -52 (int (*)(...))QAccessibleWidget::indexOfChild -56 (int (*)(...))QAccessibleWidget::text -60 (int (*)(...))QAccessibleObject::setText -64 (int (*)(...))QAccessibleWidget::rect -68 (int (*)(...))QAccessibleWidget::role -72 (int (*)(...))QAccessibleWidget::state -76 (int (*)(...))QAccessibleWidget::foregroundColor -80 (int (*)(...))QAccessibleWidget::backgroundColor -84 (int (*)(...))QAccessibleInterface::virtual_hook -88 (int (*)(...))QAccessibleWidget::interface_cast -92 (int (*)(...))QAccessibleWidget::actionNames -96 (int (*)(...))QAccessibleWidget::doAction -100 (int (*)(...))QAccessibleWidget::keyBindingsForAction -104 (int (*)(...))-0x00000000000000008 -108 (int (*)(...))(& _ZTI17QAccessibleWidget) -112 (int (*)(...))QAccessibleWidget::_ZThn8_N17QAccessibleWidgetD1Ev -116 (int (*)(...))QAccessibleWidget::_ZThn8_N17QAccessibleWidgetD0Ev -120 (int (*)(...))QAccessibleWidget::_ZThn8_NK17QAccessibleWidget11actionNamesEv -124 (int (*)(...))QAccessibleActionInterface::localizedActionName -128 (int (*)(...))QAccessibleActionInterface::localizedActionDescription -132 (int (*)(...))QAccessibleWidget::_ZThn8_N17QAccessibleWidget8doActionERK7QString -136 (int (*)(...))QAccessibleWidget::_ZThn8_NK17QAccessibleWidget20keyBindingsForActionERK7QString - -Class QAccessibleWidget - size=16 align=4 - base size=16 base align=4 -QAccessibleWidget (0xb299d300) 0 - vptr=((& QAccessibleWidget::_ZTV17QAccessibleWidget) + 8u) - QAccessibleObject (0xb2f07c6c) 0 - primary-for QAccessibleWidget (0xb299d300) - QAccessibleInterface (0xb299cd90) 0 nearly-empty - primary-for QAccessibleObject (0xb2f07c6c) - QAccessibleActionInterface (0xb299cdc8) 8 nearly-empty - vptr=((& QAccessibleWidget::_ZTV17QAccessibleWidget) + 112u) - Class QSizePolicy size=4 align=4 base size=4 base align=4 diff --git a/tests/auto/linguist/lconvert/data/codec-cp1252.ts b/tests/auto/linguist/lconvert/data/codec-cp1252.ts deleted file mode 100644 index 5ffa2f3d6..000000000 --- a/tests/auto/linguist/lconvert/data/codec-cp1252.ts +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<defaultcodec>windows-1252</defaultcodec> -<context> - <name>FooBar</name> - <message> - <location filename="main.cpp" line="10"/> - <source>random ascii only</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="main.cpp" line="11"/> - <source>this contains an umlaut ü &uuml;</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="main.cpp" line="12"/> - <source>random ascii only in utf8</source> - <translation type="unfinished"></translation> - </message> - <message utf8="true"> - <location filename="main.cpp" line="13"/> - <source>umlaut ü &uuml; in utf8</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lconvert/data/codec-utf8.ts b/tests/auto/linguist/lconvert/data/codec-utf8.ts index 0ebdbfdd6..1a2b626fb 100644 --- a/tests/auto/linguist/lconvert/data/codec-utf8.ts +++ b/tests/auto/linguist/lconvert/data/codec-utf8.ts @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0"> -<defaultcodec>UTF-8</defaultcodec> <context> <name>FooBar</name> <message> diff --git a/tests/auto/linguist/lconvert/data/dual-encoding.ts b/tests/auto/linguist/lconvert/data/dual-encoding.ts deleted file mode 100644 index 5023a04d9..000000000 --- a/tests/auto/linguist/lconvert/data/dual-encoding.ts +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name></name> - <message utf8="both"> - <source>Mühsam</source> - <translation>tedious</translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lconvert/data/test11.ts b/tests/auto/linguist/lconvert/data/test11.ts deleted file mode 100644 index aeb46af9f..000000000 --- a/tests/auto/linguist/lconvert/data/test11.ts +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="1.1" language="de_DE"> -<context> - <name>FindDialog</name> - <message> - <location filename="finddialog.cpp" line="57"/> - <source>Enter the text you want to find.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="finddialog.cpp" line="107"/> - <source>Search reached end of the document</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="finddialog.cpp" line="109"/> - <source>Search reached start of the document</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="finddialog.cpp" line="111"/> - <source>Text not found</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="finddialog.cpp" line="122"/> - <source>Should be obsolete</source> - <translation type="unfinished">SHOULD BE OBSOLETE</translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lconvert/tst_lconvert.cpp b/tests/auto/linguist/lconvert/tst_lconvert.cpp index 83f58539f..b6608a8cf 100644 --- a/tests/auto/linguist/lconvert/tst_lconvert.cpp +++ b/tests/auto/linguist/lconvert/tst_lconvert.cpp @@ -285,9 +285,7 @@ void tst_lconvert::roundtrips_data() QStringList poTsPo; poTsPo << "po" << "ts" << "po"; QStringList poXlfPo; poXlfPo << "po" << "xlf" << "po"; - QStringList tsTs11Ts; tsTs11Ts << "ts" << "ts11" << "ts"; QStringList tsPoTs; tsPoTs << "ts" << "po" << "ts"; - QStringList ts11PoTs11; ts11PoTs11 << "ts11" << "po" << "ts11"; QStringList tsXlfTs; tsXlfTs << "ts" << "xlf" << "ts"; QStringList tsQmTs; tsQmTs << "ts" << "qm" << "ts"; @@ -301,7 +299,6 @@ void tst_lconvert::roundtrips_data() QTest::newRow("po-ts-po (developer comment)") << "test-developer-comment.po" << poTsPo << noArgs; QTest::newRow("po-xliff-po (developer comment)") << "test-developer-comment.po" << poXlfPo << noArgs; - QTest::newRow("ts11-po-ts11") << "test11.ts" << ts11PoTs11 << filterPoArgs; QTest::newRow("ts20-po-ts20") << "test20.ts" << tsPoTs << filterPoArgs; QTest::newRow("po-ts-po (de)") << "test1-de.po" << poTsPo << noArgs; QTest::newRow("po-ts-po (cn)") << "test1-cn.po" << poTsPo << noArgs; @@ -319,11 +316,6 @@ void tst_lconvert::roundtrips_data() QTest::newRow("po-ts-po (references)") << "test-refs.po" << poTsPo << noArgs; - QTest::newRow("ts20-ts11-ts20 (utf8)") << "codec-utf8.ts" << tsTs11Ts << noArgs; - QTest::newRow("ts20-ts11-ts20 (cp1252)") << "codec-cp1252.ts" << tsTs11Ts << noArgs; - QTest::newRow("ts20-ts11-ts20 (dual-encoding)") << "dual-encoding.ts" << tsTs11Ts << noArgs; - - QTest::newRow("ts-qm-ts (dual-encoding)") << "dual-encoding.ts" << tsQmTs << noArgs; QTest::newRow("ts-qm-ts (plurals-de)") << "plurals-de.ts" << tsQmTs << outDeArgs; QTest::newRow("ts-qm-ts (plurals-cn)") << "plurals-cn.ts" << tsQmTs << outCnArgs; QTest::newRow("ts-qm-ts (variants)") << "variants.ts" << tsQmTs << outDeArgs; diff --git a/tests/auto/linguist/lrelease/testdata/dupes.ts b/tests/auto/linguist/lrelease/testdata/dupes.ts index ec368c327..79bc4506b 100644 --- a/tests/auto/linguist/lrelease/testdata/dupes.ts +++ b/tests/auto/linguist/lrelease/testdata/dupes.ts @@ -3,10 +3,6 @@ <TS version="1.1"> <context> <name>FindDialog</name> - <message utf8="true"> - <source>Search reached start of the document</source> - <translation type="unfinished"></translation> - </message> <message> <location filename="finddialog.cpp" line="109"/> <source>Search reached start of the document</source> diff --git a/tests/auto/linguist/lrelease/testdata/mixedcodecs-ts11.ts b/tests/auto/linguist/lrelease/testdata/mixedcodecs-ts11.ts deleted file mode 100644 index 991f35432..000000000 --- a/tests/auto/linguist/lrelease/testdata/mixedcodecs-ts11.ts +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="1.1"> -<defaultcodec>windows-1252</defaultcodec> -<context> - <name>FooBar</name> - <message> - <location filename="main.cpp" line="11"/> - <source>this contains an umlaut ü &uuml;</source> - <translation>random stuff with umlaut</translation> - </message> - <message encoding="UTF-8"> - <location filename="main.cpp" line="13"/> - <source>umlaut ü &uuml; in utf8</source> - <translation>more random stuff with umlaut</translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lrelease/testdata/mixedcodecs-ts20.ts b/tests/auto/linguist/lrelease/testdata/mixedcodecs-ts20.ts deleted file mode 100644 index 8bb56d43f..000000000 --- a/tests/auto/linguist/lrelease/testdata/mixedcodecs-ts20.ts +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<defaultcodec>windows-1252</defaultcodec> -<context> - <name>FooBar</name> - <message> - <location filename="main.cpp" line="11"/> - <source>this contains an umlaut ü &uuml;</source> - <translation>random stuff with umlaut</translation> - </message> - <message utf8="true"> - <location filename="main.cpp" line="13"/> - <source>umlaut ü &uuml; in utf8</source> - <translation>more random stuff with umlaut</translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lrelease/tst_lrelease.cpp b/tests/auto/linguist/lrelease/tst_lrelease.cpp index fc9f96d5f..f53eca36d 100644 --- a/tests/auto/linguist/lrelease/tst_lrelease.cpp +++ b/tests/auto/linguist/lrelease/tst_lrelease.cpp @@ -60,7 +60,6 @@ private: private slots: void translate(); - void mixedcodecs(); void compressed(); void idbased(); void markuntranslated(); @@ -156,9 +155,9 @@ void tst_lrelease::translate() QCOMPARE(tr("There are %n cars", "More Plurals", 3) , QString("There are 3 cars")); - QCOMPARE(QCoreApplication::translate("no_en", "Kj\370r K\345re, kj\346re"), QString::fromLatin1("Drive K\345re, dear")); - QCOMPARE(QCoreApplication::translate("en_no", "Drive K\345re, dear"), QString::fromLatin1("Kj\370r K\345re, kj\346re")); - QCOMPARE(QCoreApplication::translate("en_ch", "Chinese symbol:"), QString::fromLatin1("Chinese symbol:%1").arg(QChar(0x7c1f))); + QCOMPARE(QCoreApplication::translate("no_en", "Kj\xc3\xb8r K\xc3\xa5re, kj\xc3\xa6re"), QString::fromUtf8("Drive K\xc3\xa5re, dear")); + QCOMPARE(QCoreApplication::translate("en_no", "Drive K\xc3\xa5re, dear"), QString::fromUtf8("Kj\xc3\xb8r K\xc3\xa5re, kj\xc3\xa6re")); + QCOMPARE(QCoreApplication::translate("en_ch", "Chinese symbol:"), QString::fromUtf8("Chinese symbol:\xe7\xb0\x9f")); // printf("halo\r\nhallo"); // QCOMPARE(tr("This\r\nwill fail"), QString("THIS\nWILL FAIL")); // \r\n = 0d 0a @@ -171,26 +170,6 @@ void tst_lrelease::translate() qApp->removeTranslator(&translator); } -void tst_lrelease::mixedcodecs() -{ - QVERIFY(!QProcess::execute(binDir + "/lrelease " + dataDir + "mixedcodecs-ts11.ts")); - QVERIFY(!QProcess::execute(binDir + "/lrelease " + dataDir + "mixedcodecs-ts20.ts")); -#ifdef Q_OS_WIN - QVERIFY(!QProcess::execute("fc /b testdata\\mixedcodecs-ts11.qm testdata\\mixedcodecs-ts20.qm")); -#else - QVERIFY(!QProcess::execute("cmp " + dataDir + "mixedcodecs-ts11.qm " + dataDir + "mixedcodecs-ts20.qm")); -#endif - - QTranslator translator; - QVERIFY(translator.load(dataDir + "mixedcodecs-ts11.qm")); - qApp->installTranslator(&translator); - - QCOMPARE(QCoreApplication::translate("FooBar", "this contains an umlaut \xfc ü"), - QString::fromLatin1("random stuff with umlaut")); - QCOMPARE(QCoreApplication::translate("FooBar", "umlaut \xc3\xbc ü in utf8"), - QString::fromLatin1("more random stuff with umlaut")); -} - void tst_lrelease::compressed() { QVERIFY(!QProcess::execute(binDir + "/lrelease -compress " + dataDir + "compressed.ts")); diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp index 16594c15e..91e3c5e71 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp @@ -47,7 +47,7 @@ int main(int argc, char **argv) { QApplication a(argc, argv); - QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); + QWidget w; QLabel label1(QObject::tr("abc", "ascii"), &w); diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.pro index f133c60d2..3779ef0e7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.pro +++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.pro @@ -3,6 +3,5 @@ CONFIG+= console TRANSLATIONS = project.ts -CODECFORTR = utf-8 CODECFORSRC = utf-8 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result index 711bf025a..b1a40ade8 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0"> -<defaultcodec>UTF-8</defaultcodec> <context> <name>QObject</name> <message> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp deleted file mode 100644 index 436039fa2..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QApplication> -#include <QtGui> -#include <QtCore> -#include <QTextCodec> - -int main(int argc, char **argv) -{ - QApplication a(argc, argv); - QTranslator trans(0); - - trans.load("t1_en", "."); - - a.installTranslator(&trans); - QWidget w; -/* - QLabel label1(QObject::tr("\33"), &w); - QLabel label2(QObject::tr("\32"), &w); - QLabel label3(QObject::tr("\176"), &w); -*/ - QLabel label4(QObject::tr("\301"), &w); - - w.show(); - return a.exec(); -} diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.pro deleted file mode 100644 index 884fc5273..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.pro +++ /dev/null @@ -1,7 +0,0 @@ -SOURCES += main.cpp -CONFIG+= console - -TRANSLATIONS = project.ts - -CODECFORTR = CP1251 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result deleted file mode 100644 index 6ee369a78..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<defaultcodec>windows-1251</defaultcodec> -<context> - <name>QObject</name> - <message> - <location filename="main.cpp" line="61"/> - <source>Б</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp deleted file mode 100644 index deea8031f..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QtCore> - -class FooBar : QObject -{ - Q_OBJECT - -public: - void doFoo() - { - tr("random ascii only"); - tr("this contains an umlaut ü ü literally"); - tr("this contains an umlaut \xfc ü escaped"); - trUtf8("random ascii only in utf8"); - trUtf8("umlaut ü ü in literal utf8"); - trUtf8("umlaut \303\274 ü in escaped utf8"); - } -}; - -int main(int argc, char **argv) -{ - return 0; -} diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.pro deleted file mode 100644 index 6d21e0d2f..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.pro +++ /dev/null @@ -1,7 +0,0 @@ -SOURCES += main.cpp -CONFIG += console - -TRANSLATIONS = project.ts - -CODECFORTR = CP1252 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result deleted file mode 100644 index d548e2465..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<defaultcodec>windows-1252</defaultcodec> -<context> - <name>FooBar</name> - <message> - <location filename="main.cpp" line="51"/> - <source>random ascii only</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="main.cpp" line="52"/> - <source>this contains an umlaut ü &uuml; literally</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="main.cpp" line="53"/> - <source>this contains an umlaut ü &uuml; escaped</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="main.cpp" line="54"/> - <source>random ascii only in utf8</source> - <translation type="unfinished"></translation> - </message> - <message utf8="true"> - <location filename="main.cpp" line="55"/> - <source>umlaut ü &uuml; in literal utf8</source> - <translation type="unfinished"></translation> - </message> - <message utf8="true"> - <location filename="main.cpp" line="56"/> - <source>umlaut ü &uuml; in escaped utf8</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp deleted file mode 100644 index a5fb61fee..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QtCore> - -class FooBar : QObject -{ - Q_OBJECT - -public: - void doFoo() - { - tr("random ascii only"); - tr("this contains an umlaut ü ü literally"); - tr("this contains an umlaut \303\274 ü escaped, really in utf-8"); - trUtf8("random ascii only in utf8"); - trUtf8("umlaut \303\274 ü in escaped utf8"); - } -}; - -int main(int argc, char **argv) -{ - return 0; -} diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.pro deleted file mode 100644 index 8918087e8..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.pro +++ /dev/null @@ -1,8 +0,0 @@ -SOURCES += main.cpp -CONFIG += console - -TRANSLATIONS = project.ts - -CODECFORSRC = CP1252 -CODECFORTR = UTF-8 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result deleted file mode 100644 index 6728a256b..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<defaultcodec>UTF-8</defaultcodec> -<context> - <name>FooBar</name> - <message> - <location filename="main.cpp" line="51"/> - <source>random ascii only</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="main.cpp" line="52"/> - <source>this contains an umlaut ü &uuml; literally</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="main.cpp" line="53"/> - <source>this contains an umlaut ü &uuml; escaped, really in utf-8</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="main.cpp" line="54"/> - <source>random ascii only in utf8</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="main.cpp" line="55"/> - <source>umlaut ü &uuml; in escaped utf8</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt deleted file mode 100644 index feecddace..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/expectedoutput.txt +++ /dev/null @@ -1 +0,0 @@ -lupdate warning: Codec for tr\(\) 'ISO-8859-1' disagrees with existing file's codec 'UTF-8'\. Expect trouble\. diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp deleted file mode 100644 index 757ccc95b..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/main.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -int main(int argc, char **argv) -{ - QObject::tr("hi"); -} diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro deleted file mode 100644 index 1a2f50e41..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.pro +++ /dev/null @@ -1,5 +0,0 @@ -SOURCES += main.cpp - -TRANSLATIONS = project.ts -CODECFORTR = latin1 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before deleted file mode 100644 index 07ad79b82..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.before +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<defaultcodec>UTF-8</defaultcodec> -<context> - <name>QObject</name> - <message> - <location filename="main.cpp" line="44"/> - <source>hi</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result deleted file mode 100644 index b6899c162..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr3/project.ts.result +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>QObject</name> - <message> - <location filename="main.cpp" line="44"/> - <source>hi</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt deleted file mode 100644 index e69de29bb..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/expectedoutput.txt +++ /dev/null diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp deleted file mode 100644 index 757ccc95b..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/main.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -int main(int argc, char **argv) -{ - QObject::tr("hi"); -} diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro deleted file mode 100644 index 2d08a07de..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.pro +++ /dev/null @@ -1,5 +0,0 @@ -SOURCES += main.cpp - -TRANSLATIONS = project.ts -CODECFORTR = latin2 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before deleted file mode 100644 index e18e34e0e..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.before +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<defaultcodec>ISO-8859-2</defaultcodec> -<context> - <name>QObject</name> - <message> - <location filename="main.cpp" line="44"/> - <source>hi</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result deleted file mode 100644 index e18e34e0e..000000000 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr4/project.ts.result +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<defaultcodec>ISO-8859-2</defaultcodec> -<context> - <name>QObject</name> - <message> - <location filename="main.cpp" line="44"/> - <source>hi</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp index 7d3f63839..9f47f3176 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp @@ -51,9 +51,9 @@ class Dialog2 : public QDialog void Dialog2::func() { - tr("cat\351gorie"); + tr("cat\xc3\xa9gorie"); - tr("F\374r \310lise") + tr("F\xc3\xbcr \xc3\x88lise") } diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result index 7d87d17c6..c8cca3f04 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result @@ -134,7 +134,7 @@ backslashed \ stuff.</source> </context> <context> <name>KÃ¥ntekst</name> - <message utf8="true"> + <message> <location filename="finddialog.cpp" line="180"/> <source>encoding, using QApplication</source> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/parseui/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parseui/project.ts.result index b27d23991..d53c6d8e4 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parseui/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parseui/project.ts.result @@ -8,7 +8,7 @@ <source>Qt Assistant - Finn text</source> <translation type="unfinished"></translation> </message> - <message utf8="true"> + <message> <location filename="project.ui" line="58"/> <source>Finn tekst - Der Bjørn möchte auch mal.</source> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result index cddb9632f..ca9504eb5 100644 --- a/tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_full/project_sub.ts.result @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0"> -<defaultcodec>ISO-8859-2</defaultcodec> <context> <name>subsub2</name> <message> diff --git a/tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result index cddb9632f..ca9504eb5 100644 --- a/tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/recurse_part/project_sub.ts.result @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0"> -<defaultcodec>ISO-8859-2</defaultcodec> <context> <name>subsub2</name> <message> diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro index afbcd9cf7..26a954a26 100644 --- a/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro +++ b/tests/auto/linguist/lupdate/testdata/subdirs_full/subdir2/subsub2/subsub2.pro @@ -1,5 +1,4 @@ SOURCES += main.cpp TRANSLATIONS = ../../project_sub.ts -CODECFORTR = ISO-8859-2 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro index afbcd9cf7..26a954a26 100644 --- a/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro +++ b/tests/auto/linguist/lupdate/testdata/subdirs_part/subdir2/subsub2/subsub2.pro @@ -1,5 +1,4 @@ SOURCES += main.cpp TRANSLATIONS = ../../project_sub.ts -CODECFORTR = ISO-8859-2 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 |