From cee61fe9e164265bff3ba72753576add8264f26e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 13 Sep 2010 14:58:26 +0200 Subject: Doc: Fixed text in license headers. --- .../animation/basics/color-animation.qml | 2 +- .../animation/basics/property-animation.qml | 2 +- .../declarative/animation/behaviors/SideRect.qml | 2 +- .../animation/behaviors/behavior-example.qml | 2 +- .../animation/easing/content/QuitButton.qml | 2 +- examples/declarative/animation/easing/easing.qml | 2 +- examples/declarative/animation/states/states.qml | 2 +- .../declarative/animation/states/transitions.qml | 2 +- .../imageprovider/imageprovider-example.qml | 2 +- .../networkaccessmanagerfactory/view.qml | 2 +- .../plugins/com/nokia/TimeExample/Clock.qml | 2 +- .../declarative/cppextensions/plugins/plugins.qml | 2 +- .../qgraphicslayouts/layoutitem/layoutitem.qml | 2 +- .../qgraphicsgridlayout/gridlayout.cpp | 2 +- .../qgraphicsgridlayout/gridlayout.h | 2 +- .../qgraphicsgridlayout/qgraphicsgridlayout.qml | 2 +- .../qgraphicslinearlayout/linearlayout.cpp | 2 +- .../qgraphicslinearlayout/linearlayout.h | 2 +- .../qgraphicslinearlayout.qml | 2 +- .../cppextensions/qwidgets/qwidgets.qml | 2 +- .../referenceexamples/adding/example.qml | 2 +- .../referenceexamples/attached/example.qml | 2 +- .../referenceexamples/binding/example.qml | 2 +- .../referenceexamples/coercion/example.qml | 2 +- .../referenceexamples/default/example.qml | 2 +- .../referenceexamples/extended/example.qml | 2 +- .../referenceexamples/grouped/example.qml | 2 +- .../referenceexamples/methods/example.qml | 2 +- .../referenceexamples/properties/example.qml | 2 +- .../referenceexamples/signal/example.qml | 2 +- .../referenceexamples/valuesource/example.qml | 2 +- examples/declarative/i18n/i18n.qml | 2 +- .../imageelements/borderimage/borderimage.qml | 2 +- .../borderimage/content/MyBorderImage.qml | 2 +- .../borderimage/content/ShadowRectangle.qml | 2 +- .../imageelements/borderimage/shadows.qml | 2 +- .../declarative/imageelements/image/ImageCell.qml | 2 +- examples/declarative/imageelements/image/image.qml | 2 +- .../keyinteraction/focus/Core/ContextMenu.qml | 2 +- .../keyinteraction/focus/Core/GridMenu.qml | 2 +- .../keyinteraction/focus/Core/ListMenu.qml | 2 +- .../keyinteraction/focus/Core/ListViewDelegate.qml | 2 +- .../declarative/keyinteraction/focus/focus.qml | 2 +- .../modelviews/abstractitemmodel/main.cpp | 2 +- .../modelviews/abstractitemmodel/model.cpp | 2 +- .../modelviews/abstractitemmodel/model.h | 2 +- .../modelviews/abstractitemmodel/view.qml | 2 +- .../modelviews/gridview/gridview-example.qml | 2 +- .../modelviews/listview/content/PetsModel.qml | 2 +- .../listview/content/PressAndHoldButton.qml | 2 +- .../modelviews/listview/content/RecipesModel.qml | 2 +- .../modelviews/listview/content/TextButton.qml | 2 +- .../modelviews/listview/dynamiclist.qml | 2 +- .../modelviews/listview/expandingdelegates.qml | 2 +- .../declarative/modelviews/listview/highlight.qml | 2 +- .../modelviews/listview/highlightranges.qml | 2 +- .../declarative/modelviews/listview/sections.qml | 2 +- .../modelviews/objectlistmodel/dataobject.cpp | 2 +- .../modelviews/objectlistmodel/dataobject.h | 2 +- .../modelviews/objectlistmodel/view.qml | 2 +- .../declarative/modelviews/package/Delegate.qml | 2 +- examples/declarative/modelviews/package/view.qml | 2 +- .../declarative/modelviews/parallax/parallax.qml | 2 +- .../modelviews/parallax/qml/ParallaxView.qml | 2 +- .../declarative/modelviews/parallax/qml/Smiley.qml | 2 +- .../modelviews/pathview/pathview-example.qml | 2 +- .../modelviews/stringlistmodel/view.qml | 2 +- .../modelviews/visualitemmodel/visualitemmodel.qml | 2 +- examples/declarative/modelviews/webview/alerts.qml | 2 +- .../declarative/modelviews/webview/autosize.qml | 2 +- .../modelviews/webview/content/Mapping/Map.qml | 2 +- .../declarative/modelviews/webview/googlemaps.qml | 2 +- .../declarative/modelviews/webview/inlinehtml.qml | 2 +- .../declarative/modelviews/webview/newwindows.qml | 2 +- examples/declarative/positioners/Button.qml | 2 +- examples/declarative/positioners/positioners.qml | 2 +- .../declarative/screenorientation/Core/Bubble.qml | 2 +- .../declarative/screenorientation/Core/Button.qml | 2 +- .../screenorientation/Core/screenorientation.js | 2 +- .../screenorientation/screenorientation.qml | 2 +- examples/declarative/sqllocalstorage/hello.qml | 2 +- examples/declarative/text/fonts/availableFonts.qml | 2 +- examples/declarative/text/fonts/banner.qml | 2 +- examples/declarative/text/fonts/fonts.qml | 2 +- examples/declarative/text/fonts/hello.qml | 2 +- .../text/textselection/textselection.qml | 2 +- .../threading/threadedlistmodel/dataloader.js | 40 ++++++++++++++++++++++ .../threadedlistmodel/threadedlistmodel.qmlproject | 40 ++++++++++++++++++++++ .../threading/threadedlistmodel/timedisplay.qml | 2 +- .../threading/workerscript/workerscript.qml | 2 +- .../gestures/experimental-gestures.qml | 2 +- .../mousearea/mousearea-example.qml | 2 +- examples/declarative/toys/clocks/clocks.qml | 2 +- examples/declarative/toys/clocks/content/Clock.qml | 2 +- .../declarative/toys/clocks/content/QuitButton.qml | 2 +- examples/declarative/toys/corkboards/Day.qml | 2 +- .../declarative/toys/corkboards/corkboards.qml | 2 +- .../declarative/toys/dynamicscene/dynamicscene.qml | 2 +- .../declarative/toys/dynamicscene/qml/Button.qml | 2 +- .../toys/dynamicscene/qml/GenericSceneItem.qml | 2 +- .../toys/dynamicscene/qml/PaletteItem.qml | 2 +- .../toys/dynamicscene/qml/PerspectiveItem.qml | 2 +- examples/declarative/toys/dynamicscene/qml/Sun.qml | 2 +- .../toys/tic-tac-toe/content/Button.qml | 2 +- .../toys/tic-tac-toe/content/TicTac.qml | 2 +- .../declarative/toys/tic-tac-toe/tic-tac-toe.qml | 2 +- examples/declarative/toys/tvtennis/tvtennis.qml | 2 +- .../tutorials/extending/chapter1-basics/app.qml | 2 +- .../tutorials/extending/chapter2-methods/app.qml | 2 +- .../tutorials/extending/chapter3-bindings/app.qml | 2 +- .../extending/chapter4-customPropertyTypes/app.qml | 2 +- .../extending/chapter5-listproperties/app.qml | 2 +- .../tutorials/extending/chapter6-plugins/app.qml | 2 +- examples/declarative/tutorials/helloworld/Cell.qml | 2 +- .../declarative/tutorials/helloworld/tutorial1.qml | 2 +- .../declarative/tutorials/helloworld/tutorial2.qml | 2 +- .../declarative/tutorials/helloworld/tutorial3.qml | 2 +- .../tutorials/samegame/samegame1/Block.qml | 2 +- .../tutorials/samegame/samegame1/Button.qml | 2 +- .../tutorials/samegame/samegame1/samegame.qml | 2 +- .../tutorials/samegame/samegame2/Block.qml | 2 +- .../tutorials/samegame/samegame2/Button.qml | 2 +- .../tutorials/samegame/samegame2/samegame.qml | 2 +- .../tutorials/samegame/samegame3/Block.qml | 2 +- .../tutorials/samegame/samegame3/Button.qml | 2 +- .../tutorials/samegame/samegame3/Dialog.qml | 2 +- .../tutorials/samegame/samegame3/samegame.qml | 2 +- .../samegame/samegame4/content/BoomBlock.qml | 2 +- .../samegame/samegame4/content/Button.qml | 2 +- .../samegame/samegame4/content/Dialog.qml | 2 +- .../tutorials/samegame/samegame4/samegame.qml | 2 +- .../ui-components/dialcontrol/content/Dial.qml | 2 +- .../dialcontrol/content/QuitButton.qml | 2 +- .../ui-components/dialcontrol/dialcontrol.qml | 2 +- .../ui-components/flipable/content/Card.qml | 2 +- .../ui-components/flipable/flipable.qml | 2 +- .../progressbar/content/ProgressBar.qml | 2 +- .../declarative/ui-components/progressbar/main.qml | 2 +- .../ui-components/scrollbar/ScrollBar.qml | 2 +- .../declarative/ui-components/scrollbar/main.qml | 2 +- .../ui-components/searchbox/SearchBox.qml | 2 +- .../declarative/ui-components/searchbox/main.qml | 2 +- .../ui-components/slideswitch/content/Switch.qml | 2 +- .../ui-components/slideswitch/slideswitch.qml | 2 +- .../ui-components/spinner/content/Spinner.qml | 2 +- .../declarative/ui-components/spinner/main.qml | 2 +- .../ui-components/tabwidget/TabWidget.qml | 2 +- .../declarative/ui-components/tabwidget/main.qml | 2 +- .../xml/xmlhttprequest/xmlhttprequest-example.qml | 2 +- 149 files changed, 227 insertions(+), 147 deletions(-) diff --git a/examples/declarative/animation/basics/color-animation.qml b/examples/declarative/animation/basics/color-animation.qml index 6d8b46c..182bb54 100644 --- a/examples/declarative/animation/basics/color-animation.qml +++ b/examples/declarative/animation/basics/color-animation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/animation/basics/property-animation.qml b/examples/declarative/animation/basics/property-animation.qml index 69d166a..5149f5b 100644 --- a/examples/declarative/animation/basics/property-animation.qml +++ b/examples/declarative/animation/basics/property-animation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/animation/behaviors/SideRect.qml b/examples/declarative/animation/behaviors/SideRect.qml index 76cb3f5..eba0817 100644 --- a/examples/declarative/animation/behaviors/SideRect.qml +++ b/examples/declarative/animation/behaviors/SideRect.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/animation/behaviors/behavior-example.qml b/examples/declarative/animation/behaviors/behavior-example.qml index adefb9e..268d6e5 100644 --- a/examples/declarative/animation/behaviors/behavior-example.qml +++ b/examples/declarative/animation/behaviors/behavior-example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/animation/easing/content/QuitButton.qml b/examples/declarative/animation/easing/content/QuitButton.qml index 039694d..9dfe9bd 100644 --- a/examples/declarative/animation/easing/content/QuitButton.qml +++ b/examples/declarative/animation/easing/content/QuitButton.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/animation/easing/easing.qml b/examples/declarative/animation/easing/easing.qml index b53cb98..0089452 100644 --- a/examples/declarative/animation/easing/easing.qml +++ b/examples/declarative/animation/easing/easing.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/animation/states/states.qml b/examples/declarative/animation/states/states.qml index 34cdae3..4f3e28c 100644 --- a/examples/declarative/animation/states/states.qml +++ b/examples/declarative/animation/states/states.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/animation/states/transitions.qml b/examples/declarative/animation/states/transitions.qml index 884779c..6efcdba 100644 --- a/examples/declarative/animation/states/transitions.qml +++ b/examples/declarative/animation/states/transitions.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml b/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml index 1ef97fa..58536bf 100644 --- a/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml +++ b/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml index 4b849e0..439740a 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml index 6b2676e..c7d2757 100644 --- a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml +++ b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/plugins/plugins.qml b/examples/declarative/cppextensions/plugins/plugins.qml index 8d1085c..3aa0995 100644 --- a/examples/declarative/cppextensions/plugins/plugins.qml +++ b/examples/declarative/cppextensions/plugins/plugins.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/layoutitem.qml b/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/layoutitem.qml index 6f377c5..571e427 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/layoutitem.qml +++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/layoutitem.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.cpp b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.cpp index b52305e..79d3f4c 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.cpp +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.cpp @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.h b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.h index ca2cedc..a9818a0 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.h +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/gridlayout.h @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.qml b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.qml index 50026f1..fd3aa03 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.qml +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.cpp b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.cpp index d0e9783..e8b2daa 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.cpp +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.cpp @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.h b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.h index d9391ca..985b335 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.h +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/linearlayout.h @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.qml b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.qml index 9a0bd55..24992d5 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.qml +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.qml b/examples/declarative/cppextensions/qwidgets/qwidgets.qml index c1edc80..16e9227 100644 --- a/examples/declarative/cppextensions/qwidgets/qwidgets.qml +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/referenceexamples/adding/example.qml b/examples/declarative/cppextensions/referenceexamples/adding/example.qml index da3ddfc..de9a5c6 100644 --- a/examples/declarative/cppextensions/referenceexamples/adding/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/adding/example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/referenceexamples/attached/example.qml b/examples/declarative/cppextensions/referenceexamples/attached/example.qml index 62f336d..ad21879 100644 --- a/examples/declarative/cppextensions/referenceexamples/attached/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/attached/example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/referenceexamples/binding/example.qml b/examples/declarative/cppextensions/referenceexamples/binding/example.qml index 8f359b0..b8731a4 100644 --- a/examples/declarative/cppextensions/referenceexamples/binding/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/binding/example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/example.qml b/examples/declarative/cppextensions/referenceexamples/coercion/example.qml index eaf3638..8ad5af8 100644 --- a/examples/declarative/cppextensions/referenceexamples/coercion/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/coercion/example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/referenceexamples/default/example.qml b/examples/declarative/cppextensions/referenceexamples/default/example.qml index 5c7635e..79b9c59 100644 --- a/examples/declarative/cppextensions/referenceexamples/default/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/default/example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/referenceexamples/extended/example.qml b/examples/declarative/cppextensions/referenceexamples/extended/example.qml index 7a76708..afc941b 100644 --- a/examples/declarative/cppextensions/referenceexamples/extended/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/extended/example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/example.qml b/examples/declarative/cppextensions/referenceexamples/grouped/example.qml index 8cd8f5d..ba1f9ab 100644 --- a/examples/declarative/cppextensions/referenceexamples/grouped/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/grouped/example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/referenceexamples/methods/example.qml b/examples/declarative/cppextensions/referenceexamples/methods/example.qml index c4698a2..ea3fa5f 100644 --- a/examples/declarative/cppextensions/referenceexamples/methods/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/methods/example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/referenceexamples/properties/example.qml b/examples/declarative/cppextensions/referenceexamples/properties/example.qml index 1468a4f..d8c88d5 100644 --- a/examples/declarative/cppextensions/referenceexamples/properties/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/properties/example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/referenceexamples/signal/example.qml b/examples/declarative/cppextensions/referenceexamples/signal/example.qml index f4c6439..1e6f2db 100644 --- a/examples/declarative/cppextensions/referenceexamples/signal/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/signal/example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/example.qml b/examples/declarative/cppextensions/referenceexamples/valuesource/example.qml index 4f9e6eb..11d29d9 100644 --- a/examples/declarative/cppextensions/referenceexamples/valuesource/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/valuesource/example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/i18n/i18n.qml b/examples/declarative/i18n/i18n.qml index 5c2702c..fcf24c2 100644 --- a/examples/declarative/i18n/i18n.qml +++ b/examples/declarative/i18n/i18n.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/imageelements/borderimage/borderimage.qml b/examples/declarative/imageelements/borderimage/borderimage.qml index 98e573e..bbe113c 100644 --- a/examples/declarative/imageelements/borderimage/borderimage.qml +++ b/examples/declarative/imageelements/borderimage/borderimage.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml b/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml index 10e6822..b8f8a70 100644 --- a/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml +++ b/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml b/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml index 0806fc8..73eb040 100644 --- a/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml +++ b/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/imageelements/borderimage/shadows.qml b/examples/declarative/imageelements/borderimage/shadows.qml index 365d293..4cb7c65 100644 --- a/examples/declarative/imageelements/borderimage/shadows.qml +++ b/examples/declarative/imageelements/borderimage/shadows.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/imageelements/image/ImageCell.qml b/examples/declarative/imageelements/image/ImageCell.qml index 71a17fe..f8973c8 100644 --- a/examples/declarative/imageelements/image/ImageCell.qml +++ b/examples/declarative/imageelements/image/ImageCell.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/imageelements/image/image.qml b/examples/declarative/imageelements/image/image.qml index bc5ae37..719d544 100644 --- a/examples/declarative/imageelements/image/image.qml +++ b/examples/declarative/imageelements/image/image.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml b/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml index ba49d14..be32386 100644 --- a/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml +++ b/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml index 88840cb..8cdec3e 100644 --- a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml +++ b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/keyinteraction/focus/Core/ListMenu.qml b/examples/declarative/keyinteraction/focus/Core/ListMenu.qml index 6100b32..ca2e206 100644 --- a/examples/declarative/keyinteraction/focus/Core/ListMenu.qml +++ b/examples/declarative/keyinteraction/focus/Core/ListMenu.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml index 602b52b..95164f8 100644 --- a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml +++ b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/keyinteraction/focus/focus.qml b/examples/declarative/keyinteraction/focus/focus.qml index 9463192..da2c30d 100644 --- a/examples/declarative/keyinteraction/focus/focus.qml +++ b/examples/declarative/keyinteraction/focus/focus.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/abstractitemmodel/main.cpp b/examples/declarative/modelviews/abstractitemmodel/main.cpp index e869aba..dc563ad 100644 --- a/examples/declarative/modelviews/abstractitemmodel/main.cpp +++ b/examples/declarative/modelviews/abstractitemmodel/main.cpp @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/abstractitemmodel/model.cpp b/examples/declarative/modelviews/abstractitemmodel/model.cpp index 940a44d..eab6728 100644 --- a/examples/declarative/modelviews/abstractitemmodel/model.cpp +++ b/examples/declarative/modelviews/abstractitemmodel/model.cpp @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/abstractitemmodel/model.h b/examples/declarative/modelviews/abstractitemmodel/model.h index 1119837..34a9091 100644 --- a/examples/declarative/modelviews/abstractitemmodel/model.h +++ b/examples/declarative/modelviews/abstractitemmodel/model.h @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/abstractitemmodel/view.qml b/examples/declarative/modelviews/abstractitemmodel/view.qml index 591d89a..2fb4885 100644 --- a/examples/declarative/modelviews/abstractitemmodel/view.qml +++ b/examples/declarative/modelviews/abstractitemmodel/view.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/gridview/gridview-example.qml b/examples/declarative/modelviews/gridview/gridview-example.qml index 740f205..aea34ff 100644 --- a/examples/declarative/modelviews/gridview/gridview-example.qml +++ b/examples/declarative/modelviews/gridview/gridview-example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/listview/content/PetsModel.qml b/examples/declarative/modelviews/listview/content/PetsModel.qml index b77557d..beeed1a 100644 --- a/examples/declarative/modelviews/listview/content/PetsModel.qml +++ b/examples/declarative/modelviews/listview/content/PetsModel.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml b/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml index 0d5a255..ad6230e 100644 --- a/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml +++ b/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/listview/content/RecipesModel.qml b/examples/declarative/modelviews/listview/content/RecipesModel.qml index e6d829f..812cf77 100644 --- a/examples/declarative/modelviews/listview/content/RecipesModel.qml +++ b/examples/declarative/modelviews/listview/content/RecipesModel.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/listview/content/TextButton.qml b/examples/declarative/modelviews/listview/content/TextButton.qml index ded7a11..0270fdc 100644 --- a/examples/declarative/modelviews/listview/content/TextButton.qml +++ b/examples/declarative/modelviews/listview/content/TextButton.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/listview/dynamiclist.qml b/examples/declarative/modelviews/listview/dynamiclist.qml index 3c1af37..27ef6e0 100644 --- a/examples/declarative/modelviews/listview/dynamiclist.qml +++ b/examples/declarative/modelviews/listview/dynamiclist.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/listview/expandingdelegates.qml b/examples/declarative/modelviews/listview/expandingdelegates.qml index 24d6386..2dec769 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/listview/highlight.qml b/examples/declarative/modelviews/listview/highlight.qml index 2d68da6..5646e9f 100644 --- a/examples/declarative/modelviews/listview/highlight.qml +++ b/examples/declarative/modelviews/listview/highlight.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/listview/highlightranges.qml b/examples/declarative/modelviews/listview/highlightranges.qml index 30976f4..711463a 100644 --- a/examples/declarative/modelviews/listview/highlightranges.qml +++ b/examples/declarative/modelviews/listview/highlightranges.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/listview/sections.qml b/examples/declarative/modelviews/listview/sections.qml index 8e0a49f..a9ec538 100644 --- a/examples/declarative/modelviews/listview/sections.qml +++ b/examples/declarative/modelviews/listview/sections.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/objectlistmodel/dataobject.cpp b/examples/declarative/modelviews/objectlistmodel/dataobject.cpp index 2a42ea3..ce7465a 100644 --- a/examples/declarative/modelviews/objectlistmodel/dataobject.cpp +++ b/examples/declarative/modelviews/objectlistmodel/dataobject.cpp @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/objectlistmodel/dataobject.h b/examples/declarative/modelviews/objectlistmodel/dataobject.h index 17aa355..22e5de2 100644 --- a/examples/declarative/modelviews/objectlistmodel/dataobject.h +++ b/examples/declarative/modelviews/objectlistmodel/dataobject.h @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/objectlistmodel/view.qml b/examples/declarative/modelviews/objectlistmodel/view.qml index c3cccdd..7e7c68a 100644 --- a/examples/declarative/modelviews/objectlistmodel/view.qml +++ b/examples/declarative/modelviews/objectlistmodel/view.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/package/Delegate.qml b/examples/declarative/modelviews/package/Delegate.qml index 9c42876..a38727c 100644 --- a/examples/declarative/modelviews/package/Delegate.qml +++ b/examples/declarative/modelviews/package/Delegate.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/package/view.qml b/examples/declarative/modelviews/package/view.qml index 26230ef..38cc047 100644 --- a/examples/declarative/modelviews/package/view.qml +++ b/examples/declarative/modelviews/package/view.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/parallax/parallax.qml b/examples/declarative/modelviews/parallax/parallax.qml index 19eadd0..3d7d091 100644 --- a/examples/declarative/modelviews/parallax/parallax.qml +++ b/examples/declarative/modelviews/parallax/parallax.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/parallax/qml/ParallaxView.qml b/examples/declarative/modelviews/parallax/qml/ParallaxView.qml index ac479f4..724d7e0 100644 --- a/examples/declarative/modelviews/parallax/qml/ParallaxView.qml +++ b/examples/declarative/modelviews/parallax/qml/ParallaxView.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/parallax/qml/Smiley.qml b/examples/declarative/modelviews/parallax/qml/Smiley.qml index 3ca672a..959c85c 100644 --- a/examples/declarative/modelviews/parallax/qml/Smiley.qml +++ b/examples/declarative/modelviews/parallax/qml/Smiley.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/pathview/pathview-example.qml b/examples/declarative/modelviews/pathview/pathview-example.qml index 0a3b34c..8777291 100644 --- a/examples/declarative/modelviews/pathview/pathview-example.qml +++ b/examples/declarative/modelviews/pathview/pathview-example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/stringlistmodel/view.qml b/examples/declarative/modelviews/stringlistmodel/view.qml index 3d789fd..1751a7a 100644 --- a/examples/declarative/modelviews/stringlistmodel/view.qml +++ b/examples/declarative/modelviews/stringlistmodel/view.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml index 1b44e05..344ce62 100644 --- a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml +++ b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/webview/alerts.qml b/examples/declarative/modelviews/webview/alerts.qml index 9e3c925..68f7a5c 100644 --- a/examples/declarative/modelviews/webview/alerts.qml +++ b/examples/declarative/modelviews/webview/alerts.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/webview/autosize.qml b/examples/declarative/modelviews/webview/autosize.qml index 4a5096e..91550c1 100644 --- a/examples/declarative/modelviews/webview/autosize.qml +++ b/examples/declarative/modelviews/webview/autosize.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/webview/content/Mapping/Map.qml b/examples/declarative/modelviews/webview/content/Mapping/Map.qml index c2489c5..ab549b5 100644 --- a/examples/declarative/modelviews/webview/content/Mapping/Map.qml +++ b/examples/declarative/modelviews/webview/content/Mapping/Map.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/webview/googlemaps.qml b/examples/declarative/modelviews/webview/googlemaps.qml index 361b40c..bc9a0e3 100644 --- a/examples/declarative/modelviews/webview/googlemaps.qml +++ b/examples/declarative/modelviews/webview/googlemaps.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/webview/inlinehtml.qml b/examples/declarative/modelviews/webview/inlinehtml.qml index 0448ff3..afc8418 100644 --- a/examples/declarative/modelviews/webview/inlinehtml.qml +++ b/examples/declarative/modelviews/webview/inlinehtml.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/modelviews/webview/newwindows.qml b/examples/declarative/modelviews/webview/newwindows.qml index c09b2a9..5762321 100644 --- a/examples/declarative/modelviews/webview/newwindows.qml +++ b/examples/declarative/modelviews/webview/newwindows.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/positioners/Button.qml b/examples/declarative/positioners/Button.qml index bb8c9c7..4709aa6 100644 --- a/examples/declarative/positioners/Button.qml +++ b/examples/declarative/positioners/Button.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/positioners/positioners.qml b/examples/declarative/positioners/positioners.qml index d16d3df..26b9ccd 100644 --- a/examples/declarative/positioners/positioners.qml +++ b/examples/declarative/positioners/positioners.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/screenorientation/Core/Bubble.qml b/examples/declarative/screenorientation/Core/Bubble.qml index 2474f30..58bd13c 100644 --- a/examples/declarative/screenorientation/Core/Bubble.qml +++ b/examples/declarative/screenorientation/Core/Bubble.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/examples/declarative/screenorientation/Core/Button.qml b/examples/declarative/screenorientation/Core/Button.qml index 60083d8..11117c9 100644 --- a/examples/declarative/screenorientation/Core/Button.qml +++ b/examples/declarative/screenorientation/Core/Button.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/examples/declarative/screenorientation/Core/screenorientation.js b/examples/declarative/screenorientation/Core/screenorientation.js index f0a5574..68aedd4 100644 --- a/examples/declarative/screenorientation/Core/screenorientation.js +++ b/examples/declarative/screenorientation/Core/screenorientation.js @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/examples/declarative/screenorientation/screenorientation.qml b/examples/declarative/screenorientation/screenorientation.qml index 6af38bb..4387266 100644 --- a/examples/declarative/screenorientation/screenorientation.qml +++ b/examples/declarative/screenorientation/screenorientation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/examples/declarative/sqllocalstorage/hello.qml b/examples/declarative/sqllocalstorage/hello.qml index 19b7378..cbfc14a 100644 --- a/examples/declarative/sqllocalstorage/hello.qml +++ b/examples/declarative/sqllocalstorage/hello.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/text/fonts/availableFonts.qml b/examples/declarative/text/fonts/availableFonts.qml index 19bf59c..312bc38 100644 --- a/examples/declarative/text/fonts/availableFonts.qml +++ b/examples/declarative/text/fonts/availableFonts.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/text/fonts/banner.qml b/examples/declarative/text/fonts/banner.qml index c4b2719..41bc997 100644 --- a/examples/declarative/text/fonts/banner.qml +++ b/examples/declarative/text/fonts/banner.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/text/fonts/fonts.qml b/examples/declarative/text/fonts/fonts.qml index 8ed39a9..743ee79 100644 --- a/examples/declarative/text/fonts/fonts.qml +++ b/examples/declarative/text/fonts/fonts.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/text/fonts/hello.qml b/examples/declarative/text/fonts/hello.qml index 8881108..a396ff3 100644 --- a/examples/declarative/text/fonts/hello.qml +++ b/examples/declarative/text/fonts/hello.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/text/textselection/textselection.qml b/examples/declarative/text/textselection/textselection.qml index 1ba3e18..aa958e6 100644 --- a/examples/declarative/text/textselection/textselection.qml +++ b/examples/declarative/text/textselection/textselection.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/examples/declarative/threading/threadedlistmodel/dataloader.js b/examples/declarative/threading/threadedlistmodel/dataloader.js index d720f09..f3d0a2f 100644 --- a/examples/declarative/threading/threadedlistmodel/dataloader.js +++ b/examples/declarative/threading/threadedlistmodel/dataloader.js @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + // ![0] WorkerScript.onMessage = function(msg) { if (msg.action == 'appendCurrentTime') { diff --git a/examples/declarative/threading/threadedlistmodel/threadedlistmodel.qmlproject b/examples/declarative/threading/threadedlistmodel/threadedlistmodel.qmlproject index d4909f8..de3bf1d 100644 --- a/examples/declarative/threading/threadedlistmodel/threadedlistmodel.qmlproject +++ b/examples/declarative/threading/threadedlistmodel/threadedlistmodel.qmlproject @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + import QmlProject 1.0 Project { diff --git a/examples/declarative/threading/threadedlistmodel/timedisplay.qml b/examples/declarative/threading/threadedlistmodel/timedisplay.qml index d807955..b1cce05 100644 --- a/examples/declarative/threading/threadedlistmodel/timedisplay.qml +++ b/examples/declarative/threading/threadedlistmodel/timedisplay.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/threading/workerscript/workerscript.qml b/examples/declarative/threading/workerscript/workerscript.qml index 8d986a3..e224bf1 100644 --- a/examples/declarative/threading/workerscript/workerscript.qml +++ b/examples/declarative/threading/workerscript/workerscript.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/touchinteraction/gestures/experimental-gestures.qml b/examples/declarative/touchinteraction/gestures/experimental-gestures.qml index 02a1973..500a909 100644 --- a/examples/declarative/touchinteraction/gestures/experimental-gestures.qml +++ b/examples/declarative/touchinteraction/gestures/experimental-gestures.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/touchinteraction/mousearea/mousearea-example.qml b/examples/declarative/touchinteraction/mousearea/mousearea-example.qml index 85ea2dc..492ffc6 100644 --- a/examples/declarative/touchinteraction/mousearea/mousearea-example.qml +++ b/examples/declarative/touchinteraction/mousearea/mousearea-example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/clocks/clocks.qml b/examples/declarative/toys/clocks/clocks.qml index 82a1dbf..9002fac 100644 --- a/examples/declarative/toys/clocks/clocks.qml +++ b/examples/declarative/toys/clocks/clocks.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/clocks/content/Clock.qml b/examples/declarative/toys/clocks/content/Clock.qml index 765e8b8..9c732f9 100644 --- a/examples/declarative/toys/clocks/content/Clock.qml +++ b/examples/declarative/toys/clocks/content/Clock.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/clocks/content/QuitButton.qml b/examples/declarative/toys/clocks/content/QuitButton.qml index 039694d..9dfe9bd 100644 --- a/examples/declarative/toys/clocks/content/QuitButton.qml +++ b/examples/declarative/toys/clocks/content/QuitButton.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/corkboards/Day.qml b/examples/declarative/toys/corkboards/Day.qml index 9d1f3ae..f406f7b 100644 --- a/examples/declarative/toys/corkboards/Day.qml +++ b/examples/declarative/toys/corkboards/Day.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/corkboards/corkboards.qml b/examples/declarative/toys/corkboards/corkboards.qml index a4679c9..9b764c9 100644 --- a/examples/declarative/toys/corkboards/corkboards.qml +++ b/examples/declarative/toys/corkboards/corkboards.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qml b/examples/declarative/toys/dynamicscene/dynamicscene.qml index d1055cd..ad18698 100644 --- a/examples/declarative/toys/dynamicscene/dynamicscene.qml +++ b/examples/declarative/toys/dynamicscene/dynamicscene.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/dynamicscene/qml/Button.qml b/examples/declarative/toys/dynamicscene/qml/Button.qml index 7e51293..7bb0ddf 100644 --- a/examples/declarative/toys/dynamicscene/qml/Button.qml +++ b/examples/declarative/toys/dynamicscene/qml/Button.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml b/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml index 7e090d8..fa976c1 100644 --- a/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml +++ b/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml index 855a34b..1c31f71 100644 --- a/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml +++ b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml b/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml index aa5b06d..9b6f243 100644 --- a/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml +++ b/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/dynamicscene/qml/Sun.qml b/examples/declarative/toys/dynamicscene/qml/Sun.qml index 4b2bcdb..eb24285 100644 --- a/examples/declarative/toys/dynamicscene/qml/Sun.qml +++ b/examples/declarative/toys/dynamicscene/qml/Sun.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/tic-tac-toe/content/Button.qml b/examples/declarative/toys/tic-tac-toe/content/Button.qml index d0f387f..2d30a03 100644 --- a/examples/declarative/toys/tic-tac-toe/content/Button.qml +++ b/examples/declarative/toys/tic-tac-toe/content/Button.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/tic-tac-toe/content/TicTac.qml b/examples/declarative/toys/tic-tac-toe/content/TicTac.qml index 36c9dae..0ca5350 100644 --- a/examples/declarative/toys/tic-tac-toe/content/TicTac.qml +++ b/examples/declarative/toys/tic-tac-toe/content/TicTac.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml index 34c3130..12b0fda 100644 --- a/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml +++ b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/toys/tvtennis/tvtennis.qml b/examples/declarative/toys/tvtennis/tvtennis.qml index 4080c87..53c95c0 100644 --- a/examples/declarative/toys/tvtennis/tvtennis.qml +++ b/examples/declarative/toys/tvtennis/tvtennis.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/extending/chapter1-basics/app.qml b/examples/declarative/tutorials/extending/chapter1-basics/app.qml index ada088d..826bea9 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/app.qml +++ b/examples/declarative/tutorials/extending/chapter1-basics/app.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/extending/chapter2-methods/app.qml b/examples/declarative/tutorials/extending/chapter2-methods/app.qml index 0b55f7c..50051b6 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/app.qml +++ b/examples/declarative/tutorials/extending/chapter2-methods/app.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml index 2ff6ae1..e183b27 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml +++ b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml index fcd3806..6e5d3b4 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml b/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml index f759bc9..483332c 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/app.qml b/examples/declarative/tutorials/extending/chapter6-plugins/app.qml index 38ceefa..097da7e 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/app.qml +++ b/examples/declarative/tutorials/extending/chapter6-plugins/app.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/helloworld/Cell.qml b/examples/declarative/tutorials/helloworld/Cell.qml index e070df0..e64aa7e 100644 --- a/examples/declarative/tutorials/helloworld/Cell.qml +++ b/examples/declarative/tutorials/helloworld/Cell.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/helloworld/tutorial1.qml b/examples/declarative/tutorials/helloworld/tutorial1.qml index 21f340a..e6c4122 100644 --- a/examples/declarative/tutorials/helloworld/tutorial1.qml +++ b/examples/declarative/tutorials/helloworld/tutorial1.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/helloworld/tutorial2.qml b/examples/declarative/tutorials/helloworld/tutorial2.qml index 3296f3c..1ffde57 100644 --- a/examples/declarative/tutorials/helloworld/tutorial2.qml +++ b/examples/declarative/tutorials/helloworld/tutorial2.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/declarative/tutorials/helloworld/tutorial3.qml index d680975..af2d5d2 100644 --- a/examples/declarative/tutorials/helloworld/tutorial3.qml +++ b/examples/declarative/tutorials/helloworld/tutorial3.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame1/Block.qml b/examples/declarative/tutorials/samegame/samegame1/Block.qml index 56d8ecf..db1245d 100644 --- a/examples/declarative/tutorials/samegame/samegame1/Block.qml +++ b/examples/declarative/tutorials/samegame/samegame1/Block.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/declarative/tutorials/samegame/samegame1/Button.qml index 8f9b5bb..72b18bc 100644 --- a/examples/declarative/tutorials/samegame/samegame1/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame1/Button.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml index 68f8712..01396fa 100644 --- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame2/Block.qml b/examples/declarative/tutorials/samegame/samegame2/Block.qml index a7a6eec..c271cf7 100644 --- a/examples/declarative/tutorials/samegame/samegame2/Block.qml +++ b/examples/declarative/tutorials/samegame/samegame2/Block.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml index f8883c0..3bd3099 100644 --- a/examples/declarative/tutorials/samegame/samegame2/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml index 492c914..ae1916e 100644 --- a/examples/declarative/tutorials/samegame/samegame2/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame3/Block.qml b/examples/declarative/tutorials/samegame/samegame3/Block.qml index ec41c64..673007e 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Block.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Block.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/declarative/tutorials/samegame/samegame3/Button.qml index f8883c0..3bd3099 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Button.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml index d838205..ed17e5f 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml index 21d4291..2c49adc 100644 --- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml index 92c607f..8e3ca96 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml index f8883c0..3bd3099 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml index c216c08..5c81929 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml index c66f1fe..4fec71b 100644 --- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/dialcontrol/content/Dial.qml b/examples/declarative/ui-components/dialcontrol/content/Dial.qml index 3ffa09a..ed1b04d 100644 --- a/examples/declarative/ui-components/dialcontrol/content/Dial.qml +++ b/examples/declarative/ui-components/dialcontrol/content/Dial.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/dialcontrol/content/QuitButton.qml b/examples/declarative/ui-components/dialcontrol/content/QuitButton.qml index 039694d..9dfe9bd 100644 --- a/examples/declarative/ui-components/dialcontrol/content/QuitButton.qml +++ b/examples/declarative/ui-components/dialcontrol/content/QuitButton.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/dialcontrol/dialcontrol.qml b/examples/declarative/ui-components/dialcontrol/dialcontrol.qml index a7da5c6..56de2f6 100644 --- a/examples/declarative/ui-components/dialcontrol/dialcontrol.qml +++ b/examples/declarative/ui-components/dialcontrol/dialcontrol.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/flipable/content/Card.qml b/examples/declarative/ui-components/flipable/content/Card.qml index fc60ce4..d22fa7d 100644 --- a/examples/declarative/ui-components/flipable/content/Card.qml +++ b/examples/declarative/ui-components/flipable/content/Card.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/flipable/flipable.qml b/examples/declarative/ui-components/flipable/flipable.qml index 479e35b..0f775e5 100644 --- a/examples/declarative/ui-components/flipable/flipable.qml +++ b/examples/declarative/ui-components/flipable/flipable.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/progressbar/content/ProgressBar.qml b/examples/declarative/ui-components/progressbar/content/ProgressBar.qml index 6aa6765..f830f95 100644 --- a/examples/declarative/ui-components/progressbar/content/ProgressBar.qml +++ b/examples/declarative/ui-components/progressbar/content/ProgressBar.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/progressbar/main.qml b/examples/declarative/ui-components/progressbar/main.qml index 22f8dbd..c92e586 100644 --- a/examples/declarative/ui-components/progressbar/main.qml +++ b/examples/declarative/ui-components/progressbar/main.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/scrollbar/ScrollBar.qml b/examples/declarative/ui-components/scrollbar/ScrollBar.qml index 9927ecb..ee8e9fa 100644 --- a/examples/declarative/ui-components/scrollbar/ScrollBar.qml +++ b/examples/declarative/ui-components/scrollbar/ScrollBar.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/scrollbar/main.qml b/examples/declarative/ui-components/scrollbar/main.qml index 8f5033b..930c3b8 100644 --- a/examples/declarative/ui-components/scrollbar/main.qml +++ b/examples/declarative/ui-components/scrollbar/main.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/searchbox/SearchBox.qml b/examples/declarative/ui-components/searchbox/SearchBox.qml index 8ef21b3..60fa799 100644 --- a/examples/declarative/ui-components/searchbox/SearchBox.qml +++ b/examples/declarative/ui-components/searchbox/SearchBox.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/searchbox/main.qml b/examples/declarative/ui-components/searchbox/main.qml index bf3bed8..513c298 100644 --- a/examples/declarative/ui-components/searchbox/main.qml +++ b/examples/declarative/ui-components/searchbox/main.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/slideswitch/content/Switch.qml b/examples/declarative/ui-components/slideswitch/content/Switch.qml index 2a89177..9632fd6 100644 --- a/examples/declarative/ui-components/slideswitch/content/Switch.qml +++ b/examples/declarative/ui-components/slideswitch/content/Switch.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/slideswitch/slideswitch.qml b/examples/declarative/ui-components/slideswitch/slideswitch.qml index e94ebfe..a0a0eb2 100644 --- a/examples/declarative/ui-components/slideswitch/slideswitch.qml +++ b/examples/declarative/ui-components/slideswitch/slideswitch.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/spinner/content/Spinner.qml b/examples/declarative/ui-components/spinner/content/Spinner.qml index 1c41239..910efb9 100644 --- a/examples/declarative/ui-components/spinner/content/Spinner.qml +++ b/examples/declarative/ui-components/spinner/content/Spinner.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/spinner/main.qml b/examples/declarative/ui-components/spinner/main.qml index 37dd912..a196e72 100644 --- a/examples/declarative/ui-components/spinner/main.qml +++ b/examples/declarative/ui-components/spinner/main.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/tabwidget/TabWidget.qml b/examples/declarative/ui-components/tabwidget/TabWidget.qml index ce57213..30eba68 100644 --- a/examples/declarative/ui-components/tabwidget/TabWidget.qml +++ b/examples/declarative/ui-components/tabwidget/TabWidget.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/ui-components/tabwidget/main.qml b/examples/declarative/ui-components/tabwidget/main.qml index 4a27806..b9ca2a1 100644 --- a/examples/declarative/ui-components/tabwidget/main.qml +++ b/examples/declarative/ui-components/tabwidget/main.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml b/examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml index b302729..f77e1de 100644 --- a/examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml +++ b/examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: -- cgit v0.12 From 245653f469baa0227c0b07fd6a232629ed53e9ee Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 13 Sep 2010 15:31:44 +0200 Subject: Doc: Added a missing file. --- doc/src/declarative/positioners.qdoc | 193 +++++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 doc/src/declarative/positioners.qdoc diff --git a/doc/src/declarative/positioners.qdoc b/doc/src/declarative/positioners.qdoc new file mode 100644 index 0000000..8c9b8b7 --- /dev/null +++ b/doc/src/declarative/positioners.qdoc @@ -0,0 +1,193 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in a +** written agreement between you and Nokia. +** +** GNU Free Documentation License +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of this +** file. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! +\page qml-positioners.html +\title Using QML Positioner and Repeater Items + +\section1 Introduction + +Positioner items are container items that manage the positions and sizes of +items in a declarative user interface. Positioners behave in a similar way to +the \l{Widgets and Layouts}{layout managers} used with standard Qt widgets, +except that they are also containers in their own right. + +Positioners and repeaters make it easier to work with many items when they need +to be arranged in a regular layout. + +\section1 Positioners + +A set of standard positioners are provided in the basic set of Qt Quick +graphical elements: + +\list +\o \l{#Column}{Column} arranges its children in a column +\o \l{#Row}{Row} arranges its children in a row +\o \l{#Grid}{Grid} arranges its children in a grid +\o \l{#Flow}{Flow} arranges its children like words on a page +\endlist + +\section2 Column + +\beginfloatright +\image qml-column.png +\endfloat + +\l Column items are used to vertically arrange items. The following example +uses a Column item to arrange three \l Rectangle items in an area defined +by an outer \l Item. The \l{Column::spacing}{spacing} property is set to +include a small amount of space between the rectangles. + +\clearfloat +\snippet doc/src/snippets/declarative/column/column.qml document + +Note that, since Column inherits directly from Item, any background color +must be added to a parent Rectangle, if desired. + +\section2 Row + +\beginfloatright +\image qml-row.png +\endfloat + +\l Row items are used to horizontally arrange items. The following example +uses a Row item to arrange three rounded \l Rectangle items in an area defined +by an outer colored Rectangle. The \l{Row::spacing}{spacing} property is set to +include a small amount of space between the rectangles. + +We ensure that the parent Rectangle is large enough so that there is some space +left around the edges of the horizontally centered Row item. + +\clearfloat +\snippet doc/src/snippets/declarative/row.qml document + +\section2 Grid + +\beginfloatright +\image qml-grid-spacing.png +\endfloat + +\l Grid items are used to place items in a grid or table arrangement. +The following example uses a Grid item to place four \l Rectangle items +in a 2-by-2 grid. As with the other positioners, the spacing between items +can be specified using the \l{Grid::spacing}{spacing} property. + +\clearfloat +\snippet doc/src/snippets/declarative/grid/grid-spacing.qml document + +There is no difference between horizontal and vertical spacing inserted +between items, so any additional space must be added within the items +themselves. + +Any empty cells in the grid must be created by defining placeholder items +at the appropriate places in the Grid definition. + +\section2 Flow + +\beginfloatright +\image qml-flow-text1.png +\image qml-flow-text2.png +\endfloat + +\l Flow items are used to place items like words on a page, with rows or +columns of non-overlapping items. + +Flow items arrange items in a similar way to \l Grid items, with items +arranged in lines along one axis (the minor axis), and lines of items +placed next to each other along another axis (the major axis). The +direction of flow, as well as the spacing between items, are controlled +by the \l{Flow::}{flow} and \l{Flow::}{spacing} properties. + +The following example shows a Flow item containing a number of \l Text +child items. These are arranged in a similar way to those shown in the +screenshots. + +\clearfloat +\snippet doc/src/snippets/declarative/flow.qml document + +The main differences between the Grid and Flow positioners are that items +inside a Flow will wrap when they run out of space on the minor axis, and +items on one line may not be aligned with items on another line if the +items do not have uniform sizes. As with Grid items, there is no independent +control of spacing between items and between lines of items. + +\section1 Repeaters + +\beginfloatright +\image qml-repeater-grid-index.png +\endfloat + +Repeaters create items from a template for use with positioners, using data +from a model. Combining repeaters and positioners is an easy way to lay out +lots of items. A \l Repeater item is placed inside a positioner, and generates +items that the enclosing positioner arranges. + +Each Repeater creates a number of items by combining each element of data +from a model, specified using the \l{Repeater::model}{model} property, with +the template item, defined as a child item within the Repeater. +The total number of items is determined by the amount of data in the model. + +The following example shows a repeater used with a \l{#Grid}{Grid} item to +arrange a set of Rectangle items. The Repeater item creates a series of 24 +rectangles for the Grid item to position in a 5 by 5 arrangement. + +\clearfloat +\snippet doc/src/snippets/declarative/repeaters/repeater-grid-index.qml document + +The number of items created by a Repeater is held by its \l{Repeater::}{count} +property. It is not possible to set this property to determine the number of +items to be created. Instead, as in the above example, we use an integer as +the model. This is explained in the \l{QML Data Models#An Integer}{QML Data Models} +document. + +It is also possible to use a delegate as the template for the items created +by a Repeater. This is specified using the \l{Repeater::}{delegate} property. + +\section1 Using Transitions + +Transitions can be used to animate items that are added to, moved within, +or removed from a positioner. + +Transitions for adding items apply to items that are created as part of a +positioner, as well as those that are reparented to become children of a +positioner. +Transitions for removing items apply to items within a positioner that are +deleted, as well as those that are removed from a positioner and given new +parents in a document. + +Additionally, changing the opacity of items to zero will cause them to +disappear using the remove transition, and making the opacity non-zero will +cause them to appear using the add transition. + +\section1 Other Ways to Position Items + +There are several other ways to position items in a user interface. In addition +to the basic technique of specifying their coordinates directly, they can be +positioned relative to other items with \l{anchor-layout}{anchors}, or used +with \l{QML Data Models} such as +\l{QML Data Models#VisualItemModel}{VisualItemModel}. +*/ -- cgit v0.12 From f1244a099ecc806582ce8c2488552e21c85ac519 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 13 Sep 2010 15:41:55 +0200 Subject: Doc: Some editing and tidying up. --- doc/src/declarative/declarativeui.qdoc | 1 - doc/src/declarative/qtdeclarative.qdoc | 5 +- doc/src/getting-started/gettingstartedqml.qdoc | 54 +++------------------- .../tutorials/gettingStarted/gsQml/texteditor.qml | 4 ++ 4 files changed, 13 insertions(+), 51 deletions(-) diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index 2f43682..cb326a3 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -30,7 +30,6 @@ \page qtquick.html \ingroup qt-gui-concepts - \brief Qt Quick provides a declarative framework for building highly dynamic, custom user interfaces. diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc index f163a66..044758f 100644 --- a/doc/src/declarative/qtdeclarative.qdoc +++ b/doc/src/declarative/qtdeclarative.qdoc @@ -63,10 +63,11 @@ \macro QML_DECLARE_TYPEINFO(Type,Flags) \relates QDeclarativeEngine - Declares additional properties of a type. + Declares additional properties of the given \a Type as described by the + specified \a Flags. Current the only supported type info is \c QML_HAS_ATTACHED_PROPERTIES which - declares that the \c Type supports \l {Attached Properties}. + declares that the \a Type supports \l {Attached Properties}. */ diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index 6cef316..1003eee 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -71,20 +71,7 @@ In QML, the basic visual item is the \l {Rectangle}{Rectangle} element. The \c Rectangle element has properties to control the element's appearance and location. - \code - import Qt 4.7 - Rectangle { - id: simplebutton - color: "grey" - width: 150; height: 75 - - Text{ - id: buttonLabel - anchors.centerIn: parent - text: "button label" - } - } - \endcode + \snippet examples/tutorials/gettingStarted/gsQml/part0/Button.qml document First, the \c { import Qt 4.7 } allows the qmlviewer tool to import the QML elements we will later use. This line must exist for every QML file. Notice that the version @@ -422,7 +409,7 @@ focus: true wrapMode: TextEdit.Wrap - + onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle) } \endcode @@ -446,7 +433,7 @@ contentY = r.y+r.height-height; } \endcode - + \section2 Combining Components for the Text Editor We are now ready to create the layout of our text editor using QML. The text @@ -464,7 +451,7 @@ //the screen is partitioned into the MenuBar and TextArea. 1/3 of the screen is assigned to the MenuBar property int partition: height/3 - + MenuBar{ id:menuBar height: partition @@ -543,27 +530,7 @@ the \c drawer, and the drawer's icon will undergo property changes to meet the current state. - \code - - states:[ - State{ - name: "DRAWER_OPEN" - PropertyChanges { target: menuBar; y:0} - PropertyChanges { target: textArea; y: partition + drawer.height} - PropertyChanges { target: drawer; y: partition} - PropertyChanges { target: arrowIcon; rotation: 180} - }, - State{ - name: "DRAWER_CLOSED" - PropertyChanges { target: menuBar; y:-partition} - PropertyChanges { target: textArea; y: drawer.height; height: screen.height - drawer.height} - PropertyChanges { target: drawer; y: 0} - PropertyChanges { target: arrowIcon; rotation: 0} - } - - ] - - \endcode + \snippet examples/tutorial/gettingStarted/gsQml/texteditor.qml states State changes are abrupt and needs smoother transitions. Transitions between states are defined using the \l {Transition}{Transition} element, which can then bind to @@ -582,16 +549,7 @@ the end of the animation. Pleae read \l {qdeclarativeanimation.html}{QML's Animation} article. - \code - transitions: [ - Transition{ - to: "*" - NumberAnimation { target: textArea; properties: "y, height"; duration: 100; easing.type: Easing.OutQuint } - NumberAnimation { target: menuBar; properties: "y"; duration: 100;easing.type: Easing.OutQuint } - NumberAnimation { target: drawer; properties: "y"; duration: 100;easing.type: Easing.OutQuint } - } - ] - \endcode + \snippet examples/tutorials/gettingStarted/gsQml/texteditor.qml transitions Another way of animating property changes is by declaring a \l {Behavior}{Behavior} element. A transition only works during state changes and \c Behavior can set an diff --git a/examples/tutorials/gettingStarted/gsQml/texteditor.qml b/examples/tutorials/gettingStarted/gsQml/texteditor.qml index 3bd9d55..5a75e0b 100644 --- a/examples/tutorials/gettingStarted/gsQml/texteditor.qml +++ b/examples/tutorials/gettingStarted/gsQml/texteditor.qml @@ -100,6 +100,7 @@ Rectangle { } } +//! [states] states:[ State { name: "DRAWER_OPEN" @@ -116,7 +117,9 @@ Rectangle { PropertyChanges { target: arrowIcon; rotation: 0 } } ] +//! [states] +//! [transitions] transitions: [ Transition { to: "*" @@ -125,4 +128,5 @@ Rectangle { NumberAnimation { target: drawer; properties: "y"; duration: 100; easing.type: Easing.OutExpo } } ] +//! [transitions] } -- cgit v0.12 From cf5d53ac1dc1fa71d32ba199717fcf12fdef185c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 13 Sep 2010 15:45:25 +0200 Subject: Doc: More work on the declarative API documentation. --- .../graphicsitems/qdeclarativeflickable.cpp | 5 +- .../graphicsitems/qdeclarativegridview.cpp | 40 +++++--- .../graphicsitems/qdeclarativelistview.cpp | 13 ++- .../graphicsitems/qdeclarativeloader.cpp | 8 +- .../graphicsitems/qdeclarativepathview.cpp | 4 +- src/declarative/util/qdeclarativelistmodel.cpp | 107 +++++++++++++++------ 6 files changed, 123 insertions(+), 54 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 062bbfb..477c511 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -372,11 +372,12 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd() \inlineimage flickable.gif \endfloat - The following example shows a large + The following example shows a small view onto a large image in which the + user can drag or flick the image in order to view different parts of it. - \clearfloat \snippet doc/src/snippets/declarative/flickable.qml document + \clearfloat \section1 Limitations \note Due to an implementation detail, items placed inside a Flickable cannot anchor to it by diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index a0faf14..f152d0d 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1070,27 +1070,41 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m GridView are laid out horizontally or vertically. Grid views are inherently flickable as GridView inherits from \l Flickable. - For example, if there is a simple list model defined in a file \c ContactModel.qml like this: + \section1 Example Usage + + The following example shows the definition of a simple list model defined + in a file called \c ContactModel.qml: \snippet doc/src/snippets/declarative/gridview/ContactModel.qml 0 - Another component can display this model data in a GridView, like this: + \beginfloatright + \inlineimage gridview-simple.png + \endfloat + + This model can be referenced as \c ContactModel in other QML files. See \l{QML Modules} + for more information about creating reusable components like this. + + Another component can display this model data in a GridView, as in the following + example, which creates a \c ContactModel component for its model, and a \l Column element + (containing \l Image and \l Text elements) for its delegate. + \clearfloat \snippet doc/src/snippets/declarative/gridview/gridview.qml import \codeline \snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs simple - \image gridview-simple.png - Here, the GridView creates a \c ContactModel component for its model, and a \l Column element - (containing \l Image and \ Text elements) for its delegate. The view will create a new delegate - for each item in the model. Notice the delegate is able to access the model's \c name and - \c portrait data directly. + \beginfloatright + \inlineimage gridview-highlight.png + \endfloat + + The view will create a new delegate for each item in the model. Note that the delegate + is able to access the model's \c name and \c portrait data directly. An improved grid view is shown below. The delegate is visually improved and is moved into a separate \c contactDelegate component. - + + \clearfloat \snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs advanced - \image gridview-highlight.png The currently selected item is highlighted with a blue \l Rectangle using the \l highlight property, and \c focus is set to \c true to enable keyboard navigation for the grid view. @@ -1099,10 +1113,10 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m Delegates are instantiated as needed and may be destroyed at any time. State should \e never be stored in a delegate. - \note Views do not enable \e clip automatically. If the view - is not clipped by another item or the screen, it will be necessary - to set \e {clip: true} in order to have the out of view items clipped - nicely. + \note Views do not set the \l{Item::}{clip} property automatically. + If the view is not clipped by another item or the screen, it will be necessary + to set this property to true in order to clip the items that are partially or + fully outside the view. \sa {declarative/modelviews/gridview}{GridView example} */ diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 177c5b3..8382970 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1394,11 +1394,14 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m QAbstractListModel. A ListView has a \l model, which defines the data to be displayed, and - a \l delegate, which defines how the data should be displayed. Items in a - ListView are laid out horizontally or vertically. List views are inherently flickable - as ListView inherits from \l Flickable. + a \l delegate, which defines how the data should be displayed. Items in a + ListView are laid out horizontally or vertically. List views are inherently + flickable because ListView inherits from \l Flickable. - For example, if there is a simple list model defined in a file \c ContactModel.qml like this: + \section1 Example Usage + + The following example shows the definition of a simple list model defined + in a file called \c ContactModel.qml: \snippet doc/src/snippets/declarative/listview/ContactModel.qml 0 @@ -1416,7 +1419,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m An improved list view is shown below. The delegate is visually improved and is moved into a separate \c contactDelegate component. - + \snippet doc/src/snippets/declarative/listview/listview.qml classdocs advanced \image listview-highlight.png diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index 5d71625..1066c2b 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -212,8 +212,8 @@ QDeclarativeLoader::~QDeclarativeLoader() \qmlproperty url Loader::source This property holds the URL of the QML component to instantiate. - Note the QML component must be an \l Item-based component. Loader cannot - load non-visual components. + Note the QML component must be an \l{Item}-based component. The loader + cannot load non-visual components. To unload the currently loaded item, set this property to an empty string, or set \l sourceComponent to \c undefined. @@ -275,8 +275,8 @@ void QDeclarativeLoader::setSource(const QUrl &url) } \endqml - To unload the currently loaded item, set this property to an empty string, - or set \l sourceComponent to \c undefined. + To unload the currently loaded item, set this property to an empty string + or \c undefined. \sa source, progress */ diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index de3f9fa..dad547f 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -404,14 +404,14 @@ QDeclarativePathView::~QDeclarativePathView() be instantiated, but not considered to be currently on the path. Usually, these items would be set invisible, for example: - \code + \qml Component { Rectangle { visible: PathView.onPath ... } } - \endcode + \endqml It is attached to each instance of the delegate. */ diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 60d8aa9..d3cf9c8 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -69,49 +69,67 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM \since 4.7 \brief The ListModel element defines a free-form list data source. - The ListModel is a simple hierarchy of elements containing data roles. The contents can - be defined dynamically, or explicitly in QML: + The ListModel is a simple container of ListElement definitions, each containing data roles. + The contents can be defined dynamically, or explicitly in QML. - For example: + The number of elements in the model can be obtained from its \l count property. + A number of familiar methods are also provided to manipulate the contents of the + model, including append(), insert(), move(), remove() and set(). These methods + accept dictionaries as their arguments; these are translated to ListElement objects + by the model. - \snippet doc/src/snippets/declarative/listmodel.qml 0 + Elements can be manipulated via the model using the setProperty() method, which + allows the roles of the specified element to be set and changed. + + \section1 Example Usage + + The following example shows a ListModel containing three elements, with the roles + "name" and "cost". - Roles (properties) must begin with a lower-case letter. The above example defines a - ListModel containing three elements, with the roles "name" and "cost". + \beginfloatright + \inlineimage listmodel.png + \endfloat + + \snippet doc/src/snippets/declarative/listmodel.qml 0 - Values must be simple constants - either strings (quoted and optionally within a call to QT_TR_NOOP), - bools (true, false), numbers, or enum values (like Text.AlignHCenter). + \clearfloat + Roles (properties) in each element must begin with a lower-case letter and + should be common to all elements in a model. The ListElement documentation + provides more guidelines for how elements should be defined. - The defined model can be used in views such as ListView: + Since the example model contains an \c id property, it can be referenced + by views, such as the ListView in this example: \snippet doc/src/snippets/declarative/listmodel-simple.qml 0 \dots 8 \snippet doc/src/snippets/declarative/listmodel-simple.qml 1 - \image listmodel.png - It is possible for roles to contain list data. In the example below we create a list of fruit attributes: + It is possible for roles to contain list data. In the following example we + create a list of fruit attributes: \snippet doc/src/snippets/declarative/listmodel-nested.qml model - The delegate below displays all the fruit attributes: + The delegate displays all the fruit attributes: - \snippet doc/src/snippets/declarative/listmodel-nested.qml delegate - \image listmodel-nested.png + \beginfloatright + \inlineimage listmodel-nested.png + \endfloat + \snippet doc/src/snippets/declarative/listmodel-nested.qml delegate - \section2 Modifying list models + \clearfloat + \section1 Modifying List Models The content of a ListModel may be created and modified using the clear(), append(), set() and setProperty() methods. For example: - - \snippet doc/src/snippets/declarative/listmodel-modify.qml delegate - Note that when creating content dynamically the set of available properties cannot be changed - once set. Whatever properties are first added to the model are the - only permitted properties in the model. + \snippet doc/src/snippets/declarative/listmodel-modify.qml delegate + Note that when creating content dynamically the set of available properties + cannot be changed once set. Whatever properties are first added to the model + are the only permitted properties in the model. - \section2 Using threaded list models with WorkerScript + \section1 Using Threaded List Models with WorkerScript ListModel can be used together with WorkerScript access a list model from multiple threads. This is useful if list modifications are @@ -127,16 +145,16 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM \snippet examples/declarative/threading/threadedlistmodel/dataloader.js 0 -working-with-data - worker script by calling \l WorkerScript::sendMessage(). When this message - is received, \l {WorkerScript::onMessage}{WorkerScript.onMessage()} is invoked in - \tt dataloader.js, which appends the current time to the list model. + The timer in the main example sends messages to the worker script by calling + \l WorkerScript::sendMessage(). When this message is received, + \l{WorkerScript::onMessage}{WorkerScript.onMessage()} is invoked in \c dataloader.js, + which appends the current time to the list model. - Note the call to sync() from the \l {WorkerScript::onMessage}{WorkerScript.onMessage()} handler. - You must call sync() or else the changes made to the list from the external + Note the call to sync() from the \l{WorkerScript::onMessage}{WorkerScript.onMessage()} + handler. You must call sync() or else the changes made to the list from the external thread will not be reflected in the list model in the main thread. - \section3 Limitations + \section1 Limitations If a list model is to be accessed from a WorkerScript, it \bold cannot contain list data. So, the following model cannot be used from a WorkerScript @@ -771,6 +789,39 @@ bool QDeclarativeListModelParser::definesEmptyList(const QString &s) \since 4.7 \brief The ListElement element defines a data item in a ListModel. + List elements are defined inside ListModel definitions, and represent items in a + list that will be displayed using ListView or \l Repeater items. + + List elements are defined like other QML elements except that they contain + a collection of \e role definitions instead of properties. Using the same + syntax as property definitions, roles both define how the data is accessed + and include the data itself. + + The names used for roles must begin with a lower-case letter and should be + common to all elements in a given model. Values must be simple constants; either + strings (quoted and optionally within a call to QT_TR_NOOP), boolean values + (true, false), numbers, or enumeration values (such as AlignText.AlignHCenter). + + \section1 Referencing Roles + + The role names are used by delegates to obtain data from list elements. + Each role name is accessible in the delegate's scope, and refers to the + corresponding role in the current element. Where a role name would be + ambiguous to use, it can be accessed via the \l{ListView::}{model} + property (e.g., \c{model.cost} instead of \c{cost}). + + \section1 Example Usage + + The following model defines a series of list elements, each of which + contain "name" and "cost" roles and their associated values. + + \snippet doc/src/snippets/declarative/qml-data-models/listelements.qml model + + The delegate obtains the name and cost for each element by simply referring + to \c name and \c cost: + + \snippet doc/src/snippets/declarative/qml-data-models/listelements.qml view + \sa ListModel */ -- cgit v0.12 From b82889e235b0ad7fc85a0d4c7bada4e82b930c02 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 14 Sep 2010 16:14:24 +0200 Subject: Doc: More work on the QML documentation. --- doc/src/declarative/pics/rect-border-width.png | Bin 356 -> 374 bytes doc/src/declarative/pics/rect-color.png | Bin 0 -> 570 bytes doc/src/getting-started/gettingstartedqml.qdoc | 2 +- .../snippets/declarative/SelfDestroyingRect.qml | 2 +- doc/src/snippets/declarative/Sprite.qml | 2 +- doc/src/snippets/declarative/anchoranimation.qml | 2 +- doc/src/snippets/declarative/anchorchanges.qml | 2 +- doc/src/snippets/declarative/animatedimage.qml | 2 +- .../snippets/declarative/animation-behavioral.qml | 2 +- doc/src/snippets/declarative/animation-easing.qml | 2 +- .../snippets/declarative/animation-elements.qml | 2 +- doc/src/snippets/declarative/animation-groups.qml | 2 +- .../declarative/animation-propertyvaluesource.qml | 2 +- .../declarative/animation-signalhandler.qml | 2 +- .../snippets/declarative/animation-standalone.qml | 2 +- .../snippets/declarative/animation-transitions.qml | 2 +- doc/src/snippets/declarative/behavior.qml | 2 +- .../declarative/borderimage/borderimage-scaled.qml | 2 +- .../declarative/borderimage/borderimage-tiled.qml | 2 +- .../declarative/borderimage/normal-image.qml | 2 +- .../codingconventions/dotproperties.qml | 2 +- .../codingconventions/javascript-imports.qml | 2 +- .../declarative/codingconventions/javascript.qml | 2 +- .../declarative/codingconventions/lists.qml | 2 +- .../declarative/codingconventions/photo.qml | 2 +- doc/src/snippets/declarative/coloranimation.qml | 2 +- doc/src/snippets/declarative/column/column.qml | 2 +- .../declarative/column/vertical-positioner.qml | 2 +- doc/src/snippets/declarative/comments.qml | 2 +- doc/src/snippets/declarative/component.qml | 2 +- .../declarative/createComponent-simple.qml | 2 +- doc/src/snippets/declarative/createComponent.qml | 2 +- doc/src/snippets/declarative/createQmlObject.qml | 2 +- .../declarative/dynamicObjects-destroy.qml | 2 +- doc/src/snippets/declarative/flickable.qml | 2 +- .../snippets/declarative/flickableScrollbar.qml | 2 +- doc/src/snippets/declarative/flipable/flipable.qml | 2 +- doc/src/snippets/declarative/flow-diagram.qml | 2 +- doc/src/snippets/declarative/flow.qml | 2 +- doc/src/snippets/declarative/focusscopes.qml | 2 +- doc/src/snippets/declarative/folderlistmodel.qml | 2 +- doc/src/snippets/declarative/gradient.qml | 2 +- doc/src/snippets/declarative/grid/grid-items.qml | 2 +- .../snippets/declarative/grid/grid-no-spacing.qml | 2 +- doc/src/snippets/declarative/grid/grid-spacing.qml | 2 +- doc/src/snippets/declarative/grid/grid.qml | 2 +- .../snippets/declarative/gridview/ContactModel.qml | 2 +- doc/src/snippets/declarative/gridview/gridview.qml | 2 +- doc/src/snippets/declarative/image.qml | 2 +- doc/src/snippets/declarative/listmodel-modify.qml | 2 +- doc/src/snippets/declarative/listmodel-nested.qml | 2 +- doc/src/snippets/declarative/listmodel-simple.qml | 2 +- doc/src/snippets/declarative/listmodel.qml | 2 +- .../snippets/declarative/listview/ContactModel.qml | 2 +- .../declarative/listview/listview-snippet.qml | 2 +- doc/src/snippets/declarative/listview/listview.qml | 2 +- doc/src/snippets/declarative/loader/KeyReader.qml | 2 +- doc/src/snippets/declarative/loader/MyItem.qml | 2 +- .../snippets/declarative/loader/connections.qml | 2 +- doc/src/snippets/declarative/loader/focus.qml | 2 +- doc/src/snippets/declarative/loader/simple.qml | 2 +- doc/src/snippets/declarative/mousearea.qml | 2 +- .../snippets/declarative/mouseareadragfilter.qml | 2 +- doc/src/snippets/declarative/numberanimation.qml | 2 +- doc/src/snippets/declarative/parallelanimation.qml | 2 +- doc/src/snippets/declarative/parentanimation.qml | 2 +- doc/src/snippets/declarative/parentchange.qml | 2 +- .../snippets/declarative/pathview/ContactModel.qml | 2 +- .../declarative/pathview/pathattributes.qml | 2 +- doc/src/snippets/declarative/pathview/pathview.qml | 2 +- doc/src/snippets/declarative/propertyaction.qml | 2 +- doc/src/snippets/declarative/propertyanimation.qml | 2 +- doc/src/snippets/declarative/propertychanges.qml | 2 +- .../qml-data-models/dynamic-listmodel.qml | 2 +- .../declarative/qml-data-models/listelements.qml | 2 +- .../qml-data-models/listmodel-listview.qml | 2 +- .../declarative/qml-documents/inline-component.qml | 2 +- .../qml-documents/inline-text-component.qml | 2 +- .../declarative/qml-documents/non-trivial.qml | 2 +- .../declarative/qml-documents/qmldocuments.qml | 2 +- .../snippets/declarative/qml-intro/anchors1.qml | 2 +- .../snippets/declarative/qml-intro/anchors2.qml | 2 +- .../snippets/declarative/qml-intro/anchors3.qml | 2 +- .../declarative/qml-intro/hello-world1.qml | 2 +- .../declarative/qml-intro/hello-world2.qml | 2 +- .../declarative/qml-intro/hello-world3.qml | 2 +- .../declarative/qml-intro/hello-world4.qml | 2 +- .../declarative/qml-intro/hello-world5.qml | 2 +- .../declarative/qml-intro/number-animation1.qml | 2 +- .../declarative/qml-intro/number-animation2.qml | 2 +- .../snippets/declarative/qml-intro/rectangle.qml | 2 +- .../qml-intro/sequential-animation1.qml | 2 +- .../qml-intro/sequential-animation2.qml | 2 +- .../qml-intro/sequential-animation3.qml | 2 +- doc/src/snippets/declarative/qml-intro/states1.qml | 2 +- .../declarative/qml-intro/transformations1.qml | 2 +- .../qtbinding/contextproperties/main.qml | 2 +- .../declarative/qtbinding/custompalette/main.qml | 2 +- .../declarative/qtbinding/resources/main.qml | 2 +- .../declarative/qtbinding/stopwatch/main.qml | 2 +- doc/src/snippets/declarative/qtobject.qml | 2 +- doc/src/snippets/declarative/rect-border-width.qml | 59 ----------- .../declarative/rectangle/rect-border-width.qml | 59 +++++++++++ .../declarative/rectangle/rectangle-colors.qml | 62 +++++++++++ .../declarative/rectangle/rectangle-gradient.qml | 74 +++++++++++++ .../snippets/declarative/rectangle/rectangle.qml | 52 +++++++++ .../declarative/repeaters/repeater-grid-index.qml | 2 +- .../snippets/declarative/repeaters/repeater.qml | 2 +- doc/src/snippets/declarative/rotation.qml | 2 +- doc/src/snippets/declarative/rotationanimation.qml | 2 +- doc/src/snippets/declarative/row.qml | 2 +- doc/src/snippets/declarative/row/row.qml | 2 +- .../snippets/declarative/sequentialanimation.qml | 2 +- doc/src/snippets/declarative/smoothedanimation.qml | 2 +- doc/src/snippets/declarative/springanimation.qml | 2 +- doc/src/snippets/declarative/state-when.qml | 2 +- doc/src/snippets/declarative/state.qml | 2 +- doc/src/snippets/declarative/states.qml | 2 +- doc/src/snippets/declarative/systempalette.qml | 2 +- doc/src/snippets/declarative/texteditor.qml | 2 +- .../snippets/declarative/transition-from-to.qml | 2 +- .../snippets/declarative/transition-reversible.qml | 2 +- doc/src/snippets/declarative/transition.qml | 2 +- doc/src/snippets/declarative/visualdatamodel.qml | 2 +- .../declarative/visualdatamodel_rootindex/view.qml | 2 +- doc/src/snippets/declarative/workerscript.qml | 2 +- doc/src/snippets/declarative/xmlrole.qml | 2 +- doc/src/snippets/declarative/~image-fillmode.qml | 46 -------- .../graphicsitems/qdeclarativerectangle.cpp | 116 +++++++++++---------- 129 files changed, 426 insertions(+), 282 deletions(-) create mode 100644 doc/src/declarative/pics/rect-color.png delete mode 100644 doc/src/snippets/declarative/rect-border-width.qml create mode 100644 doc/src/snippets/declarative/rectangle/rect-border-width.qml create mode 100644 doc/src/snippets/declarative/rectangle/rectangle-colors.qml create mode 100644 doc/src/snippets/declarative/rectangle/rectangle-gradient.qml create mode 100644 doc/src/snippets/declarative/rectangle/rectangle.qml delete mode 100644 doc/src/snippets/declarative/~image-fillmode.qml diff --git a/doc/src/declarative/pics/rect-border-width.png b/doc/src/declarative/pics/rect-border-width.png index c3c6c2c..e232cf3 100644 Binary files a/doc/src/declarative/pics/rect-border-width.png and b/doc/src/declarative/pics/rect-border-width.png differ diff --git a/doc/src/declarative/pics/rect-color.png b/doc/src/declarative/pics/rect-color.png new file mode 100644 index 0000000..b258ba9 Binary files /dev/null and b/doc/src/declarative/pics/rect-color.png differ diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index 1003eee..a5e45d9 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -530,7 +530,7 @@ the \c drawer, and the drawer's icon will undergo property changes to meet the current state. - \snippet examples/tutorial/gettingStarted/gsQml/texteditor.qml states + \snippet examples/tutorials/gettingStarted/gsQml/texteditor.qml states State changes are abrupt and needs smoother transitions. Transitions between states are defined using the \l {Transition}{Transition} element, which can then bind to diff --git a/doc/src/snippets/declarative/SelfDestroyingRect.qml b/doc/src/snippets/declarative/SelfDestroyingRect.qml index f14d2d2..413c04e 100644 --- a/doc/src/snippets/declarative/SelfDestroyingRect.qml +++ b/doc/src/snippets/declarative/SelfDestroyingRect.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/Sprite.qml b/doc/src/snippets/declarative/Sprite.qml index 42e9a8c..3928c4d 100644 --- a/doc/src/snippets/declarative/Sprite.qml +++ b/doc/src/snippets/declarative/Sprite.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/anchoranimation.qml b/doc/src/snippets/declarative/anchoranimation.qml index 9a7b8ff..f149326 100644 --- a/doc/src/snippets/declarative/anchoranimation.qml +++ b/doc/src/snippets/declarative/anchoranimation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/anchorchanges.qml b/doc/src/snippets/declarative/anchorchanges.qml index 3f11421..19356d7 100644 --- a/doc/src/snippets/declarative/anchorchanges.qml +++ b/doc/src/snippets/declarative/anchorchanges.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/animatedimage.qml b/doc/src/snippets/declarative/animatedimage.qml index bf5d611..66abbae 100644 --- a/doc/src/snippets/declarative/animatedimage.qml +++ b/doc/src/snippets/declarative/animatedimage.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/animation-behavioral.qml b/doc/src/snippets/declarative/animation-behavioral.qml index dc79018..a4fa648 100644 --- a/doc/src/snippets/declarative/animation-behavioral.qml +++ b/doc/src/snippets/declarative/animation-behavioral.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/animation-easing.qml b/doc/src/snippets/declarative/animation-easing.qml index e65c470..97f6e60 100644 --- a/doc/src/snippets/declarative/animation-easing.qml +++ b/doc/src/snippets/declarative/animation-easing.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/animation-elements.qml b/doc/src/snippets/declarative/animation-elements.qml index 7cb253e..a65bd67 100644 --- a/doc/src/snippets/declarative/animation-elements.qml +++ b/doc/src/snippets/declarative/animation-elements.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/animation-groups.qml b/doc/src/snippets/declarative/animation-groups.qml index 8a8f925..ba546c9 100644 --- a/doc/src/snippets/declarative/animation-groups.qml +++ b/doc/src/snippets/declarative/animation-groups.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/animation-propertyvaluesource.qml b/doc/src/snippets/declarative/animation-propertyvaluesource.qml index ac5f071..366505c 100644 --- a/doc/src/snippets/declarative/animation-propertyvaluesource.qml +++ b/doc/src/snippets/declarative/animation-propertyvaluesource.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/animation-signalhandler.qml b/doc/src/snippets/declarative/animation-signalhandler.qml index 749596c..492c007 100644 --- a/doc/src/snippets/declarative/animation-signalhandler.qml +++ b/doc/src/snippets/declarative/animation-signalhandler.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/animation-standalone.qml b/doc/src/snippets/declarative/animation-standalone.qml index d75fd92..c847d02 100644 --- a/doc/src/snippets/declarative/animation-standalone.qml +++ b/doc/src/snippets/declarative/animation-standalone.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/animation-transitions.qml b/doc/src/snippets/declarative/animation-transitions.qml index 3265065..5b0bb84 100644 --- a/doc/src/snippets/declarative/animation-transitions.qml +++ b/doc/src/snippets/declarative/animation-transitions.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/behavior.qml b/doc/src/snippets/declarative/behavior.qml index 4260e38..7f66e5a 100644 --- a/doc/src/snippets/declarative/behavior.qml +++ b/doc/src/snippets/declarative/behavior.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml b/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml index cc3ae2f..0ed9943 100644 --- a/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml +++ b/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml b/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml index e792814..680709d 100644 --- a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml +++ b/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/borderimage/normal-image.qml b/doc/src/snippets/declarative/borderimage/normal-image.qml index 76ec6e2..85a7f52 100644 --- a/doc/src/snippets/declarative/borderimage/normal-image.qml +++ b/doc/src/snippets/declarative/borderimage/normal-image.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/codingconventions/dotproperties.qml b/doc/src/snippets/declarative/codingconventions/dotproperties.qml index dbf3de6..8a173cd 100644 --- a/doc/src/snippets/declarative/codingconventions/dotproperties.qml +++ b/doc/src/snippets/declarative/codingconventions/dotproperties.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml b/doc/src/snippets/declarative/codingconventions/javascript-imports.qml index 88f89a7..391bf27 100644 --- a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml +++ b/doc/src/snippets/declarative/codingconventions/javascript-imports.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/codingconventions/javascript.qml b/doc/src/snippets/declarative/codingconventions/javascript.qml index fd19b02..90790b9 100644 --- a/doc/src/snippets/declarative/codingconventions/javascript.qml +++ b/doc/src/snippets/declarative/codingconventions/javascript.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/codingconventions/lists.qml b/doc/src/snippets/declarative/codingconventions/lists.qml index 66e0728..8d2bdbc 100644 --- a/doc/src/snippets/declarative/codingconventions/lists.qml +++ b/doc/src/snippets/declarative/codingconventions/lists.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/codingconventions/photo.qml b/doc/src/snippets/declarative/codingconventions/photo.qml index 39fc852..359a756 100644 --- a/doc/src/snippets/declarative/codingconventions/photo.qml +++ b/doc/src/snippets/declarative/codingconventions/photo.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/coloranimation.qml b/doc/src/snippets/declarative/coloranimation.qml index 7e8e9fe..d904721 100644 --- a/doc/src/snippets/declarative/coloranimation.qml +++ b/doc/src/snippets/declarative/coloranimation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/column/column.qml b/doc/src/snippets/declarative/column/column.qml index e372cfd..6d378bb 100644 --- a/doc/src/snippets/declarative/column/column.qml +++ b/doc/src/snippets/declarative/column/column.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/column/vertical-positioner.qml b/doc/src/snippets/declarative/column/vertical-positioner.qml index 27b09c1..86ecc55 100644 --- a/doc/src/snippets/declarative/column/vertical-positioner.qml +++ b/doc/src/snippets/declarative/column/vertical-positioner.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/comments.qml b/doc/src/snippets/declarative/comments.qml index 9be0ce5..aa034c6 100644 --- a/doc/src/snippets/declarative/comments.qml +++ b/doc/src/snippets/declarative/comments.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/component.qml b/doc/src/snippets/declarative/component.qml index a0ab28c..84c063f 100644 --- a/doc/src/snippets/declarative/component.qml +++ b/doc/src/snippets/declarative/component.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/createComponent-simple.qml b/doc/src/snippets/declarative/createComponent-simple.qml index 9669580..f4c240d 100644 --- a/doc/src/snippets/declarative/createComponent-simple.qml +++ b/doc/src/snippets/declarative/createComponent-simple.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/createComponent.qml b/doc/src/snippets/declarative/createComponent.qml index 0f9fad5..f1a7436 100644 --- a/doc/src/snippets/declarative/createComponent.qml +++ b/doc/src/snippets/declarative/createComponent.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/declarative/createQmlObject.qml index a5f15f4..6a4eae8 100644 --- a/doc/src/snippets/declarative/createQmlObject.qml +++ b/doc/src/snippets/declarative/createQmlObject.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/dynamicObjects-destroy.qml b/doc/src/snippets/declarative/dynamicObjects-destroy.qml index 2c0c2fb..b4ae80c 100644 --- a/doc/src/snippets/declarative/dynamicObjects-destroy.qml +++ b/doc/src/snippets/declarative/dynamicObjects-destroy.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/flickable.qml b/doc/src/snippets/declarative/flickable.qml index d7a163b..a283e9a 100644 --- a/doc/src/snippets/declarative/flickable.qml +++ b/doc/src/snippets/declarative/flickable.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/flickableScrollbar.qml b/doc/src/snippets/declarative/flickableScrollbar.qml index 2fdc3f1..fc06f63 100644 --- a/doc/src/snippets/declarative/flickableScrollbar.qml +++ b/doc/src/snippets/declarative/flickableScrollbar.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/flipable/flipable.qml b/doc/src/snippets/declarative/flipable/flipable.qml index c2ecbbe..eaf367a 100644 --- a/doc/src/snippets/declarative/flipable/flipable.qml +++ b/doc/src/snippets/declarative/flipable/flipable.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/flow-diagram.qml b/doc/src/snippets/declarative/flow-diagram.qml index 80506b9..f34e3fd 100644 --- a/doc/src/snippets/declarative/flow-diagram.qml +++ b/doc/src/snippets/declarative/flow-diagram.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/flow.qml b/doc/src/snippets/declarative/flow.qml index 77db683..809627e 100644 --- a/doc/src/snippets/declarative/flow.qml +++ b/doc/src/snippets/declarative/flow.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/focusscopes.qml b/doc/src/snippets/declarative/focusscopes.qml index 682fb58..da6a850 100644 --- a/doc/src/snippets/declarative/focusscopes.qml +++ b/doc/src/snippets/declarative/focusscopes.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/folderlistmodel.qml b/doc/src/snippets/declarative/folderlistmodel.qml index bb9ea28..a5e0071 100644 --- a/doc/src/snippets/declarative/folderlistmodel.qml +++ b/doc/src/snippets/declarative/folderlistmodel.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/gradient.qml b/doc/src/snippets/declarative/gradient.qml index a385485..4c8bd40 100644 --- a/doc/src/snippets/declarative/gradient.qml +++ b/doc/src/snippets/declarative/gradient.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/grid/grid-items.qml b/doc/src/snippets/declarative/grid/grid-items.qml index 5099758..2382d38 100644 --- a/doc/src/snippets/declarative/grid/grid-items.qml +++ b/doc/src/snippets/declarative/grid/grid-items.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/grid/grid-no-spacing.qml b/doc/src/snippets/declarative/grid/grid-no-spacing.qml index f04c242..6318165 100644 --- a/doc/src/snippets/declarative/grid/grid-no-spacing.qml +++ b/doc/src/snippets/declarative/grid/grid-no-spacing.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/grid/grid-spacing.qml b/doc/src/snippets/declarative/grid/grid-spacing.qml index 8715977..fb3822c 100644 --- a/doc/src/snippets/declarative/grid/grid-spacing.qml +++ b/doc/src/snippets/declarative/grid/grid-spacing.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/grid/grid.qml b/doc/src/snippets/declarative/grid/grid.qml index d57b4b2..4599806 100644 --- a/doc/src/snippets/declarative/grid/grid.qml +++ b/doc/src/snippets/declarative/grid/grid.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/gridview/ContactModel.qml b/doc/src/snippets/declarative/gridview/ContactModel.qml index ac896c9..9fdeb4a 100644 --- a/doc/src/snippets/declarative/gridview/ContactModel.qml +++ b/doc/src/snippets/declarative/gridview/ContactModel.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/declarative/gridview/gridview.qml index e92a429..cbebb0a 100644 --- a/doc/src/snippets/declarative/gridview/gridview.qml +++ b/doc/src/snippets/declarative/gridview/gridview.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/image.qml b/doc/src/snippets/declarative/image.qml index 42efb8f..228e83a 100644 --- a/doc/src/snippets/declarative/image.qml +++ b/doc/src/snippets/declarative/image.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/listmodel-modify.qml b/doc/src/snippets/declarative/listmodel-modify.qml index 8f381f7..f08137f 100644 --- a/doc/src/snippets/declarative/listmodel-modify.qml +++ b/doc/src/snippets/declarative/listmodel-modify.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/listmodel-nested.qml b/doc/src/snippets/declarative/listmodel-nested.qml index 3d876a3..c38ee2d 100644 --- a/doc/src/snippets/declarative/listmodel-nested.qml +++ b/doc/src/snippets/declarative/listmodel-nested.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/listmodel-simple.qml b/doc/src/snippets/declarative/listmodel-simple.qml index 382fd13..e561284 100644 --- a/doc/src/snippets/declarative/listmodel-simple.qml +++ b/doc/src/snippets/declarative/listmodel-simple.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/listmodel.qml b/doc/src/snippets/declarative/listmodel.qml index 3dc04f9..20f2074 100644 --- a/doc/src/snippets/declarative/listmodel.qml +++ b/doc/src/snippets/declarative/listmodel.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/listview/ContactModel.qml b/doc/src/snippets/declarative/listview/ContactModel.qml index aa26cf4..f48f84f 100644 --- a/doc/src/snippets/declarative/listview/ContactModel.qml +++ b/doc/src/snippets/declarative/listview/ContactModel.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/listview/listview-snippet.qml b/doc/src/snippets/declarative/listview/listview-snippet.qml index c510472..d81bcbb 100644 --- a/doc/src/snippets/declarative/listview/listview-snippet.qml +++ b/doc/src/snippets/declarative/listview/listview-snippet.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml index cde820e..2945b2f 100644 --- a/doc/src/snippets/declarative/listview/listview.qml +++ b/doc/src/snippets/declarative/listview/listview.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/loader/KeyReader.qml b/doc/src/snippets/declarative/loader/KeyReader.qml index 4423ac6..66a74fa 100644 --- a/doc/src/snippets/declarative/loader/KeyReader.qml +++ b/doc/src/snippets/declarative/loader/KeyReader.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/doc/src/snippets/declarative/loader/MyItem.qml b/doc/src/snippets/declarative/loader/MyItem.qml index cc69661..22c3fd3 100644 --- a/doc/src/snippets/declarative/loader/MyItem.qml +++ b/doc/src/snippets/declarative/loader/MyItem.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/doc/src/snippets/declarative/loader/connections.qml b/doc/src/snippets/declarative/loader/connections.qml index babac4e..a1cdce2 100644 --- a/doc/src/snippets/declarative/loader/connections.qml +++ b/doc/src/snippets/declarative/loader/connections.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/doc/src/snippets/declarative/loader/focus.qml b/doc/src/snippets/declarative/loader/focus.qml index 464d986..4b4c940 100644 --- a/doc/src/snippets/declarative/loader/focus.qml +++ b/doc/src/snippets/declarative/loader/focus.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/doc/src/snippets/declarative/loader/simple.qml b/doc/src/snippets/declarative/loader/simple.qml index e0dc6b3..bb06ffc 100644 --- a/doc/src/snippets/declarative/loader/simple.qml +++ b/doc/src/snippets/declarative/loader/simple.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/doc/src/snippets/declarative/mousearea.qml b/doc/src/snippets/declarative/mousearea.qml index fb6cba0..e7764f9 100644 --- a/doc/src/snippets/declarative/mousearea.qml +++ b/doc/src/snippets/declarative/mousearea.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/mouseareadragfilter.qml b/doc/src/snippets/declarative/mouseareadragfilter.qml index 52ed10c..fa0682e 100644 --- a/doc/src/snippets/declarative/mouseareadragfilter.qml +++ b/doc/src/snippets/declarative/mouseareadragfilter.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/numberanimation.qml b/doc/src/snippets/declarative/numberanimation.qml index 0a1d5a4..19c0b0d 100644 --- a/doc/src/snippets/declarative/numberanimation.qml +++ b/doc/src/snippets/declarative/numberanimation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/parallelanimation.qml b/doc/src/snippets/declarative/parallelanimation.qml index a8e80cd..caf4e01 100644 --- a/doc/src/snippets/declarative/parallelanimation.qml +++ b/doc/src/snippets/declarative/parallelanimation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/parentanimation.qml b/doc/src/snippets/declarative/parentanimation.qml index 506eff4..b8a4c00 100644 --- a/doc/src/snippets/declarative/parentanimation.qml +++ b/doc/src/snippets/declarative/parentanimation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/parentchange.qml b/doc/src/snippets/declarative/parentchange.qml index c704f12..72932b2 100644 --- a/doc/src/snippets/declarative/parentchange.qml +++ b/doc/src/snippets/declarative/parentchange.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/pathview/ContactModel.qml b/doc/src/snippets/declarative/pathview/ContactModel.qml index df90d4d..62daf3d 100644 --- a/doc/src/snippets/declarative/pathview/ContactModel.qml +++ b/doc/src/snippets/declarative/pathview/ContactModel.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml index 4daee63..a45f15a 100644 --- a/doc/src/snippets/declarative/pathview/pathattributes.qml +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml index d9804dc..e03c615 100644 --- a/doc/src/snippets/declarative/pathview/pathview.qml +++ b/doc/src/snippets/declarative/pathview/pathview.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/propertyaction.qml b/doc/src/snippets/declarative/propertyaction.qml index ff299f1..696c9ef 100644 --- a/doc/src/snippets/declarative/propertyaction.qml +++ b/doc/src/snippets/declarative/propertyaction.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/propertyanimation.qml b/doc/src/snippets/declarative/propertyanimation.qml index 55ea9f6..24efd60 100644 --- a/doc/src/snippets/declarative/propertyanimation.qml +++ b/doc/src/snippets/declarative/propertyanimation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/propertychanges.qml b/doc/src/snippets/declarative/propertychanges.qml index 5959e54..06a3fae 100644 --- a/doc/src/snippets/declarative/propertychanges.qml +++ b/doc/src/snippets/declarative/propertychanges.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml b/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml index 72e27f3..48f2bdb 100644 --- a/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml +++ b/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-data-models/listelements.qml b/doc/src/snippets/declarative/qml-data-models/listelements.qml index d9cea81..2d12567 100644 --- a/doc/src/snippets/declarative/qml-data-models/listelements.qml +++ b/doc/src/snippets/declarative/qml-data-models/listelements.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml b/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml index 92107f1..69533c9 100644 --- a/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml +++ b/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-documents/inline-component.qml b/doc/src/snippets/declarative/qml-documents/inline-component.qml index 9233bbf..45d7eb4 100644 --- a/doc/src/snippets/declarative/qml-documents/inline-component.qml +++ b/doc/src/snippets/declarative/qml-documents/inline-component.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-documents/inline-text-component.qml b/doc/src/snippets/declarative/qml-documents/inline-text-component.qml index 83ba213..1f3af33 100644 --- a/doc/src/snippets/declarative/qml-documents/inline-text-component.qml +++ b/doc/src/snippets/declarative/qml-documents/inline-text-component.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-documents/non-trivial.qml b/doc/src/snippets/declarative/qml-documents/non-trivial.qml index eb2364b..e9cba98 100644 --- a/doc/src/snippets/declarative/qml-documents/non-trivial.qml +++ b/doc/src/snippets/declarative/qml-documents/non-trivial.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-documents/qmldocuments.qml b/doc/src/snippets/declarative/qml-documents/qmldocuments.qml index cd0a1f7..a4b5589 100644 --- a/doc/src/snippets/declarative/qml-documents/qmldocuments.qml +++ b/doc/src/snippets/declarative/qml-documents/qmldocuments.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/anchors1.qml b/doc/src/snippets/declarative/qml-intro/anchors1.qml index c1158b8..ba6f928 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors1.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors1.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/anchors2.qml b/doc/src/snippets/declarative/qml-intro/anchors2.qml index a7d4922..ac60e1b 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors2.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors2.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/anchors3.qml b/doc/src/snippets/declarative/qml-intro/anchors3.qml index a2e0f03..ab74670 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors3.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors3.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/hello-world1.qml b/doc/src/snippets/declarative/qml-intro/hello-world1.qml index 9b91049..55b39c6 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world1.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world1.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/hello-world2.qml b/doc/src/snippets/declarative/qml-intro/hello-world2.qml index ddc1017..c537528 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world2.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world2.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/hello-world3.qml b/doc/src/snippets/declarative/qml-intro/hello-world3.qml index f1102c2..794c406 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world3.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world3.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/hello-world4.qml b/doc/src/snippets/declarative/qml-intro/hello-world4.qml index 9656ff8..7ea4bed 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world4.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world4.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/hello-world5.qml b/doc/src/snippets/declarative/qml-intro/hello-world5.qml index b816e09..3345882 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world5.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world5.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/number-animation1.qml b/doc/src/snippets/declarative/qml-intro/number-animation1.qml index 7b405e4..64ebe7a 100644 --- a/doc/src/snippets/declarative/qml-intro/number-animation1.qml +++ b/doc/src/snippets/declarative/qml-intro/number-animation1.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/number-animation2.qml b/doc/src/snippets/declarative/qml-intro/number-animation2.qml index f109f76..7905002 100644 --- a/doc/src/snippets/declarative/qml-intro/number-animation2.qml +++ b/doc/src/snippets/declarative/qml-intro/number-animation2.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/rectangle.qml b/doc/src/snippets/declarative/qml-intro/rectangle.qml index 0078813..1ce0a04 100644 --- a/doc/src/snippets/declarative/qml-intro/rectangle.qml +++ b/doc/src/snippets/declarative/qml-intro/rectangle.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml index 7ae2fde..a1a1af9 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml index ac0f3f5..f83c224 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml index 97c574b..32bf59c 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/states1.qml b/doc/src/snippets/declarative/qml-intro/states1.qml index 9619eb7..6e7bab1 100644 --- a/doc/src/snippets/declarative/qml-intro/states1.qml +++ b/doc/src/snippets/declarative/qml-intro/states1.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qml-intro/transformations1.qml b/doc/src/snippets/declarative/qml-intro/transformations1.qml index b4a1692..7ca3aee 100644 --- a/doc/src/snippets/declarative/qml-intro/transformations1.qml +++ b/doc/src/snippets/declarative/qml-intro/transformations1.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml index 8b8f3f5..341765a 100644 --- a/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml +++ b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qtbinding/custompalette/main.qml b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml index 3781a12..ea8464c 100644 --- a/doc/src/snippets/declarative/qtbinding/custompalette/main.qml +++ b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qtbinding/resources/main.qml b/doc/src/snippets/declarative/qtbinding/resources/main.qml index e4dfe4f..b12af9e 100644 --- a/doc/src/snippets/declarative/qtbinding/resources/main.qml +++ b/doc/src/snippets/declarative/qtbinding/resources/main.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml index 5d7b8f6..75c0831 100644 --- a/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml +++ b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/qtobject.qml b/doc/src/snippets/declarative/qtobject.qml index bd48390..581af16 100644 --- a/doc/src/snippets/declarative/qtobject.qml +++ b/doc/src/snippets/declarative/qtobject.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/rect-border-width.qml b/doc/src/snippets/declarative/rect-border-width.qml deleted file mode 100644 index e6628c9..0000000 --- a/doc/src/snippets/declarative/rect-border-width.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 - -//![0] -Rectangle { - width: 100; height: 100 - color: "yellow" - - Rectangle { - anchors.fill: parent - anchors.margins: 10 - clip: true - - Rectangle { - anchors.fill: parent - border.width: 1 - } - } -} -//![0] diff --git a/doc/src/snippets/declarative/rectangle/rect-border-width.qml b/doc/src/snippets/declarative/rectangle/rect-border-width.qml new file mode 100644 index 0000000..3cf0831 --- /dev/null +++ b/doc/src/snippets/declarative/rectangle/rect-border-width.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +//![0] +Rectangle { + width: 100; height: 100 + color: "lightblue" + + Rectangle { + anchors.fill: parent + anchors.margins: 10 + clip: true + + Rectangle { + anchors.fill: parent + border.width: 1 + } + } +} +//![0] diff --git a/doc/src/snippets/declarative/rectangle/rectangle-colors.qml b/doc/src/snippets/declarative/rectangle/rectangle-colors.qml new file mode 100644 index 0000000..8f306f6 --- /dev/null +++ b/doc/src/snippets/declarative/rectangle/rectangle-colors.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Item { + width: 100; height: 200 + +Item { + x: 10; y: 10 + width: 80; height: 180 + +//! [rectangles] +Rectangle { + color: "#00B000" + width: 80; height: 80 +} + +Rectangle { + color: "steelblue" + y: 100; width: 80; height: 80 +} +//! [rectangles] +} +} diff --git a/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml b/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml new file mode 100644 index 0000000..aff5849 --- /dev/null +++ b/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Item { + width: 100; height: 300 + +Item { + x: 10; y: 10 + width: 80; height: 280 + +//! [rectangles] +Rectangle { + y: 0; width: 80; height: 80 + color: "lightsteelblue" +} + +Rectangle { + y: 100; width: 80; height: 80 + gradient: Gradient { + GradientStop { position: 0.0; color: "lightsteelblue" } + GradientStop { position: 1.0; color: "blue" } + } +} + +Rectangle { + y: 200; width: 80; height: 80 + rotation: 90 + gradient: Gradient { + GradientStop { position: 0.0; color: "lightsteelblue" } + GradientStop { position: 1.0; color: "blue" } + } +} +//! [rectangles] +} +} diff --git a/doc/src/snippets/declarative/rectangle/rectangle.qml b/doc/src/snippets/declarative/rectangle/rectangle.qml new file mode 100644 index 0000000..a464cb9 --- /dev/null +++ b/doc/src/snippets/declarative/rectangle/rectangle.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Rectangle { + width: 100 + height: 100 + color: "red" + border.color: "black" + border.width: 5 + radius: 10 +} +//! [document] diff --git a/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml b/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml index 106550e..dbf24ae 100644 --- a/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml +++ b/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/repeaters/repeater.qml b/doc/src/snippets/declarative/repeaters/repeater.qml index d71fd29..db606d0 100644 --- a/doc/src/snippets/declarative/repeaters/repeater.qml +++ b/doc/src/snippets/declarative/repeaters/repeater.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/declarative/rotation.qml index c3ff304..4db8b4a 100644 --- a/doc/src/snippets/declarative/rotation.qml +++ b/doc/src/snippets/declarative/rotation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/rotationanimation.qml b/doc/src/snippets/declarative/rotationanimation.qml index a0f6354..2309d0a 100644 --- a/doc/src/snippets/declarative/rotationanimation.qml +++ b/doc/src/snippets/declarative/rotationanimation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/row.qml b/doc/src/snippets/declarative/row.qml index bd2db16..efb6190 100644 --- a/doc/src/snippets/declarative/row.qml +++ b/doc/src/snippets/declarative/row.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/row/row.qml b/doc/src/snippets/declarative/row/row.qml index c863243..8096c0f 100644 --- a/doc/src/snippets/declarative/row/row.qml +++ b/doc/src/snippets/declarative/row/row.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/sequentialanimation.qml b/doc/src/snippets/declarative/sequentialanimation.qml index bf73be5..1a17ae9 100644 --- a/doc/src/snippets/declarative/sequentialanimation.qml +++ b/doc/src/snippets/declarative/sequentialanimation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/smoothedanimation.qml b/doc/src/snippets/declarative/smoothedanimation.qml index 20c90b5..edc33db 100644 --- a/doc/src/snippets/declarative/smoothedanimation.qml +++ b/doc/src/snippets/declarative/smoothedanimation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/springanimation.qml b/doc/src/snippets/declarative/springanimation.qml index 8e810e1..fe5aeb8 100644 --- a/doc/src/snippets/declarative/springanimation.qml +++ b/doc/src/snippets/declarative/springanimation.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/state-when.qml b/doc/src/snippets/declarative/state-when.qml index 8e38f82..6dbd099 100644 --- a/doc/src/snippets/declarative/state-when.qml +++ b/doc/src/snippets/declarative/state-when.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/state.qml b/doc/src/snippets/declarative/state.qml index 5f43947..8597314 100644 --- a/doc/src/snippets/declarative/state.qml +++ b/doc/src/snippets/declarative/state.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/declarative/states.qml index 1f9dc2c..be483af 100644 --- a/doc/src/snippets/declarative/states.qml +++ b/doc/src/snippets/declarative/states.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/systempalette.qml b/doc/src/snippets/declarative/systempalette.qml index cf5c902..5e540b9 100644 --- a/doc/src/snippets/declarative/systempalette.qml +++ b/doc/src/snippets/declarative/systempalette.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/texteditor.qml b/doc/src/snippets/declarative/texteditor.qml index 6cfbcc8..55438f4 100644 --- a/doc/src/snippets/declarative/texteditor.qml +++ b/doc/src/snippets/declarative/texteditor.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/transition-from-to.qml b/doc/src/snippets/declarative/transition-from-to.qml index 09949fc..73bf880 100644 --- a/doc/src/snippets/declarative/transition-from-to.qml +++ b/doc/src/snippets/declarative/transition-from-to.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/transition-reversible.qml b/doc/src/snippets/declarative/transition-reversible.qml index 367ad49..b64cf37 100644 --- a/doc/src/snippets/declarative/transition-reversible.qml +++ b/doc/src/snippets/declarative/transition-reversible.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/transition.qml b/doc/src/snippets/declarative/transition.qml index a79e483..6a8a2f5 100644 --- a/doc/src/snippets/declarative/transition.qml +++ b/doc/src/snippets/declarative/transition.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/visualdatamodel.qml b/doc/src/snippets/declarative/visualdatamodel.qml index 231e4dd..67f9b6b 100644 --- a/doc/src/snippets/declarative/visualdatamodel.qml +++ b/doc/src/snippets/declarative/visualdatamodel.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml b/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml index 9e759f9..10bcfe8 100644 --- a/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml +++ b/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/workerscript.qml b/doc/src/snippets/declarative/workerscript.qml index 6bc33fb..434a90e 100644 --- a/doc/src/snippets/declarative/workerscript.qml +++ b/doc/src/snippets/declarative/workerscript.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/xmlrole.qml b/doc/src/snippets/declarative/xmlrole.qml index 85fe9c8..9c8af89 100644 --- a/doc/src/snippets/declarative/xmlrole.qml +++ b/doc/src/snippets/declarative/xmlrole.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/doc/src/snippets/declarative/~image-fillmode.qml b/doc/src/snippets/declarative/~image-fillmode.qml deleted file mode 100644 index cee26c4..0000000 --- a/doc/src/snippets/declarative/~image-fillmode.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 - -Image { - source: "pics/qtlogo.png" - width: 20; height: 20 -} diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index d027924..9238004 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -155,27 +155,46 @@ void QDeclarativeGradient::doUpdate() /*! \qmlclass Rectangle QDeclarativeRectangle \ingroup qml-basic-visual-elements - \since 4.7 - \brief The Rectangle item allows you to add rectangles to a scene. + \since 4.7 + \brief The Rectangle item provides a filled rectangle with an optional border. \inherits Item - A Rectangle is painted using a solid fill (color) and an optional border. - You can also create rounded rectangles using the \l radius property. + Rectangle items are used to fill areas with solid color or gradients, and are + often used to hold other items. - \qml - import Qt 4.7 - - Rectangle { - width: 100 - height: 100 - color: "red" - border.color: "black" - border.width: 5 - radius: 10 - } - \endqml + \section1 Appearance + + Each Rectangle item is painted using either a solid fill color, specified using + the \l color property, or a gradient, defined using a Gradient element and set + using the \l gradient property. If both a color and a gradient are specified, + the gradient is used. + + You can add an optional border to a rectangle with its own color and thickness + by settting the \l border.color and \l border.width properties. + + You can also create rounded rectangles using the \l radius property. Since this + introduces curved edges to the corners of a rectangle, it may be appropriate to + set the \l smooth property to improve its appearance. + + \section1 Example Usage - \image declarative-rect.png + \beginfloatright + \inlineimage declarative-rect.png + \endfloat + + The following example shows the effects of some of the common properties on a + Rectangle item, which in this case is used to create a square: + + \snippet doc/src/snippets/declarative/rectangle/rectangle.qml document + + \clearfloat + \section1 Performance + + Using the \l smooth property improves the appearance of a rounded rectangle at + the cost of rendering performance. You should consider unsetting this property + for rectangles in motion, and only set it when they are stationary. + + \sa Image */ int QDeclarativeRectanglePrivate::doUpdateSlotIdx = -1; @@ -207,13 +226,14 @@ void QDeclarativeRectangle::doUpdate() rectangle's boundaries, and the spare pixel is rendered to the right and below the rectangle (as documented for QRect rendering). This can cause unintended effects if \c border.width is 1 and the rectangle is \l{Item::clip}{clipped} by a parent item: - - \table - \row - \o \snippet doc/src/snippets/declarative/rect-border-width.qml 0 - \o \image rect-border-width.png - \endtable + \beginfloatright + \inlineimage rect-border-width.png + \endfloat + + \snippet doc/src/snippets/declarative/rectangle/rect-border-width.qml 0 + + \clearfloat Here, the innermost rectangle's border is clipped on the bottom and right edges by its parent. To avoid this, the border width can be set to two instead of one. */ @@ -231,34 +251,12 @@ QDeclarativePen *QDeclarativeRectangle::border() This property allows for the construction of simple vertical gradients. Other gradients may by formed by adding rotation to the rectangle. - \table - \row - \o \image declarative-rect_gradient.png - \o - \qml - Rectangle { - y: 0; width: 80; height: 80 - color: "lightsteelblue" - } + \beginfloatleft + \inlineimage declarative-rect_gradient.png + \endfloat - Rectangle { - y: 100; width: 80; height: 80 - gradient: Gradient { - GradientStop { position: 0.0; color: "lightsteelblue" } - GradientStop { position: 1.0; color: "blue" } - } - } - - Rectangle { - y: 200; width: 80; height: 80 - rotation: 90 - gradient: Gradient { - GradientStop { position: 0.0; color: "lightsteelblue" } - GradientStop { position: 1.0; color: "blue" } - } - } - \endqml - \endtable + \snippet doc/src/snippets/declarative/rectangle/rectangle-gradient.qml rectangles + \clearfloat If both a gradient and a color are specified, the gradient will be used. @@ -319,17 +317,21 @@ void QDeclarativeRectangle::setRadius(qreal radius) \qmlproperty color Rectangle::color This property holds the color used to fill the rectangle. - \qml - // green rectangle using hexidecimal notation - Rectangle { color: "#00FF00" } + The default color is white. - // steelblue rectangle using SVG color name - Rectangle { color: "steelblue" } - \endqml + \beginfloatright + \inlineimage rect-color.png + \endfloat - The default color is white. + The following example shows rectangles with colors specified + using hexadecimal and named color notation: + + \snippet doc/src/snippets/declarative/rectangle/rectangle-colors.qml rectangles + \clearfloat If both a gradient and a color are specified, the gradient will be used. + + \sa gradient */ QColor QDeclarativeRectangle::color() const { -- cgit v0.12 From 6454f4db1697af1d36ad4c0ea83ccd0bb490fd39 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 14 Sep 2010 16:43:47 +0200 Subject: This patch allows modifications on PropertyChanges on the fly This is important for Bauhaus to ensure that we can edit properties and states dynamically in the visual editor Most of the changes consist of added functions for Bauhaus, that do not affect any current behaviour. Important changes: QDeclarativeAbstractBinding is holding a QSharedPointer to itself so that other classes can hold a weak reference to avoid accessing dangling pointers while keeping track of bindings. QDeclarativeStateOperation now has its own private class QDeclarativeStateOperationPrivate to hold a pointer back to QDeclarativeState since the parent is not set correctly in every context. QDeclarativePropertyChangesPrivate does now hold a QDeclarativeGuard instead of a raw pointer to the target QObject. In Bauhaus the target object might be deleted. Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativebinding.cpp | 13 + src/declarative/qml/qdeclarativebinding_p.h | 6 + src/declarative/qml/qdeclarativecomponent_p.h | 2 +- src/declarative/qml/qdeclarativeengine.cpp | 2 +- .../util/qdeclarativepropertychanges.cpp | 275 ++++++++++++++++++++- .../util/qdeclarativepropertychanges_p.h | 16 +- src/declarative/util/qdeclarativestate.cpp | 238 ++++++++++++++++-- src/declarative/util/qdeclarativestate_p.h | 21 ++ src/declarative/util/qdeclarativestate_p_p.h | 135 ++++++++-- .../util/qdeclarativestateoperations.cpp | 7 +- .../util/qdeclarativetransitionmanager.cpp | 4 +- 11 files changed, 670 insertions(+), 49 deletions(-) diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index e096305..cb6ad8c 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -48,6 +48,7 @@ #include "private/qdeclarativecontext_p.h" #include "private/qdeclarativedata_p.h" #include "private/qdeclarativestringconverters_p.h" +#include "private/qdeclarativestate_p_p.h" #include #include @@ -373,6 +374,18 @@ void QDeclarativeAbstractBinding::removeFromObject() } } +static void bindingDummyDeleter(QDeclarativeAbstractBinding *) +{ +} + +QDeclarativeAbstractBinding::Pointer QDeclarativeAbstractBinding::weakPointer() +{ + if (m_selfPointer.isNull()) + m_selfPointer = QSharedPointer(this, bindingDummyDeleter); + + return m_selfPointer.toWeakRef(); +} + void QDeclarativeAbstractBinding::clear() { if (m_mePtr) { diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index 598f09f..f38ed23 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -67,6 +67,8 @@ QT_BEGIN_NAMESPACE class Q_DECLARATIVE_EXPORT QDeclarativeAbstractBinding { public: + typedef QWeakPointer Pointer; + QDeclarativeAbstractBinding(); virtual void destroy(); @@ -86,6 +88,8 @@ public: void addToObject(QObject *); void removeFromObject(); + Pointer weakPointer(); + protected: virtual ~QDeclarativeAbstractBinding(); void clear(); @@ -96,11 +100,13 @@ private: friend class QDeclarativeValueTypeProxyBinding; friend class QDeclarativePropertyPrivate; friend class QDeclarativeVME; + friend class QtSharedPointer::ExternalRefCount; QObject *m_object; QDeclarativeAbstractBinding **m_mePtr; QDeclarativeAbstractBinding **m_prevBinding; QDeclarativeAbstractBinding *m_nextBinding; + QSharedPointer m_selfPointer; }; class QDeclarativeValueTypeProxyBinding : public QDeclarativeAbstractBinding diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h index 1b1454b..a551cc8 100644 --- a/src/declarative/qml/qdeclarativecomponent_p.h +++ b/src/declarative/qml/qdeclarativecomponent_p.h @@ -74,7 +74,7 @@ class QDeclarativeEngine; class QDeclarativeCompiledData; class QDeclarativeComponentAttached; -class QDeclarativeComponentPrivate : public QObjectPrivate, public QDeclarativeTypeData::TypeDataCallback +class Q_AUTOTEST_EXPORT QDeclarativeComponentPrivate : public QObjectPrivate, public QDeclarativeTypeData::TypeDataCallback { Q_DECLARE_PUBLIC(QDeclarativeComponent) diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 9de5a77..80db230 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -906,7 +906,7 @@ QDeclarativeEngine::ObjectOwnership QDeclarativeEngine::objectOwnership(QObject return ddata->indestructible?CppOwnership:JavaScriptOwnership; } -void qmlExecuteDeferred(QObject *object) +Q_AUTOTEST_EXPORT void qmlExecuteDeferred(QObject *object) { QDeclarativeData *data = QDeclarativeData::get(object); diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index e897458..8d01b80 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #include @@ -200,14 +201,14 @@ public: }; -class QDeclarativePropertyChangesPrivate : public QObjectPrivate +class QDeclarativePropertyChangesPrivate : public QDeclarativeStateOperationPrivate { Q_DECLARE_PUBLIC(QDeclarativePropertyChanges) public: - QDeclarativePropertyChangesPrivate() : object(0), decoded(true), restore(true), + QDeclarativePropertyChangesPrivate() : decoded(true), restore(true), isExplicit(false) {} - QObject *object; + QDeclarativeGuard object; QByteArray data; bool decoded : 1; @@ -497,4 +498,272 @@ void QDeclarativePropertyChanges::setIsExplicit(bool e) d->isExplicit = e; } +bool QDeclarativePropertyChanges::containsValue(const QByteArray &name) const +{ + Q_D(const QDeclarativePropertyChanges); + typedef QPair PropertyEntry; + + QListIterator propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + const PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + return true; + } + } + + return false; +} + +bool QDeclarativePropertyChanges::containsExpression(const QByteArray &name) const +{ + Q_D(const QDeclarativePropertyChanges); + typedef QPair ExpressionEntry; + + QListIterator expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + return true; + } + } + + return false; +} + +bool QDeclarativePropertyChanges::containsProperty(const QByteArray &name) const +{ + return containsValue(name) || containsExpression(name); +} + +void QDeclarativePropertyChanges::changeValue(const QByteArray &name, const QVariant &value) +{ + Q_D(QDeclarativePropertyChanges); + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; + + QMutableListIterator expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + expressionIterator.remove(); + if (state() && state()->isStateActive()) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); + if (oldBinding) { + QDeclarativePropertyPrivate::setBinding(d->property(name), 0); + oldBinding->destroy(); + } + d->property(name).write(value); + } + + d->properties.append(PropertyEntry(name, value)); + return; + } + } + + QMutableListIterator propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + entry.second = value; + if (state() && state()->isStateActive()) + d->property(name).write(value); + return; + } + } + + QDeclarativeAction action; + action.restore = restoreEntryValues(); + action.property = d->property(name); + action.fromValue = action.property.read(); + action.specifiedObject = object(); + action.specifiedProperty = QString::fromUtf8(name); + action.toValue = value; + + propertyIterator.insert(PropertyEntry(name, value)); + if (state() && state()->isStateActive()) { + state()->addEntryToRevertList(action); + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(action.property); + if (oldBinding) + oldBinding->setEnabled(false, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + d->property(name).write(value); + } +} + +void QDeclarativePropertyChanges::changeExpression(const QByteArray &name, const QString &expression) +{ + Q_D(QDeclarativePropertyChanges); + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; + + bool hadValue = false; + + QMutableListIterator propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + propertyIterator.remove(); + hadValue = true; + break; + } + } + + QMutableListIterator expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + entry.second->setExpression(expression); + if (state() && state()->isStateActive()) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); + if (oldBinding) { + QDeclarativePropertyPrivate::setBinding(d->property(name), 0); + oldBinding->destroy(); + } + + QDeclarativeBinding *newBinding = new QDeclarativeBinding(expression, object(), qmlContext(this)); + newBinding->setTarget(d->property(name)); + QDeclarativePropertyPrivate::setBinding(d->property(name), newBinding, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + } + return; + } + } + + QDeclarativeExpression *newExpression = new QDeclarativeExpression(qmlContext(this), d->object, expression); + expressionIterator.insert(ExpressionEntry(name, newExpression)); + + if (state() && state()->isStateActive()) { + if (hadValue) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); + if (oldBinding) { + oldBinding->setEnabled(false, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + state()->changeBindingInRevertList(object(), name, oldBinding); + } + + QDeclarativeBinding *newBinding = new QDeclarativeBinding(expression, object(), qmlContext(this)); + newBinding->setTarget(d->property(name)); + QDeclarativePropertyPrivate::setBinding(d->property(name), newBinding, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + } else { + QDeclarativeAction action; + action.restore = restoreEntryValues(); + action.property = d->property(name); + action.fromValue = action.property.read(); + action.specifiedObject = object(); + action.specifiedProperty = QString::fromUtf8(name); + + + if (d->isExplicit) { + action.toValue = newExpression->evaluate(); + } else { + QDeclarativeBinding *newBinding = new QDeclarativeBinding(newExpression->expression(), object(), qmlContext(this)); + newBinding->setTarget(d->property(name)); + action.toBinding = newBinding; + action.deletableToBinding = true; + + state()->addEntryToRevertList(action); + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(action.property); + if (oldBinding) + oldBinding->setEnabled(false, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + + QDeclarativePropertyPrivate::setBinding(action.property, newBinding, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + } + } + } + // what about the signal handler? +} + +QVariant QDeclarativePropertyChanges::property(const QByteArray &name) const +{ + Q_D(const QDeclarativePropertyChanges); + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; + + QListIterator propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + const PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + return entry.second; + } + } + + QListIterator expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + return QVariant(entry.second->expression()); + } + } + + return QVariant(); +} + +void QDeclarativePropertyChanges::removeProperty(const QByteArray &name) +{ + Q_D(QDeclarativePropertyChanges); + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; + + QMutableListIterator expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + expressionIterator.remove(); + state()->removeEntryFromRevertList(object(), name); + return; + } + } + + QMutableListIterator propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + const PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + propertyIterator.remove(); + state()->removeEntryFromRevertList(object(), name); + return; + } + } +} + +QVariant QDeclarativePropertyChanges::value(const QByteArray &name) const +{ + Q_D(const QDeclarativePropertyChanges); + typedef QPair PropertyEntry; + + QListIterator propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + const PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + return entry.second; + } + } + + return QVariant(); +} + +QString QDeclarativePropertyChanges::expression(const QByteArray &name) const +{ + Q_D(const QDeclarativePropertyChanges); + typedef QPair ExpressionEntry; + + QListIterator expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + return entry.second->expression(); + } + } + + return QString(); +} + +void QDeclarativePropertyChanges::detachFromState() +{ + if (state()) + state()->removeAllEntriesFromRevertList(object()); +} + +void QDeclarativePropertyChanges::attachToState() +{ + if (state()) + state()->addEntriesToRevertList(actions()); +} + QT_END_NAMESPACE diff --git a/src/declarative/util/qdeclarativepropertychanges_p.h b/src/declarative/util/qdeclarativepropertychanges_p.h index 8578086..199928f 100644 --- a/src/declarative/util/qdeclarativepropertychanges_p.h +++ b/src/declarative/util/qdeclarativepropertychanges_p.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativePropertyChangesPrivate; -class Q_AUTOTEST_EXPORT QDeclarativePropertyChanges : public QDeclarativeStateOperation +class Q_DECLARATIVE_EXPORT QDeclarativePropertyChanges : public QDeclarativeStateOperation { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativePropertyChanges) @@ -74,6 +74,20 @@ public: void setIsExplicit(bool); virtual ActionList actions(); + + bool containsProperty(const QByteArray &name) const; + bool containsValue(const QByteArray &name) const; + bool containsExpression(const QByteArray &name) const; + void changeValue(const QByteArray &name, const QVariant &value); + void changeExpression(const QByteArray &name, const QString &expression); + void removeProperty(const QByteArray &name); + QVariant value(const QByteArray &name) const; + QString expression(const QByteArray &name) const; + + void detachFromState(); + void attachToState(); + + QVariant property(const QByteArray &name) const; }; class QDeclarativePropertyChangesParser : public QDeclarativeCustomParser diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index 1ed7923..0f5413e 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -304,7 +304,7 @@ void QDeclarativeStatePrivate::complete() for (int ii = 0; ii < reverting.count(); ++ii) { for (int jj = 0; jj < revertList.count(); ++jj) { - if (revertList.at(jj).property == reverting.at(ii)) { + if (revertList.at(jj).property() == reverting.at(ii)) { revertList.removeAt(jj); break; } @@ -370,6 +370,192 @@ void QDeclarativeAction::deleteFromBinding() } } +bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QByteArray &name) const +{ + Q_D(const QDeclarativeState); + + if (isStateActive()) { + QListIterator revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + return true; + } + } + + return false; +} + +bool QDeclarativeState::changeValueInRevertList(QObject *target, const QByteArray &name, const QVariant &revertValue) +{ + Q_D(QDeclarativeState); + + if (isStateActive()) { + QMutableListIterator revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) { + simpleAction.setValue(revertValue); + return true; + } + } + } + + return false; +} + +bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QByteArray &name, QDeclarativeAbstractBinding *binding) +{ + Q_D(QDeclarativeState); + + if (isStateActive()) { + QMutableListIterator revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) { + if (simpleAction.binding()) + simpleAction.binding()->destroy(); + + simpleAction.setBinding(binding); + return true; + } + } + } + + return false; +} + +bool QDeclarativeState::removeEntryFromRevertList(QObject *target, const QByteArray &name) +{ + Q_D(QDeclarativeState); + + if (isStateActive()) { + QMutableListIterator revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.property().object() == target && simpleAction.property().name().toUtf8() == name) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); + if (oldBinding) { + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); + oldBinding->destroy(); + } + + simpleAction.property().write(simpleAction.value()); + if (simpleAction.binding()) + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), simpleAction.binding()); + + revertListIterator.remove(); + return true; + } + } + } + + return false; +} + +void QDeclarativeState::addEntryToRevertList(const QDeclarativeAction &action) +{ + Q_D(QDeclarativeState); + + QDeclarativeSimpleAction simpleAction(action); + + d->revertList.append(simpleAction); +} + +void QDeclarativeState::removeAllEntriesFromRevertList(QObject *target) +{ + Q_D(QDeclarativeState); + + if (isStateActive()) { + QMutableListIterator revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.property().object() == target) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); + if (oldBinding) { + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); + oldBinding->destroy(); + } + + simpleAction.property().write(simpleAction.value()); + if (simpleAction.binding()) + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), simpleAction.binding()); + + revertListIterator.remove(); + } + } + } +} + +void QDeclarativeState::addEntriesToRevertList(const QList &actionList) +{ + Q_D(QDeclarativeState); + if (isStateActive()) { + QList simpleActionList; + + QListIterator actionListIterator(actionList); + while(actionListIterator.hasNext()) { + const QDeclarativeAction &action = actionListIterator.next(); + QDeclarativeSimpleAction simpleAction(action); + action.property.write(action.toValue); + if (action.toBinding) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); + if (oldBinding) + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), action.toBinding, QDeclarativePropertyPrivate::DontRemoveBinding); + } + + simpleActionList.append(simpleAction); + } + + d->revertList.append(simpleActionList); + } +} + +QVariant QDeclarativeState::valueInRevertList(QObject *target, const QByteArray &name) const +{ + Q_D(const QDeclarativeState); + + if (isStateActive()) { + QListIterator revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + return simpleAction.value(); + } + } + + return QVariant(); +} + +QDeclarativeAbstractBinding *QDeclarativeState::bindingInRevertList(QObject *target, const QByteArray &name) const +{ + Q_D(const QDeclarativeState); + + if (isStateActive()) { + QListIterator revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + return simpleAction.binding(); + } + } + + return 0; +} + +bool QDeclarativeState::isStateActive() const +{ + return stateGroup() && stateGroup()->state() == name(); +} + void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransition *trans, QDeclarativeState *revert) { Q_D(QDeclarativeState); @@ -403,13 +589,13 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit continue; bool found = false; for (int jj = 0; jj < d->revertList.count(); ++jj) { - QDeclarativeActionEvent *event = d->revertList.at(jj).event; + QDeclarativeActionEvent *event = d->revertList.at(jj).event(); if (event && event->typeName() == action.event->typeName()) { if (action.event->override(event)) { found = true; - if (action.event != d->revertList.at(jj).event && action.event->needsCopy()) { - action.event->copyOriginals(d->revertList.at(jj).event); + if (action.event != d->revertList.at(jj).event() && action.event->needsCopy()) { + action.event->copyOriginals(d->revertList.at(jj).event()); QDeclarativeSimpleAction r(action); additionalReverts << r; @@ -434,9 +620,9 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit action.fromBinding = QDeclarativePropertyPrivate::binding(action.property); for (int jj = 0; jj < d->revertList.count(); ++jj) { - if (d->revertList.at(jj).property == action.property) { + if (d->revertList.at(jj).property() == action.property) { found = true; - if (d->revertList.at(jj).binding != action.fromBinding) { + if (d->revertList.at(jj).binding() != action.fromBinding) { action.deleteFromBinding(); } break; @@ -445,7 +631,7 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit if (!found) { if (!action.restore) { - action.deleteFromBinding(); + action.deleteFromBinding();; } else { // Only need to revert the applyList action if the previous // state doesn't have a higher priority revert already @@ -460,8 +646,8 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit // into this state need to be translated into apply actions for (int ii = 0; ii < d->revertList.count(); ++ii) { bool found = false; - if (d->revertList.at(ii).event) { - QDeclarativeActionEvent *event = d->revertList.at(ii).event; + if (d->revertList.at(ii).event()) { + QDeclarativeActionEvent *event = d->revertList.at(ii).event(); if (!event->isReversable()) continue; for (int jj = 0; !found && jj < applyList.count(); ++jj) { @@ -474,31 +660,31 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit } else { for (int jj = 0; !found && jj < applyList.count(); ++jj) { const QDeclarativeAction &action = applyList.at(jj); - if (action.property == d->revertList.at(ii).property) + if (action.property == d->revertList.at(ii).property()) found = true; } } if (!found) { - QVariant cur = d->revertList.at(ii).property.read(); + QVariant cur = d->revertList.at(ii).property().read(); QDeclarativeAbstractBinding *delBinding = - QDeclarativePropertyPrivate::setBinding(d->revertList.at(ii).property, 0); + QDeclarativePropertyPrivate::setBinding(d->revertList.at(ii).property(), 0); if (delBinding) delBinding->destroy(); QDeclarativeAction a; - a.property = d->revertList.at(ii).property; + a.property = d->revertList.at(ii).property(); a.fromValue = cur; - a.toValue = d->revertList.at(ii).value; - a.toBinding = d->revertList.at(ii).binding; - a.specifiedObject = d->revertList.at(ii).specifiedObject; - a.specifiedProperty = d->revertList.at(ii).specifiedProperty; - a.event = d->revertList.at(ii).event; - a.reverseEvent = d->revertList.at(ii).reverseEvent; + a.toValue = d->revertList.at(ii).value(); + a.toBinding = d->revertList.at(ii).binding(); + a.specifiedObject = d->revertList.at(ii).specifiedObject(); + a.specifiedProperty = d->revertList.at(ii).specifiedProperty(); + a.event = d->revertList.at(ii).event(); + a.reverseEvent = d->revertList.at(ii).reverseEvent(); if (a.event && a.event->isRewindable()) a.event->saveCurrentValues(); applyList << a; // Store these special reverts in the reverting list - d->reverting << d->revertList.at(ii).property; + d->reverting << d->revertList.at(ii).property(); } } // All the local reverts now become part of the ongoing revertList @@ -526,4 +712,16 @@ QDeclarativeStateOperation::ActionList QDeclarativeStateOperation::actions() return ActionList(); } +QDeclarativeState *QDeclarativeStateOperation::state() const +{ + Q_D(const QDeclarativeStateOperation); + return d->m_state; +} + +void QDeclarativeStateOperation::setState(QDeclarativeState *state) +{ + Q_D(QDeclarativeStateOperation); + d->m_state = state; +} + QT_END_NAMESPACE diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h index 2e2ce7b..a0ab11b 100644 --- a/src/declarative/util/qdeclarativestate_p.h +++ b/src/declarative/util/qdeclarativestate_p.h @@ -111,6 +111,8 @@ public: //### rename to QDeclarativeStateChange? class QDeclarativeStateGroup; +class QDeclarativeState; +class QDeclarativeStateOperationPrivate; class Q_DECLARATIVE_EXPORT QDeclarativeStateOperation : public QObject { Q_OBJECT @@ -121,8 +123,15 @@ public: virtual ActionList actions(); + QDeclarativeState *state() const; + void setState(QDeclarativeState *state); + protected: QDeclarativeStateOperation(QObjectPrivate &dd, QObject *parent = 0); + +private: + Q_DECLARE_PRIVATE(QDeclarativeStateOperation) + Q_DISABLE_COPY(QDeclarativeStateOperation) }; typedef QDeclarativeStateOperation::ActionList QDeclarativeStateActions; @@ -169,6 +178,18 @@ public: QDeclarativeStateGroup *stateGroup() const; void setStateGroup(QDeclarativeStateGroup *); + bool containsPropertyInRevertList(QObject *target, const QByteArray &name) const; + bool changeValueInRevertList(QObject *target, const QByteArray &name, const QVariant &revertValue); + bool changeBindingInRevertList(QObject *target, const QByteArray &name, QDeclarativeAbstractBinding *binding); + bool removeEntryFromRevertList(QObject *target, const QByteArray &name); + void addEntryToRevertList(const QDeclarativeAction &action); + void removeAllEntriesFromRevertList(QObject *target); + void addEntriesToRevertList(const QList &actions); + QVariant valueInRevertList(QObject *target, const QByteArray &name) const; + QDeclarativeAbstractBinding *bindingInRevertList(QObject *target, const QByteArray &name) const; + + bool isStateActive() const; + Q_SIGNALS: void completed(); diff --git a/src/declarative/util/qdeclarativestate_p_p.h b/src/declarative/util/qdeclarativestate_p_p.h index 2ef9bb0..c3c7bb4 100644 --- a/src/declarative/util/qdeclarativestate_p_p.h +++ b/src/declarative/util/qdeclarativestate_p_p.h @@ -61,6 +61,8 @@ #include #include +#include + #include QT_BEGIN_NAMESPACE @@ -69,30 +71,123 @@ class QDeclarativeSimpleAction { public: enum State { StartState, EndState }; - QDeclarativeSimpleAction(const QDeclarativeAction &a, State state = StartState) + QDeclarativeSimpleAction(const QDeclarativeAction &a, State state = StartState) { - property = a.property; - specifiedObject = a.specifiedObject; - specifiedProperty = a.specifiedProperty; - event = a.event; + m_property = a.property; + m_specifiedObject = a.specifiedObject; + m_specifiedProperty = a.specifiedProperty; + m_event = a.event; if (state == StartState) { - value = a.fromValue; - binding = QDeclarativePropertyPrivate::binding(property); - reverseEvent = true; + m_value = a.fromValue; + if (QDeclarativePropertyPrivate::binding(m_property)) { + m_binding = QDeclarativePropertyPrivate::binding(m_property)->weakPointer(); + } + m_reverseEvent = true; } else { - value = a.toValue; - binding = a.toBinding; - reverseEvent = false; + m_value = a.toValue; + m_binding = a.toBinding->weakPointer(); + m_reverseEvent = false; } } - QDeclarativeProperty property; - QVariant value; - QDeclarativeAbstractBinding *binding; - QObject *specifiedObject; - QString specifiedProperty; - QDeclarativeActionEvent *event; - bool reverseEvent; + ~QDeclarativeSimpleAction() + { + } + + QDeclarativeSimpleAction(const QDeclarativeSimpleAction &other) + : m_property(other.m_property), + m_value(other.m_value), + m_binding(other.binding() ? other.binding()->weakPointer() : QDeclarativeAbstractBinding::Pointer()), + m_specifiedObject(other.m_specifiedObject), + m_specifiedProperty(other.m_specifiedProperty), + m_event(other.m_event), + m_reverseEvent(other.m_reverseEvent) + { + } + + QDeclarativeSimpleAction &operator =(const QDeclarativeSimpleAction &other) + { + m_property = other.m_property; + m_value = other.m_value; + m_binding = other.binding() ? other.binding()->weakPointer() : QDeclarativeAbstractBinding::Pointer(); + m_specifiedObject = other.m_specifiedObject; + m_specifiedProperty = other.m_specifiedProperty; + m_event = other.m_event; + m_reverseEvent = other.m_reverseEvent; + + return *this; + } + + void setProperty(const QDeclarativeProperty &property) + { + m_property = property; + } + + const QDeclarativeProperty &property() const + { + return m_property; + } + + void setValue(const QVariant &value) + { + m_value = value; + } + + const QVariant &value() const + { + return m_value; + } + + void setBinding(QDeclarativeAbstractBinding *binding) + { + m_binding = binding->weakPointer(); + } + + QDeclarativeAbstractBinding *binding() const + { + return m_binding.data(); + } + + QObject *specifiedObject() const + { + return m_specifiedObject; + } + + const QString &specifiedProperty() const + { + return m_specifiedProperty; + } + + QDeclarativeActionEvent *event() const + { + return m_event; + } + + bool reverseEvent() const + { + return m_reverseEvent; + } + +private: + QDeclarativeProperty m_property; + QVariant m_value; + QDeclarativeAbstractBinding::Pointer m_binding; + QObject *m_specifiedObject; + QString m_specifiedProperty; + QDeclarativeActionEvent *m_event; + bool m_reverseEvent; +}; + +class QDeclarativeStateOperationPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativeStateOperation) + +public: + + QDeclarativeStateOperationPrivate() + : m_state(0) {} + + QDeclarativeState *m_state; }; class QDeclarativeStatePrivate : public QObjectPrivate @@ -122,10 +217,14 @@ public: static void operations_append(QDeclarativeListProperty *prop, QDeclarativeStateOperation *op) { QList *list = static_cast *>(prop->data); + op->setState(qobject_cast(prop->object)); list->append(OperationGuard(op, list)); } static void operations_clear(QDeclarativeListProperty *prop) { QList *list = static_cast *>(prop->data); + QMutableListIterator listIterator(*list); + while(listIterator.hasNext()) + listIterator.next()->setState(0); list->clear(); } static int operations_count(QDeclarativeListProperty *prop) { diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index a78fc54..ccbc4cd 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -52,6 +52,7 @@ #include "private/qdeclarativecontext_p.h" #include "private/qdeclarativeproperty_p.h" #include "private/qdeclarativebinding_p.h" +#include "private/qdeclarativestate_p_p.h" #include #include @@ -61,7 +62,7 @@ QT_BEGIN_NAMESPACE -class QDeclarativeParentChangePrivate : public QObjectPrivate +class QDeclarativeParentChangePrivate : public QDeclarativeStateOperationPrivate { Q_DECLARE_PUBLIC(QDeclarativeParentChange) public: @@ -580,7 +581,7 @@ void QDeclarativeParentChange::rewind() d->doChange(d->rewindParent, d->rewindStackBefore); } -class QDeclarativeStateChangeScriptPrivate : public QObjectPrivate +class QDeclarativeStateChangeScriptPrivate : public QDeclarativeStateOperationPrivate { public: QDeclarativeStateChangeScriptPrivate() {} @@ -965,7 +966,7 @@ void QDeclarativeAnchorSet::resetCenterIn() } -class QDeclarativeAnchorChangesPrivate : public QObjectPrivate +class QDeclarativeAnchorChangesPrivate : public QDeclarativeStateOperationPrivate { public: QDeclarativeAnchorChangesPrivate() diff --git a/src/declarative/util/qdeclarativetransitionmanager.cpp b/src/declarative/util/qdeclarativetransitionmanager.cpp index d82c4bb..89b0044 100644 --- a/src/declarative/util/qdeclarativetransitionmanager.cpp +++ b/src/declarative/util/qdeclarativetransitionmanager.cpp @@ -86,8 +86,8 @@ void QDeclarativeTransitionManager::complete() d->applyBindings(); for (int ii = 0; ii < d->completeList.count(); ++ii) { - const QDeclarativeProperty &prop = d->completeList.at(ii).property; - prop.write(d->completeList.at(ii).value); + const QDeclarativeProperty &prop = d->completeList.at(ii).property(); + prop.write(d->completeList.at(ii).value()); } d->completeList.clear(); -- cgit v0.12 From a8085e53f15f88aa108d2e7e6473094105d0fdcb Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 14 Sep 2010 16:47:07 +0200 Subject: Unit tests for Bauhaus enablers See 6454f4db1697af1d36ad4c0ea83ccd0bb490fd39 --- .../qdeclarativestates/data/editProperties.qml | 34 ++++++ .../qdeclarativestates/tst_qdeclarativestates.cpp | 132 +++++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativestates/data/editProperties.qml diff --git a/tests/auto/declarative/qdeclarativestates/data/editProperties.qml b/tests/auto/declarative/qdeclarativestates/data/editProperties.qml new file mode 100644 index 0000000..4cb1ddd --- /dev/null +++ b/tests/auto/declarative/qdeclarativestates/data/editProperties.qml @@ -0,0 +1,34 @@ +import Qt 4.7 +Rectangle { + id: myRectangle + + property color sourceColor: "blue" + width: 400; height: 400 + color: "red" + + Rectangle { + id: rect2 + objectName: "rect2" + width: parent.width + 2 + height: 200 + color: "yellow" + } + + states: [ + State { + name: "blue" + PropertyChanges { + target: rect2 + width:50 + height: 40 + } + }, + State { + name: "green" + PropertyChanges { + target: rect2 + width: myRectangle.width / 2 + height: myRectangle.width / 4 + } + }] +} diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index 0621602..4a0ae30 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir @@ -140,6 +141,7 @@ private slots: void unnamedWhen(); void returnToBase(); void extendsBug(); + void editProperties(); }; void tst_qdeclarativestates::initTestCase() @@ -1218,6 +1220,136 @@ void tst_qdeclarativestates::extendsBug() QCOMPARE(greenRect->y(), qreal(100)); } +extern void qmlExecuteDeferred(QObject *object); + +void tst_qdeclarativestates::editProperties() +{ + QDeclarativeEngine engine; + + QDeclarativeComponent c(&engine, SRCDIR "/data/editProperties.qml"); + QDeclarativeRectangle *rect = qobject_cast(c.create()); + QVERIFY(rect != 0); + + QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect); + + QDeclarativeStateGroup *stateGroup = rectPrivate->_states(); + QVERIFY(stateGroup != 0); + qmlExecuteDeferred(stateGroup); + + QDeclarativeState *blueState = stateGroup->findState("blue"); + QVERIFY(blueState != 0); + qmlExecuteDeferred(blueState); + + QDeclarativePropertyChanges *propertyChangesBlue = qobject_cast(blueState->operationAt(0)); + QVERIFY(propertyChangesBlue != 0); + + QDeclarativeState *greenState = stateGroup->findState("green"); + QVERIFY(greenState != 0); + qmlExecuteDeferred(greenState); + + QDeclarativePropertyChanges *propertyChangesGreen = qobject_cast(greenState->operationAt(0)); + QVERIFY(propertyChangesGreen != 0); + + QDeclarativeRectangle *childRect = rect->findChild("rect2"); + QVERIFY(childRect != 0); + QCOMPARE(childRect->width(), qreal(402)); + QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QCOMPARE(childRect->height(), qreal(200)); + + rectPrivate->setState("blue"); + QCOMPARE(childRect->width(), qreal(50)); + QCOMPARE(childRect->height(), qreal(40)); + QVERIFY(!QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QVERIFY(blueState->bindingInRevertList(childRect, "width")); + + + rectPrivate->setState("green"); + QCOMPARE(childRect->width(), qreal(200)); + QCOMPARE(childRect->height(), qreal(100)); + QVERIFY(greenState->bindingInRevertList(childRect, "width")); + + + rectPrivate->setState(""); + + + QCOMPARE(propertyChangesBlue->actions().length(), 2); + QVERIFY(propertyChangesBlue->containsValue("width")); + QVERIFY(!propertyChangesBlue->containsProperty("x")); + QCOMPARE(propertyChangesBlue->value("width").toInt(), 50); + QVERIFY(!propertyChangesBlue->value("x").isValid()); + + propertyChangesBlue->changeValue("width", 60); + QCOMPARE(propertyChangesBlue->value("width").toInt(), 60); + QCOMPARE(propertyChangesBlue->actions().length(), 2); + + + propertyChangesBlue->changeExpression("width", "myRectangle.width / 2"); + QVERIFY(!propertyChangesBlue->containsValue("width")); + QVERIFY(propertyChangesBlue->containsExpression("width")); + QCOMPARE(propertyChangesBlue->value("width").toInt(), 0); + QCOMPARE(propertyChangesBlue->actions().length(), 2); + + propertyChangesBlue->changeValue("width", 50); + QVERIFY(propertyChangesBlue->containsValue("width")); + QVERIFY(!propertyChangesBlue->containsExpression("width")); + QCOMPARE(propertyChangesBlue->value("width").toInt(), 50); + QCOMPARE(propertyChangesBlue->actions().length(), 2); + + QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + rectPrivate->setState("blue"); + QCOMPARE(childRect->width(), qreal(50)); + QCOMPARE(childRect->height(), qreal(40)); + + propertyChangesBlue->changeValue("width", 60); + QCOMPARE(propertyChangesBlue->value("width").toInt(), 60); + QCOMPARE(propertyChangesBlue->actions().length(), 2); + QCOMPARE(childRect->width(), qreal(60)); + QVERIFY(!QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + + propertyChangesBlue->changeExpression("width", "myRectangle.width / 2"); + QVERIFY(!propertyChangesBlue->containsValue("width")); + QVERIFY(propertyChangesBlue->containsExpression("width")); + QCOMPARE(propertyChangesBlue->value("width").toInt(), 0); + QCOMPARE(propertyChangesBlue->actions().length(), 2); + QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QCOMPARE(childRect->width(), qreal(200)); + + propertyChangesBlue->changeValue("width", 50); + QCOMPARE(childRect->width(), qreal(50)); + + rectPrivate->setState(""); + QCOMPARE(childRect->width(), qreal(402)); + QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + + QCOMPARE(propertyChangesGreen->actions().length(), 2); + rectPrivate->setState("green"); + QCOMPARE(childRect->width(), qreal(200)); + QCOMPARE(childRect->height(), qreal(100)); + QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QVERIFY(greenState->bindingInRevertList(childRect, "width")); + QCOMPARE(propertyChangesGreen->actions().length(), 2); + + + propertyChangesGreen->removeProperty("height"); + QVERIFY(!QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "height"))); + QCOMPARE(childRect->height(), qreal(200)); + + QVERIFY(greenState->bindingInRevertList(childRect, "width")); + QVERIFY(greenState->containsPropertyInRevertList(childRect, "width")); + propertyChangesGreen->removeProperty("width"); + QVERIFY(QDeclarativePropertyPrivate::binding(QDeclarativeProperty(childRect, "width"))); + QCOMPARE(childRect->width(), qreal(402)); + QVERIFY(!greenState->bindingInRevertList(childRect, "width")); + QVERIFY(!greenState->containsPropertyInRevertList(childRect, "width")); + + propertyChangesBlue->removeProperty("width"); + QCOMPARE(childRect->width(), qreal(402)); + + rectPrivate->setState("blue"); + QCOMPARE(childRect->width(), qreal(402)); + QCOMPARE(childRect->height(), qreal(40)); +} + QTEST_MAIN(tst_qdeclarativestates) #include "tst_qdeclarativestates.moc" -- cgit v0.12 From 34b805d66c09fb324d1b6a7bcf259e8743ef3894 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 14 Sep 2010 16:49:57 +0200 Subject: Completing the interface for children/data/resources This patch makes the handling of properties like children and data easier in Bauhaus. Especially in the case of property alias Reviewed-by: Aaron Kennedy --- .../graphicsitems/qdeclarativeflickable.cpp | 54 ++++++++++++++++++- .../graphicsitems/qdeclarativeflickable_p_p.h | 3 ++ src/declarative/graphicsitems/qdeclarativeitem.cpp | 62 +++++++++++++++++++++- src/declarative/graphicsitems/qdeclarativeitem_p.h | 4 ++ src/gui/graphicsview/qgraphicsitem.cpp | 9 +++- src/gui/graphicsview/qgraphicsitem_p.h | 1 + 6 files changed, 129 insertions(+), 4 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index c0b664f..bf3d88b 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -1051,10 +1051,62 @@ void QDeclarativeFlickablePrivate::data_append(QDeclarativeListProperty o->setParent(prop->object); } +static inline int children_count_helper(QGraphicsObject *object) +{ + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(object); + return d->children.count(); +} + +static inline QObject *children_at_helper(QGraphicsObject *object, int index) +{ + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(object); + if (index >= 0 && index < d->children.count()) + return d->children.at(index)->toGraphicsObject(); + else + return 0; +} + +static inline void children_clear_helper(QGraphicsObject *object) +{ + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(object); + for (int index = 0 ;index < d->children.count();index++) + QGraphicsItemPrivate::get(d->children.at(index))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); +} + +int QDeclarativeFlickablePrivate::data_count(QDeclarativeListProperty *prop) +{ + return QDeclarativeItemPrivate::resources_count(prop) + + children_count_helper(static_cast(prop->data)->contentItem); +} + +QObject *QDeclarativeFlickablePrivate::data_at(QDeclarativeListProperty *prop, int i) +{ + int resourcesCount = QDeclarativeItemPrivate::resources_count(prop); + if (i < resourcesCount) + return QDeclarativeItemPrivate::resources_at(prop, i); + const int j = i - resourcesCount; + QGraphicsObject *contentObject = static_cast(prop->data)->contentItem; + if (j < children_count_helper(contentObject)) + children_at_helper(contentObject, j); + return 0; +} + +void QDeclarativeFlickablePrivate::data_clear(QDeclarativeListProperty *prop) +{ + QDeclarativeItemPrivate::resources_clear(prop); + QGraphicsObject *contentObject = + static_cast(prop->data)->contentItem; + children_clear_helper(contentObject); +} + QDeclarativeListProperty QDeclarativeFlickable::flickableData() { Q_D(QDeclarativeFlickable); - return QDeclarativeListProperty(this, (void *)d, QDeclarativeFlickablePrivate::data_append); + return QDeclarativeListProperty(this, (void *)d, QDeclarativeFlickablePrivate::data_append, + QDeclarativeFlickablePrivate::data_count, + QDeclarativeFlickablePrivate::data_at, + QDeclarativeFlickablePrivate::data_clear + ); } QDeclarativeListProperty QDeclarativeFlickable::flickableChildren() diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h index 2da034c..beee741 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h @@ -173,6 +173,9 @@ public: // flickableData property static void data_append(QDeclarativeListProperty *, QObject *); + static int data_count(QDeclarativeListProperty *); + static QObject *data_at(QDeclarativeListProperty *, int); + static void data_clear(QDeclarativeListProperty *); }; class QDeclarativeFlickableVisibleArea : public QObject diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 11f9179..53a4710 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -44,6 +44,7 @@ #include "private/qdeclarativeevents_p_p.h" #include +#include #include #include @@ -1619,6 +1620,50 @@ void QDeclarativeItemPrivate::data_append(QDeclarativeListProperty *pro } } +static inline int children_count_helper(QDeclarativeListProperty *prop) +{ + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast(prop->object)); + return d->children.count(); +} + +static inline QObject *children_at_helper(QDeclarativeListProperty *prop, int index) +{ + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast(prop->object)); + if (index >= 0 && index < d->children.count()) + return d->children.at(index)->toGraphicsObject(); + else + return 0; +} + +static inline void children_clear_helper(QDeclarativeListProperty *prop) +{ + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast(prop->object)); + for (int index = 0 ;index < d->children.count();index++) + QGraphicsItemPrivate::get(d->children.at(index))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); +} + +int QDeclarativeItemPrivate::data_count(QDeclarativeListProperty *prop) +{ + return resources_count(prop) + children_count_helper(prop); +} + +QObject *QDeclarativeItemPrivate::data_at(QDeclarativeListProperty *prop, int i) +{ + int resourcesCount = resources_count(prop); + if (i < resourcesCount) + return resources_at(prop, i); + const int j = i - resourcesCount; + if (j < children_count_helper(prop)) + children_at_helper(prop, j); + return 0; +} + +void QDeclarativeItemPrivate::data_clear(QDeclarativeListProperty *prop) +{ + resources_clear(prop); + children_clear_helper(prop); +} + QObject *QDeclarativeItemPrivate::resources_at(QDeclarativeListProperty *prop, int index) { const QObjectList children = prop->object->children(); @@ -1638,6 +1683,13 @@ int QDeclarativeItemPrivate::resources_count(QDeclarativeListProperty * return prop->object->children().count(); } +void QDeclarativeItemPrivate::resources_clear(QDeclarativeListProperty *prop) +{ + const QObjectList children = prop->object->children(); + for (int index = 0; index < children.count(); index++) + children.at(index)->setParent(0); +} + int QDeclarativeItemPrivate::transform_count(QDeclarativeListProperty *list) { QGraphicsObject *object = qobject_cast(list->object); @@ -1724,7 +1776,11 @@ void QDeclarativeItemPrivate::parentProperty(QObject *o, void *rv, QDeclarativeN QDeclarativeListProperty QDeclarativeItemPrivate::data() { - return QDeclarativeListProperty(q_func(), 0, QDeclarativeItemPrivate::data_append); + return QDeclarativeListProperty(q_func(), 0, QDeclarativeItemPrivate::data_append, + QDeclarativeItemPrivate::data_count, + QDeclarativeItemPrivate::data_at, + QDeclarativeItemPrivate::data_clear + ); } /*! @@ -2413,7 +2469,9 @@ QDeclarativeListProperty QDeclarativeItemPrivate::resources() { return QDeclarativeListProperty(q_func(), 0, QDeclarativeItemPrivate::resources_append, QDeclarativeItemPrivate::resources_count, - QDeclarativeItemPrivate::resources_at); + QDeclarativeItemPrivate::resources_at, + QDeclarativeItemPrivate::resources_clear + ); } /*! diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h index fffb4f7..f85fa27 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem_p.h +++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h @@ -176,11 +176,15 @@ public: // data property static void data_append(QDeclarativeListProperty *, QObject *); + static int data_count(QDeclarativeListProperty *); + static QObject *data_at(QDeclarativeListProperty *, int); + static void data_clear(QDeclarativeListProperty *); // resources property static QObject *resources_at(QDeclarativeListProperty *, int); static void resources_append(QDeclarativeListProperty *, QObject *); static int resources_count(QDeclarativeListProperty *); + static void resources_clear(QDeclarativeListProperty *); // transform property static int transform_count(QDeclarativeListProperty *list); diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 7a5b8de..9e43f2f 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -7676,6 +7676,13 @@ QGraphicsObject *QGraphicsItemPrivate::children_at(QDeclarativeListProperty *list) +{ + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast(list->object)); + for (int index = 0 ;index < d->children.count();index++) + QGraphicsItemPrivate::get(d->children.at(index))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); +} + /*! Returns a list of this item's children. @@ -7689,7 +7696,7 @@ QDeclarativeListProperty QGraphicsItemPrivate::childrenList() if (isObject) { QGraphicsObject *that = static_cast(q); return QDeclarativeListProperty(that, &children, children_append, - children_count, children_at); + children_count, children_at, children_clear); } else { //QGraphicsItem is not supported for this property return QDeclarativeListProperty(); diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index d60dffb..cce9439 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -487,6 +487,7 @@ public: static void children_append(QDeclarativeListProperty *list, QGraphicsObject *item); static int children_count(QDeclarativeListProperty *list); static QGraphicsObject *children_at(QDeclarativeListProperty *list, int); + static void children_clear(QDeclarativeListProperty *list); inline QTransform transformToParent() const; inline void ensureSortedChildren(); -- cgit v0.12 From d3de3f65b945773e9a3ceabc082347b4b0b0df79 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Mon, 13 Sep 2010 17:04:21 +0200 Subject: Export QDeclarativeScriptAction It is needed in Bauhaus to disable the animation. --- src/declarative/util/qdeclarativeanimation_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h index d15d1f6..cdd5041 100644 --- a/src/declarative/util/qdeclarativeanimation_p.h +++ b/src/declarative/util/qdeclarativeanimation_p.h @@ -165,7 +165,7 @@ protected: }; class QDeclarativeScriptActionPrivate; -class QDeclarativeScriptAction : public QDeclarativeAbstractAnimation +class Q_DECLARATIVE_EXPORT QDeclarativeScriptAction : public QDeclarativeAbstractAnimation { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeScriptAction) -- cgit v0.12 From a4b6572b8fb8eb247a7bd952dca7e99e5d4e5707 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 14 Sep 2010 20:35:48 +0200 Subject: Doc: Continued work on the QML documentation. --- doc/src/declarative/pics/gradient.png | Bin 364 -> 0 bytes doc/src/declarative/pics/qml-gradient.png | Bin 0 -> 364 bytes .../declarative/rectangle/rectangle-smooth.qml | 87 +++++++++++++++++++++ .../graphicsitems/qdeclarativerectangle.cpp | 59 +++++++++++--- src/gui/painting/qbrush.cpp | 15 ++-- 5 files changed, 143 insertions(+), 18 deletions(-) delete mode 100644 doc/src/declarative/pics/gradient.png create mode 100644 doc/src/declarative/pics/qml-gradient.png create mode 100644 doc/src/snippets/declarative/rectangle/rectangle-smooth.qml diff --git a/doc/src/declarative/pics/gradient.png b/doc/src/declarative/pics/gradient.png deleted file mode 100644 index 5eefdd2..0000000 Binary files a/doc/src/declarative/pics/gradient.png and /dev/null differ diff --git a/doc/src/declarative/pics/qml-gradient.png b/doc/src/declarative/pics/qml-gradient.png new file mode 100644 index 0000000..5eefdd2 Binary files /dev/null and b/doc/src/declarative/pics/qml-gradient.png differ diff --git a/doc/src/snippets/declarative/rectangle/rectangle-smooth.qml b/doc/src/snippets/declarative/rectangle/rectangle-smooth.qml new file mode 100644 index 0000000..e1d6980 --- /dev/null +++ b/doc/src/snippets/declarative/rectangle/rectangle-smooth.qml @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + width: 400; height: 200 + color: "white" + + Grid { + anchors.centerIn: parent + columns: 4; rows: 2; spacing: 10 + + Rectangle { + color: "steelblue"; width: 80; height: 80 + rotation: 10 + } + Rectangle { + color: "#F0A080"; width: 80; height: 80 + border.color: "gray"; rotation: 10 + } + Rectangle { + color: "steelblue"; width: 80; height: 80 + radius: 10; rotation: 10 + } + Rectangle { + color: "#F0A080"; width: 80; height: 80 + radius: 10; border.color: "gray" + rotation: 10 + } + + Rectangle { + color: "steelblue"; width: 80; height: 80 + rotation: 10; smooth: true + } + Rectangle { + color: "#F0A080"; width: 80; height: 80 + border.color: "gray"; rotation: 10; smooth: true + } + Rectangle { + color: "steelblue"; width: 80; height: 80 + radius: 10; rotation: 10; smooth: true + } + Rectangle { + color: "#F0A080"; width: 80; height: 80 + radius: 10; border.color: "gray" + rotation: 10; smooth: true + } + } +} diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index 9238004..e33969d 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -95,7 +95,12 @@ void QDeclarativePen::setWidth(int w) \qmlproperty real GradientStop::position \qmlproperty color GradientStop::color - Sets a \e color at a \e position in a gradient. + The position and color properties describe the color used at a given + position in a gradient, as represented by a gradient stop. + + The default position is 0.0; the default color is black. + + \sa Gradient */ void QDeclarativeGradientStop::updateGradient() @@ -107,20 +112,50 @@ void QDeclarativeGradientStop::updateGradient() /*! \qmlclass Gradient QDeclarativeGradient \ingroup qml-basic-visual-elements - \since 4.7 + \since 4.7 \brief The Gradient item defines a gradient fill. - A gradient is defined by two or more colors, which will be blended seemlessly. The - colors are specified at their position in the range 0.0 - 1.0 via - the GradientStop item. For example, the following code paints a - rectangle with a gradient starting with red, blending to yellow at 1/3 of the - size of the rectangle, and ending with Green: + A gradient is defined by two or more colors, which will be blended seamlessly. - \snippet doc/src/snippets/declarative/gradient.qml code + The colors are specified as a set of GradientStop child items, each of + which defines a position on the gradient from 0.0 to 1.0 and a color. + The position of each GradientStop is defined by setting its + \l{GradientStop::}{position} property; its color is defined using its + \l{GradientStop::}{color} property. + + A gradient without any gradient stops is rendered as a solid white fill. Note that this item is not a visual representation of a gradient. To display a - gradient use a visual item (like rectangle) which supports having a gradient set - on it for display. + gradient, use a visual element (like \l Rectangle) which supports the use + of gradients. + + \section1 Example Usage + + \beginfloatright + \inlineimage qml-gradient.png + \endfloat + + The following example declares a \l Rectangle item with a gradient starting + with red, blending to yellow at one third of the height of the rectangle, + and ending with green: + + \snippet doc/src/snippets/declarative/gradient.qml code + + \clearfloat + \section1 Performance and Limitations + + Calculating gradients can be computationally expensive compared to the use + of solid color fills or images. Consider using gradients for static items + in a user interface. + + In Qt 4.7, only vertical, linear gradients can be applied to items. If you + need to apply different orientations of gradients, a combination of rotation + and clipping will need to be applied to the relevant items. This can + introduce additional performance requirements for your application. + + The use of animations involving gradient stops may not give the desired + result. An alternative way to animate gradients is to use pre-generated + images or SVG drawings containing gradients. \sa GradientStop */ @@ -128,6 +163,10 @@ void QDeclarativeGradientStop::updateGradient() /*! \qmlproperty list Gradient::stops This property holds the gradient stops describing the gradient. + + By default, this property contains an empty list. + + To set the gradient stops, define them as children of the Gradient element. */ const QGradient *QDeclarativeGradient::gradient() const diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index d3061d8..d0788c7 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -1218,17 +1218,16 @@ QDataStream &operator>>(QDataStream &s, QBrush &b) \o QConicalGradient \endtable - The colors in a gradient is defined using stop points of the - QGradientStop type, i.e. a position and a color. Use the - setColorAt() function to define a single stop - point. Alternatively, use the setStops() function to define - several stop points in one go. Note that the latter function \e - replaces the current set of stop points. + The colors in a gradient are defined using stop points of the + QGradientStop type; i.e., a position and a color. Use the setColorAt() + function to define a single stop point. Alternatively, use the + setStops() function to define several stop points in one go. Note that + the latter function \e replaces the current set of stop points. It is the gradient's complete set of stop points (accessible through the stops() function) that describes how the gradient area - should be filled. If no stop points have been specified, a - gradient of black at 0 to white at 1 is used. + should be filled. If no stop points have been specified, a gradient + of black at 0 to white at 1 is used. A diagonal linear gradient from black at (100, 100) to white at (200, 200) could be specified like this: -- cgit v0.12 From 8ab760b70e13318749bcc83e33b9a9b9a849a892 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 15 Sep 2010 10:53:29 +1000 Subject: Restore any absolute geometry changed by AnchorChanges when returning to the base state. Task-number: QTBUG-11834 --- .../util/qdeclarativestateoperations.cpp | 54 ++++++++++++++++++++++ .../qdeclarativestates/data/anchorRewindBug2.qml | 25 ++++++++++ .../qdeclarativestates/tst_qdeclarativestates.cpp | 27 +++++++++++ 3 files changed, 106 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index ccbc4cd..8cb813c 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -1031,6 +1031,11 @@ public: bool applyOrigVCenter; bool applyOrigBaseline; + QDeclarativeNullableValue origWidth; + QDeclarativeNullableValue origHeight; + qreal origX; + qreal origY; + QList oldBindings; QDeclarativeProperty leftProp; @@ -1322,6 +1327,42 @@ void QDeclarativeAnchorChanges::reverse(Reason reason) QDeclarativePropertyPrivate::setBinding(d->vCenterProp, d->origVCenterBinding); if (d->origBaselineBinding) QDeclarativePropertyPrivate::setBinding(d->baselineProp, d->origBaselineBinding); + + //restore any absolute geometry changed by the state's anchors + QDeclarativeAnchors::Anchors stateVAnchors = d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::Vertical_Mask; + QDeclarativeAnchors::Anchors origVAnchors = targetPrivate->anchors()->usedAnchors() & QDeclarativeAnchors::Vertical_Mask; + QDeclarativeAnchors::Anchors stateHAnchors = d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::Horizontal_Mask; + QDeclarativeAnchors::Anchors origHAnchors = targetPrivate->anchors()->usedAnchors() & QDeclarativeAnchors::Horizontal_Mask; + + bool stateSetWidth = (stateHAnchors && + stateHAnchors != QDeclarativeAnchors::LeftAnchor && + stateHAnchors != QDeclarativeAnchors::RightAnchor && + stateHAnchors != QDeclarativeAnchors::HCenterAnchor); + bool origSetWidth = (origHAnchors && + origHAnchors != QDeclarativeAnchors::LeftAnchor && + origHAnchors != QDeclarativeAnchors::RightAnchor && + origHAnchors != QDeclarativeAnchors::HCenterAnchor); + if (d->origWidth.isValid() && stateSetWidth && !origSetWidth) + d->target->setWidth(d->origWidth.value); + + bool stateSetHeight = (stateVAnchors && + stateVAnchors != QDeclarativeAnchors::TopAnchor && + stateVAnchors != QDeclarativeAnchors::BottomAnchor && + stateVAnchors != QDeclarativeAnchors::VCenterAnchor && + stateVAnchors != QDeclarativeAnchors::BaselineAnchor); + bool origSetHeight = (origVAnchors && + origVAnchors != QDeclarativeAnchors::TopAnchor && + origVAnchors != QDeclarativeAnchors::BottomAnchor && + origVAnchors != QDeclarativeAnchors::VCenterAnchor && + origVAnchors != QDeclarativeAnchors::BaselineAnchor); + if (d->origHeight.isValid() && stateSetHeight && !origSetHeight) + d->target->setHeight(d->origHeight.value); + + if (stateHAnchors && !origHAnchors) + d->target->setX(d->origX); + + if (stateVAnchors && !origVAnchors) + d->target->setY(d->origY); } QString QDeclarativeAnchorChanges::typeName() const @@ -1384,6 +1425,14 @@ void QDeclarativeAnchorChanges::saveOriginals() d->origVCenterBinding = QDeclarativePropertyPrivate::binding(d->vCenterProp); d->origBaselineBinding = QDeclarativePropertyPrivate::binding(d->baselineProp); + QDeclarativeItemPrivate *targetPrivate = QDeclarativeItemPrivate::get(d->target); + if (targetPrivate->widthValid) + d->origWidth = d->target->width(); + if (targetPrivate->heightValid) + d->origHeight = d->target->height(); + d->origX = d->target->x(); + d->origY = d->target->y(); + d->applyOrigLeft = d->applyOrigRight = d->applyOrigHCenter = d->applyOrigTop = d->applyOrigBottom = d->applyOrigVCenter = d->applyOrigBaseline = false; @@ -1416,6 +1465,11 @@ void QDeclarativeAnchorChanges::copyOriginals(QDeclarativeActionEvent *other) d->origVCenterBinding = acp->origVCenterBinding; d->origBaselineBinding = acp->origBaselineBinding; + d->origWidth = acp->origWidth; + d->origHeight = acp->origHeight; + d->origX = acp->origX; + d->origY = acp->origY; + d->oldBindings.clear(); d->oldBindings << acp->leftBinding << acp->rightBinding << acp->hCenterBinding << acp->topBinding << acp->bottomBinding << acp->baselineBinding; diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml new file mode 100644 index 0000000..4ed2815 --- /dev/null +++ b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml @@ -0,0 +1,25 @@ +import Qt 4.7 + +Rectangle { + id: root + width:200; height:300 + + Rectangle { + id: rectangle + objectName: "mover" + color: "green" + width:50; height:50 + } + + states: [ + State { + name: "anchored" + AnchorChanges { + target: rectangle + anchors.left: root.left + anchors.right: root.right + anchors.bottom: root.bottom + } + } + ] +} diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index 4a0ae30..f61ecf5 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -123,6 +123,7 @@ private slots: void anchorChanges5(); void anchorChangesCrash(); void anchorRewindBug(); + void anchorRewindBug2(); void script(); void restoreEntryValues(); void explicitChanges(); @@ -860,6 +861,32 @@ void tst_qdeclarativestates::anchorRewindBug() delete rect; } +// QTBUG-11834 +void tst_qdeclarativestates::anchorRewindBug2() +{ + QDeclarativeEngine engine; + + QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorRewindBug2.qml"); + QDeclarativeRectangle *rect = qobject_cast(rectComponent.create()); + QVERIFY(rect != 0); + + QDeclarativeRectangle *mover = rect->findChild("mover"); + + QVERIFY(mover != 0); + QCOMPARE(mover->y(), qreal(0.0)); + QCOMPARE(mover->width(), qreal(50.0)); + + QDeclarativeItemPrivate::get(rect)->setState("anchored"); + QCOMPARE(mover->y(), qreal(250.0)); + QCOMPARE(mover->width(), qreal(200.0)); + + QDeclarativeItemPrivate::get(rect)->setState(""); + QCOMPARE(mover->y(), qreal(0.0)); + QCOMPARE(mover->width(), qreal(50.0)); + + delete rect; +} + void tst_qdeclarativestates::script() { QDeclarativeEngine engine; -- cgit v0.12 From a2ca8c305e6ebe145b82588d088f5dc16a4db861 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 15 Sep 2010 12:39:18 +1000 Subject: Give file and line error information for errors in dummydata. This also has the side effect of allowing types to be defined within the dummydata folder than can be used by other files in dummydata. --- tools/qml/qmlruntime.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index b38e80d..1eb7ee8 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -1067,11 +1067,7 @@ void QDeclarativeViewer::loadDummyDataFiles(const QString& directory) QStringList list = dir.entryList(); for (int i = 0; i < list.size(); ++i) { QString qml = list.at(i); - QFile f(dir.filePath(qml)); - f.open(QIODevice::ReadOnly); - QByteArray data = f.readAll(); - QDeclarativeComponent comp(canvas->engine()); - comp.setData(data, QUrl()); + QDeclarativeComponent comp(canvas->engine(), dir.filePath(qml)); QObject *dummyData = comp.create(); if(comp.isError()) { -- cgit v0.12 From b8ff1ae9d53d7cac64c90d3cf29a5f4ed7379330 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 15 Sep 2010 14:15:03 +1000 Subject: Compile with QT_NO_GESTURES. --- tools/qml/qmlruntime.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 1eb7ee8..c59621a 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -692,12 +692,14 @@ QDeclarativeViewer::~QDeclarativeViewer() void QDeclarativeViewer::enableExperimentalGestures() { +#ifndef QT_NO_GESTURES canvas->viewport()->grabGesture(Qt::TapGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent); canvas->viewport()->grabGesture(Qt::TapAndHoldGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent); canvas->viewport()->grabGesture(Qt::PanGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent); canvas->viewport()->grabGesture(Qt::PinchGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent); canvas->viewport()->grabGesture(Qt::SwipeGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent); canvas->viewport()->setAttribute(Qt::WA_AcceptTouchEvents); +#endif } QDeclarativeView *QDeclarativeViewer::view() const -- cgit v0.12 From 2a880df9a7c82f904f7761d389c7cd00d3c088cb Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 15 Sep 2010 15:20:00 +1000 Subject: Add missing images for dynamiclist example. --- .../modelviews/listview/content/pics/arrow-down.png | Bin 0 -> 594 bytes .../modelviews/listview/content/pics/arrow-up.png | Bin 0 -> 692 bytes .../modelviews/listview/content/pics/list-delete.png | Bin 0 -> 831 bytes .../modelviews/listview/content/pics/minus-sign.png | Bin 498 -> 250 bytes .../modelviews/listview/content/pics/plus-sign.png | Bin 907 -> 462 bytes 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 examples/declarative/modelviews/listview/content/pics/arrow-down.png create mode 100644 examples/declarative/modelviews/listview/content/pics/arrow-up.png create mode 100644 examples/declarative/modelviews/listview/content/pics/list-delete.png diff --git a/examples/declarative/modelviews/listview/content/pics/arrow-down.png b/examples/declarative/modelviews/listview/content/pics/arrow-down.png new file mode 100644 index 0000000..29d1d44 Binary files /dev/null and b/examples/declarative/modelviews/listview/content/pics/arrow-down.png differ diff --git a/examples/declarative/modelviews/listview/content/pics/arrow-up.png b/examples/declarative/modelviews/listview/content/pics/arrow-up.png new file mode 100644 index 0000000..e437312 Binary files /dev/null and b/examples/declarative/modelviews/listview/content/pics/arrow-up.png differ diff --git a/examples/declarative/modelviews/listview/content/pics/list-delete.png b/examples/declarative/modelviews/listview/content/pics/list-delete.png new file mode 100644 index 0000000..df2a147 Binary files /dev/null and b/examples/declarative/modelviews/listview/content/pics/list-delete.png differ diff --git a/examples/declarative/modelviews/listview/content/pics/minus-sign.png b/examples/declarative/modelviews/listview/content/pics/minus-sign.png index 2bb1a59..d6f233d 100644 Binary files a/examples/declarative/modelviews/listview/content/pics/minus-sign.png and b/examples/declarative/modelviews/listview/content/pics/minus-sign.png differ diff --git a/examples/declarative/modelviews/listview/content/pics/plus-sign.png b/examples/declarative/modelviews/listview/content/pics/plus-sign.png index e029787..40df113 100644 Binary files a/examples/declarative/modelviews/listview/content/pics/plus-sign.png and b/examples/declarative/modelviews/listview/content/pics/plus-sign.png differ -- cgit v0.12 From 4303f95b24af971393ba5d42eae616f683abaa04 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 15 Sep 2010 10:55:50 +0200 Subject: crashfix for tst_qdeclarativeanimations::badTypes() We always have to check for 0 before converting a raw pointer into a smart pointer Reviewed-by: Kai Koehne --- src/declarative/qml/qdeclarativebinding_p.h | 3 ++- src/declarative/util/qdeclarativestate_p_p.h | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index f38ed23..941a1b3 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -88,13 +88,14 @@ public: void addToObject(QObject *); void removeFromObject(); - Pointer weakPointer(); + static Pointer getPointer(QDeclarativeAbstractBinding *p) { return p ? p->weakPointer() : Pointer(); } protected: virtual ~QDeclarativeAbstractBinding(); void clear(); private: + Pointer weakPointer(); friend class QDeclarativeData; friend class QDeclarativeValueTypeProxyBinding; diff --git a/src/declarative/util/qdeclarativestate_p_p.h b/src/declarative/util/qdeclarativestate_p_p.h index c3c7bb4..4fd8f21 100644 --- a/src/declarative/util/qdeclarativestate_p_p.h +++ b/src/declarative/util/qdeclarativestate_p_p.h @@ -80,12 +80,12 @@ public: if (state == StartState) { m_value = a.fromValue; if (QDeclarativePropertyPrivate::binding(m_property)) { - m_binding = QDeclarativePropertyPrivate::binding(m_property)->weakPointer(); + m_binding = QDeclarativeAbstractBinding::getPointer(QDeclarativePropertyPrivate::binding(m_property)); } m_reverseEvent = true; } else { m_value = a.toValue; - m_binding = a.toBinding->weakPointer(); + m_binding = QDeclarativeAbstractBinding::getPointer(a.toBinding); m_reverseEvent = false; } } @@ -97,7 +97,7 @@ public: QDeclarativeSimpleAction(const QDeclarativeSimpleAction &other) : m_property(other.m_property), m_value(other.m_value), - m_binding(other.binding() ? other.binding()->weakPointer() : QDeclarativeAbstractBinding::Pointer()), + m_binding(QDeclarativeAbstractBinding::getPointer(other.binding())), m_specifiedObject(other.m_specifiedObject), m_specifiedProperty(other.m_specifiedProperty), m_event(other.m_event), @@ -109,7 +109,7 @@ public: { m_property = other.m_property; m_value = other.m_value; - m_binding = other.binding() ? other.binding()->weakPointer() : QDeclarativeAbstractBinding::Pointer(); + m_binding = QDeclarativeAbstractBinding::getPointer(other.binding()); m_specifiedObject = other.m_specifiedObject; m_specifiedProperty = other.m_specifiedProperty; m_event = other.m_event; @@ -140,7 +140,7 @@ public: void setBinding(QDeclarativeAbstractBinding *binding) { - m_binding = binding->weakPointer(); + m_binding = QDeclarativeAbstractBinding::getPointer(binding); } QDeclarativeAbstractBinding *binding() const -- cgit v0.12 From e3801c20bd3626c3c9c9fac110ee2f9e4269e3c8 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 15 Sep 2010 11:05:06 +0200 Subject: QEventDispatcherUnix: do not process too many timer if other events need to be processed first Task-number: QTBUG-13633 Reviewed-by: Brad --- src/corelib/kernel/qeventdispatcher_unix.cpp | 22 ++++++---- tests/auto/qtimer/tst_qtimer.cpp | 64 ++++++++++++++++++++++++++-- 2 files changed, 74 insertions(+), 12 deletions(-) diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index 9dadd82..f50994c 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -549,18 +549,22 @@ int QTimerInfoList::activateTimers() if (qt_disable_lowpriority_timers || isEmpty()) return 0; // nothing to do - bool firstTime = true; - timeval currentTime; - int n_act = 0, maxCount = count(); + int n_act = 0, maxCount = 0; firstTimerInfo = 0; - while (maxCount--) { - currentTime = updateCurrentTime(); - if (firstTime) { - repairTimersIfNeeded(); - firstTime = false; - } + timeval currentTime = updateCurrentTime(); + repairTimersIfNeeded(); + + // Find out how many timer have expired + for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) { + if (currentTime < (*it)->timeout) + break; + maxCount++; + } + + //fire the timers. + while (maxCount--) { if (isEmpty()) break; diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp index b651187..4ed42cf 100644 --- a/tests/auto/qtimer/tst_qtimer.cpp +++ b/tests/auto/qtimer/tst_qtimer.cpp @@ -87,6 +87,8 @@ private slots: void cancelLongTimer(); void singleShotStaticFunctionZeroTimeout(); void recurseOnTimeoutAndStopTimer(); + + void QTBUG13633_dontBlockEvents(); }; class TimerHelper : public QObject @@ -272,9 +274,6 @@ void tst_QTimer::livelock() #if defined(Q_OS_MAC) QEXPECT_FAIL("zero timer", "Posted events source are handled AFTER timers", Continue); QEXPECT_FAIL("non-zero timer", "Posted events source are handled AFTER timers", Continue); -#elif defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) - QEXPECT_FAIL("zero timer", "", Continue); - QEXPECT_FAIL("non-zero timer", "", Continue); #elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) if (QSysInfo::WindowsVersion < QSysInfo::WV_XP) QEXPECT_FAIL("non-zero timer", "Multimedia timers are not available on Windows 2000", Continue); @@ -668,5 +667,64 @@ void tst_QTimer::recurseOnTimeoutAndStopTimer() QVERIFY(!t.two->isActive()); } + + +class DontBlockEvents : public QObject +{ + Q_OBJECT +public: + DontBlockEvents(); + void timerEvent(QTimerEvent*); + + int count; + int total; + QBasicTimer m_timer; + +public slots: + void paintEvent(); + +}; + +DontBlockEvents::DontBlockEvents() +{ + count = 0; + total = 0; + + //QTBUG-13633 need few unrelated timer running to reproduce the bug. + (new QTimer(this))->start(2000); + (new QTimer(this))->start(2500); + (new QTimer(this))->start(3000); + (new QTimer(this))->start(5000); + (new QTimer(this))->start(1000); + (new QTimer(this))->start(2000); + + m_timer.start(1, this); +} + +void DontBlockEvents::timerEvent(QTimerEvent* event) +{ + if (event->timerId() == m_timer.timerId()) { + m_timer.start(0, this); + QMetaObject::invokeMethod(this, "paintEvent", Qt::QueuedConnection); + count++; + QCOMPARE(count, 1); + total++; + } +} + +void DontBlockEvents::paintEvent() +{ + count--; + QCOMPARE(count, 0); +} + + +void tst_QTimer::QTBUG13633_dontBlockEvents() +{ + DontBlockEvents t; + QTest::qWait(60); + QVERIFY(t.total > 2); +} + QTEST_MAIN(tst_QTimer) #include "tst_qtimer.moc" -- cgit v0.12 From b96c55b0edf888b919ac365465529a7b5e4d0ae6 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 15 Sep 2010 11:33:43 +0200 Subject: Make sure mapSelectionFromSource does not return a selection with invalid ranges. Similar for mapSelectionToSource, but that one could possibly be an assert instead. Merge-request: 2474 Reviewed-by: Olivier Goffart --- src/gui/itemviews/qabstractproxymodel.cpp | 16 ++++++--- .../tst_qsortfilterproxymodel.cpp | 39 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/src/gui/itemviews/qabstractproxymodel.cpp b/src/gui/itemviews/qabstractproxymodel.cpp index 43a1327..1c600e2 100644 --- a/src/gui/itemviews/qabstractproxymodel.cpp +++ b/src/gui/itemviews/qabstractproxymodel.cpp @@ -187,8 +187,12 @@ QItemSelection QAbstractProxyModel::mapSelectionToSource(const QItemSelection &p { QModelIndexList proxyIndexes = proxySelection.indexes(); QItemSelection sourceSelection; - for (int i = 0; i < proxyIndexes.size(); ++i) - sourceSelection << QItemSelectionRange(mapToSource(proxyIndexes.at(i))); + for (int i = 0; i < proxyIndexes.size(); ++i) { + const QModelIndex proxyIdx = mapToSource(proxyIndexes.at(i)); + if (!proxyIdx.isValid()) + continue; + sourceSelection << QItemSelectionRange(proxyIdx); + } return sourceSelection; } @@ -201,8 +205,12 @@ QItemSelection QAbstractProxyModel::mapSelectionFromSource(const QItemSelection { QModelIndexList sourceIndexes = sourceSelection.indexes(); QItemSelection proxySelection; - for (int i = 0; i < sourceIndexes.size(); ++i) - proxySelection << QItemSelectionRange(mapFromSource(sourceIndexes.at(i))); + for (int i = 0; i < sourceIndexes.size(); ++i) { + const QModelIndex srcIdx = mapFromSource(sourceIndexes.at(i)); + if (!srcIdx.isValid()) + continue; + proxySelection << QItemSelectionRange(srcIdx); + } return proxySelection; } diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp index 53fefee..66caf4a 100644 --- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp @@ -143,6 +143,7 @@ private slots: void taskQTBUG_10287_unnecessaryMapCreation(); void testMultipleProxiesWithSelection(); + void mapSelectionFromSource(); protected: void buildHierarchy(const QStringList &data, QAbstractItemModel *model); @@ -3075,6 +3076,44 @@ void tst_QSortFilterProxyModel::testMultipleProxiesWithSelection() } +static bool isValid(const QItemSelection &selection) { + foreach(const QItemSelectionRange &range, selection) + if (!range.isValid()) + return false; + return true; +} + +void tst_QSortFilterProxyModel::mapSelectionFromSource() +{ + QStringListModel model; + const QStringList initial = QString("bravo charlie delta echo").split(" "); + model.setStringList(initial); + + QSortFilterProxyModel proxy; + proxy.setDynamicSortFilter(true); + proxy.setFilterRegExp("d.*"); + proxy.setSourceModel(&model); + + // Only "delta" remains. + QVERIFY(proxy.rowCount() == 1); + + QItemSelection selection; + QModelIndex charlie = model.index(1, 0); + selection.append(QItemSelectionRange(charlie, charlie)); + QModelIndex delta = model.index(2, 0); + selection.append(QItemSelectionRange(delta, delta)); + QModelIndex echo = model.index(3, 0); + selection.append(QItemSelectionRange(echo, echo)); + + QVERIFY(isValid(selection)); + + QItemSelection proxiedSelection = proxy.mapSelectionFromSource(selection); + + // Only "delta" is in the mapped result. + QVERIFY(proxiedSelection.size() == 1); + QVERIFY(isValid(proxiedSelection)); +} + class Model10287 : public QStandardItemModel { Q_OBJECT -- cgit v0.12 From 7d861db82b9f8204c2fdc3c12220dd03bdb7b255 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Wed, 15 Sep 2010 13:03:37 +0200 Subject: The test livelock of QTimer is now expected to work Following the patch e3801c20bd3626c3c9c9fac110ee2f9e4269e3c8 of Olivier, this test is working for Mac as well. Reviewed-by: Olivier Goffart --- tests/auto/qtimer/tst_qtimer.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp index 4ed42cf..73b3452 100644 --- a/tests/auto/qtimer/tst_qtimer.cpp +++ b/tests/auto/qtimer/tst_qtimer.cpp @@ -271,10 +271,7 @@ void tst_QTimer::livelock() QCOMPARE(tester.timeoutsForFirst, 1); QCOMPARE(tester.timeoutsForExtra, 0); QCOMPARE(tester.timeoutsForSecond, 1); -#if defined(Q_OS_MAC) - QEXPECT_FAIL("zero timer", "Posted events source are handled AFTER timers", Continue); - QEXPECT_FAIL("non-zero timer", "Posted events source are handled AFTER timers", Continue); -#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) if (QSysInfo::WindowsVersion < QSysInfo::WV_XP) QEXPECT_FAIL("non-zero timer", "Multimedia timers are not available on Windows 2000", Continue); #elif defined(Q_OS_WINCE) -- cgit v0.12 From f8a1a56557dffec9179671ffa1622d88e9449660 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 15 Sep 2010 15:29:41 +0200 Subject: Fix Symbian def files for 34b805d66c09fb324d1b6a7bcf259e8743ef3894 --- src/s60installs/bwins/QtGuiu.def | 1 + src/s60installs/eabi/QtGuiu.def | 1 + 2 files changed, 2 insertions(+) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 01630e2..f9e88d7 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -12885,4 +12885,5 @@ EXPORTS ??0QGraphicsViewPrivate@@QAE@XZ @ 12884 NONAME ; QGraphicsViewPrivate::QGraphicsViewPrivate(void) ?flushDetachedPixmaps@QPixmapCache@@SAXXZ @ 12885 NONAME ; void QPixmapCache::flushDetachedPixmaps(void) ?replayLastMouseEvent@QGraphicsViewPrivate@@QAEXXZ @ 12886 NONAME ; void QGraphicsViewPrivate::replayLastMouseEvent(void) + ?children_clear@QGraphicsItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQGraphicsObject@@@@@Z @ 12887 NONAME ; void QGraphicsItemPrivate::children_clear(class QDeclarativeListProperty *) diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index c6d9ddb..6696beb 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -12093,4 +12093,5 @@ EXPORTS _ZN18QTapAndHoldGesture10setTimeoutEi @ 12092 NONAME _ZN18QTapAndHoldGesture7timeoutEv @ 12093 NONAME _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectFb @ 12094 NONAME + _ZN20QGraphicsItemPrivate14children_clearEP24QDeclarativeListPropertyI15QGraphicsObjectE @ 12095 NONAME -- cgit v0.12 From e0087081ff6088a284dff30a3ec7e24684236588 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 15 Sep 2010 15:31:17 +0200 Subject: Fix Symbian def files for 6454f4db1697af1d36ad4c0ea83ccd0bb490fd39 --- src/s60installs/bwins/QtDeclarativeu.def | 51 ++++++++++++++++++++++++++++++++ src/s60installs/eabi/QtDeclarativeu.def | 47 +++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index 50c948a..a2bff5d 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -1639,4 +1639,55 @@ EXPORTS ?baselineOffsetChanged@QDeclarativeItem@@IAEXM@Z @ 1638 NONAME ; void QDeclarativeItem::baselineOffsetChanged(float) ??6QDeclarativeInfo@@QAEAAV0@VQChar@@@Z @ 1639 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(class QChar) ?newObjects@QDeclarativeEngineDebug@@IAEXXZ @ 1640 NONAME ; void QDeclarativeEngineDebug::newObjects(void) + ?qt_metacast@QDeclarativePropertyChanges@@UAEPAXPBD@Z @ 1641 NONAME ; void * QDeclarativePropertyChanges::qt_metacast(char const *) + ?actions@QDeclarativePropertyChanges@@UAE?AV?$QList@VQDeclarativeAction@@@@XZ @ 1642 NONAME ; class QList QDeclarativePropertyChanges::actions(void) + ??1QDeclarativePropertyChanges@@UAE@XZ @ 1643 NONAME ; QDeclarativePropertyChanges::~QDeclarativePropertyChanges(void) + ??_EQDeclarativePropertyChanges@@UAE@I@Z @ 1644 NONAME ; QDeclarativePropertyChanges::~QDeclarativePropertyChanges(unsigned int) + ?setObject@QDeclarativePropertyChanges@@QAEXPAVQObject@@@Z @ 1645 NONAME ; void QDeclarativePropertyChanges::setObject(class QObject *) + ?staticMetaObject@QDeclarativePropertyChanges@@2UQMetaObject@@B @ 1646 NONAME ; struct QMetaObject const QDeclarativePropertyChanges::staticMetaObject + ?removeEntryFromRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@@Z @ 1647 NONAME ; bool QDeclarativeState::removeEntryFromRevertList(class QObject *, class QByteArray const &) + ?restoreEntryValues@QDeclarativePropertyChanges@@QBE_NXZ @ 1648 NONAME ; bool QDeclarativePropertyChanges::restoreEntryValues(void) const + ?setRestoreEntryValues@QDeclarativePropertyChanges@@QAEX_N@Z @ 1649 NONAME ; void QDeclarativePropertyChanges::setRestoreEntryValues(bool) + ?changeValue@QDeclarativePropertyChanges@@QAEXABVQByteArray@@ABVQVariant@@@Z @ 1650 NONAME ; void QDeclarativePropertyChanges::changeValue(class QByteArray const &, class QVariant const &) + ?metaObject@QDeclarativePropertyChanges@@UBEPBUQMetaObject@@XZ @ 1651 NONAME ; struct QMetaObject const * QDeclarativePropertyChanges::metaObject(void) const + ?data_clear@QDeclarativeItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 1652 NONAME ; void QDeclarativeItemPrivate::data_clear(class QDeclarativeListProperty *) + ?containsPropertyInRevertList@QDeclarativeState@@QBE_NPAVQObject@@ABVQByteArray@@@Z @ 1653 NONAME ; bool QDeclarativeState::containsPropertyInRevertList(class QObject *, class QByteArray const &) const + ?containsValue@QDeclarativePropertyChanges@@QBE_NABVQByteArray@@@Z @ 1654 NONAME ; bool QDeclarativePropertyChanges::containsValue(class QByteArray const &) const + ?bindingInRevertList@QDeclarativeState@@QBEPAVQDeclarativeAbstractBinding@@PAVQObject@@ABVQByteArray@@@Z @ 1655 NONAME ; class QDeclarativeAbstractBinding * QDeclarativeState::bindingInRevertList(class QObject *, class QByteArray const &) const + ?d_func@QDeclarativePropertyChanges@@ABEPBVQDeclarativePropertyChangesPrivate@@XZ @ 1656 NONAME ; class QDeclarativePropertyChangesPrivate const * QDeclarativePropertyChanges::d_func(void) const + ?containsProperty@QDeclarativePropertyChanges@@QBE_NABVQByteArray@@@Z @ 1657 NONAME ; bool QDeclarativePropertyChanges::containsProperty(class QByteArray const &) const + ?trUtf8@QDeclarativePropertyChanges@@SA?AVQString@@PBD0H@Z @ 1658 NONAME ; class QString QDeclarativePropertyChanges::trUtf8(char const *, char const *, int) + ?property@QDeclarativePropertyChanges@@QBE?AVQVariant@@ABVQByteArray@@@Z @ 1659 NONAME ; class QVariant QDeclarativePropertyChanges::property(class QByteArray const &) const + ?containsExpression@QDeclarativePropertyChanges@@QBE_NABVQByteArray@@@Z @ 1660 NONAME ; bool QDeclarativePropertyChanges::containsExpression(class QByteArray const &) const + ?d_func@QDeclarativeStateOperation@@ABEPBVQDeclarativeStateOperationPrivate@@XZ @ 1661 NONAME ; class QDeclarativeStateOperationPrivate const * QDeclarativeStateOperation::d_func(void) const + ?d_func@QDeclarativePropertyChanges@@AAEPAVQDeclarativePropertyChangesPrivate@@XZ @ 1662 NONAME ; class QDeclarativePropertyChangesPrivate * QDeclarativePropertyChanges::d_func(void) + ?state@QDeclarativeStateOperation@@QBEPAVQDeclarativeState@@XZ @ 1663 NONAME ; class QDeclarativeState * QDeclarativeStateOperation::state(void) const + ?value@QDeclarativePropertyChanges@@QBE?AVQVariant@@ABVQByteArray@@@Z @ 1664 NONAME ; class QVariant QDeclarativePropertyChanges::value(class QByteArray const &) const + ?qt_metacall@QDeclarativePropertyChanges@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1665 NONAME ; int QDeclarativePropertyChanges::qt_metacall(enum QMetaObject::Call, int, void * *) + ?trUtf8@QDeclarativePropertyChanges@@SA?AVQString@@PBD0@Z @ 1666 NONAME ; class QString QDeclarativePropertyChanges::trUtf8(char const *, char const *) + ?attachToState@QDeclarativePropertyChanges@@QAEXXZ @ 1667 NONAME ; void QDeclarativePropertyChanges::attachToState(void) + ?changeExpression@QDeclarativePropertyChanges@@QAEXABVQByteArray@@ABVQString@@@Z @ 1668 NONAME ; void QDeclarativePropertyChanges::changeExpression(class QByteArray const &, class QString const &) + ?addEntryToRevertList@QDeclarativeState@@QAEXABVQDeclarativeAction@@@Z @ 1669 NONAME ; void QDeclarativeState::addEntryToRevertList(class QDeclarativeAction const &) + ??0QDeclarativePropertyChanges@@QAE@XZ @ 1670 NONAME ; QDeclarativePropertyChanges::QDeclarativePropertyChanges(void) + ?resources_clear@QDeclarativeItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 1671 NONAME ; void QDeclarativeItemPrivate::resources_clear(class QDeclarativeListProperty *) + ?isExplicit@QDeclarativePropertyChanges@@QBE_NXZ @ 1672 NONAME ; bool QDeclarativePropertyChanges::isExplicit(void) const + ?setState@QDeclarativeStateOperation@@QAEXPAVQDeclarativeState@@@Z @ 1673 NONAME ; void QDeclarativeStateOperation::setState(class QDeclarativeState *) + ?detachFromState@QDeclarativePropertyChanges@@QAEXXZ @ 1674 NONAME ; void QDeclarativePropertyChanges::detachFromState(void) + ?tr@QDeclarativePropertyChanges@@SA?AVQString@@PBD0H@Z @ 1675 NONAME ; class QString QDeclarativePropertyChanges::tr(char const *, char const *, int) + ?addEntriesToRevertList@QDeclarativeState@@QAEXABV?$QList@VQDeclarativeAction@@@@@Z @ 1676 NONAME ; void QDeclarativeState::addEntriesToRevertList(class QList const &) + ?expression@QDeclarativePropertyChanges@@QBE?AVQString@@ABVQByteArray@@@Z @ 1677 NONAME ; class QString QDeclarativePropertyChanges::expression(class QByteArray const &) const + ?object@QDeclarativePropertyChanges@@QBEPAVQObject@@XZ @ 1678 NONAME ; class QObject * QDeclarativePropertyChanges::object(void) const + ?valueInRevertList@QDeclarativeState@@QBE?AVQVariant@@PAVQObject@@ABVQByteArray@@@Z @ 1679 NONAME ; class QVariant QDeclarativeState::valueInRevertList(class QObject *, class QByteArray const &) const + ?removeAllEntriesFromRevertList@QDeclarativeState@@QAEXPAVQObject@@@Z @ 1680 NONAME ; void QDeclarativeState::removeAllEntriesFromRevertList(class QObject *) + ?d_func@QDeclarativeStateOperation@@AAEPAVQDeclarativeStateOperationPrivate@@XZ @ 1681 NONAME ; class QDeclarativeStateOperationPrivate * QDeclarativeStateOperation::d_func(void) + ?changeValueInRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@ABVQVariant@@@Z @ 1682 NONAME ; bool QDeclarativeState::changeValueInRevertList(class QObject *, class QByteArray const &, class QVariant const &) + ?setIsExplicit@QDeclarativePropertyChanges@@QAEX_N@Z @ 1683 NONAME ; void QDeclarativePropertyChanges::setIsExplicit(bool) + ?isStateActive@QDeclarativeState@@QBE_NXZ @ 1684 NONAME ; bool QDeclarativeState::isStateActive(void) const + ?data_count@QDeclarativeItemPrivate@@SAHPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 1685 NONAME ; int QDeclarativeItemPrivate::data_count(class QDeclarativeListProperty *) + ?removeProperty@QDeclarativePropertyChanges@@QAEXABVQByteArray@@@Z @ 1686 NONAME ; void QDeclarativePropertyChanges::removeProperty(class QByteArray const &) + ?data_at@QDeclarativeItemPrivate@@SAPAVQObject@@PAV?$QDeclarativeListProperty@VQObject@@@@H@Z @ 1687 NONAME ; class QObject * QDeclarativeItemPrivate::data_at(class QDeclarativeListProperty *, int) + ?tr@QDeclarativePropertyChanges@@SA?AVQString@@PBD0@Z @ 1688 NONAME ; class QString QDeclarativePropertyChanges::tr(char const *, char const *) + ?changeBindingInRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@PAVQDeclarativeAbstractBinding@@@Z @ 1689 NONAME ; bool QDeclarativeState::changeBindingInRevertList(class QObject *, class QByteArray const &, class QDeclarativeAbstractBinding *) + ?getStaticMetaObject@QDeclarativePropertyChanges@@SAABUQMetaObject@@XZ @ 1690 NONAME ; struct QMetaObject const & QDeclarativePropertyChanges::getStaticMetaObject(void) + ?weakPointer@QDeclarativeAbstractBinding@@QAE?AV?$QWeakPointer@VQDeclarativeAbstractBinding@@@@XZ @ 1691 NONAME ; class QWeakPointer QDeclarativeAbstractBinding::weakPointer(void) diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index 2a14abe..37325fa 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -1675,4 +1675,51 @@ EXPORTS _ZrsR11QDataStreamRN29QDeclarativeEngineDebugServer22QDeclarativeObjectDataE @ 1674 NONAME _ZrsR11QDataStreamRN29QDeclarativeEngineDebugServer26QDeclarativeObjectPropertyE @ 1675 NONAME _ZN23QDeclarativeEngineDebug10newObjectsEv @ 1676 NONAME + _ZN17QDeclarativeState20addEntryToRevertListERK18QDeclarativeAction @ 1677 NONAME + _ZN17QDeclarativeState22addEntriesToRevertListERK5QListI18QDeclarativeActionE @ 1678 NONAME + _ZN17QDeclarativeState23changeValueInRevertListEP7QObjectRK10QByteArrayRK8QVariant @ 1679 NONAME + _ZN17QDeclarativeState25changeBindingInRevertListEP7QObjectRK10QByteArrayP27QDeclarativeAbstractBinding @ 1680 NONAME + _ZN17QDeclarativeState25removeEntryFromRevertListEP7QObjectRK10QByteArray @ 1681 NONAME + _ZN17QDeclarativeState30removeAllEntriesFromRevertListEP7QObject @ 1682 NONAME + _ZN23QDeclarativeItemPrivate10data_clearEP24QDeclarativeListPropertyI7QObjectE @ 1683 NONAME + _ZN23QDeclarativeItemPrivate10data_countEP24QDeclarativeListPropertyI7QObjectE @ 1684 NONAME + _ZN23QDeclarativeItemPrivate15resources_clearEP24QDeclarativeListPropertyI7QObjectE @ 1685 NONAME + _ZN23QDeclarativeItemPrivate7data_atEP24QDeclarativeListPropertyI7QObjectEi @ 1686 NONAME + _ZN26QDeclarativeStateOperation8setStateEP17QDeclarativeState @ 1687 NONAME + _ZN27QDeclarativeAbstractBinding11weakPointerEv @ 1688 NONAME + _ZN27QDeclarativePropertyChanges11changeValueERK10QByteArrayRK8QVariant @ 1689 NONAME + _ZN27QDeclarativePropertyChanges11qt_metacallEN11QMetaObject4CallEiPPv @ 1690 NONAME + _ZN27QDeclarativePropertyChanges11qt_metacastEPKc @ 1691 NONAME + _ZN27QDeclarativePropertyChanges13attachToStateEv @ 1692 NONAME + _ZN27QDeclarativePropertyChanges13setIsExplicitEb @ 1693 NONAME + _ZN27QDeclarativePropertyChanges14removePropertyERK10QByteArray @ 1694 NONAME + _ZN27QDeclarativePropertyChanges15detachFromStateEv @ 1695 NONAME + _ZN27QDeclarativePropertyChanges16changeExpressionERK10QByteArrayRK7QString @ 1696 NONAME + _ZN27QDeclarativePropertyChanges16staticMetaObjectE @ 1697 NONAME DATA 16 + _ZN27QDeclarativePropertyChanges19getStaticMetaObjectEv @ 1698 NONAME + _ZN27QDeclarativePropertyChanges21setRestoreEntryValuesEb @ 1699 NONAME + _ZN27QDeclarativePropertyChanges7actionsEv @ 1700 NONAME + _ZN27QDeclarativePropertyChanges9setObjectEP7QObject @ 1701 NONAME + _ZN27QDeclarativePropertyChangesC1Ev @ 1702 NONAME + _ZN27QDeclarativePropertyChangesC2Ev @ 1703 NONAME + _ZN27QDeclarativePropertyChangesD0Ev @ 1704 NONAME + _ZN27QDeclarativePropertyChangesD1Ev @ 1705 NONAME + _ZN27QDeclarativePropertyChangesD2Ev @ 1706 NONAME + _ZNK17QDeclarativeState13isStateActiveEv @ 1707 NONAME + _ZNK17QDeclarativeState17valueInRevertListEP7QObjectRK10QByteArray @ 1708 NONAME + _ZNK17QDeclarativeState19bindingInRevertListEP7QObjectRK10QByteArray @ 1709 NONAME + _ZNK17QDeclarativeState28containsPropertyInRevertListEP7QObjectRK10QByteArray @ 1710 NONAME + _ZNK26QDeclarativeStateOperation5stateEv @ 1711 NONAME + _ZNK27QDeclarativePropertyChanges10expressionERK10QByteArray @ 1712 NONAME + _ZNK27QDeclarativePropertyChanges10isExplicitEv @ 1713 NONAME + _ZNK27QDeclarativePropertyChanges10metaObjectEv @ 1714 NONAME + _ZNK27QDeclarativePropertyChanges13containsValueERK10QByteArray @ 1715 NONAME + _ZNK27QDeclarativePropertyChanges16containsPropertyERK10QByteArray @ 1716 NONAME + _ZNK27QDeclarativePropertyChanges18containsExpressionERK10QByteArray @ 1717 NONAME + _ZNK27QDeclarativePropertyChanges18restoreEntryValuesEv @ 1718 NONAME + _ZNK27QDeclarativePropertyChanges5valueERK10QByteArray @ 1719 NONAME + _ZNK27QDeclarativePropertyChanges6objectEv @ 1720 NONAME + _ZNK27QDeclarativePropertyChanges8propertyERK10QByteArray @ 1721 NONAME + _ZTI27QDeclarativePropertyChanges @ 1722 NONAME + _ZTV27QDeclarativePropertyChanges @ 1723 NONAME -- cgit v0.12 From 9a68fa7167cac5ebe98b23d598ab9be9012f2ef0 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 15 Sep 2010 16:25:12 +0200 Subject: Doc: Minor improvements to QML-related documentation. --- doc/src/declarative/qtdeclarative.qdoc | 7 +++---- doc/src/objectmodel/properties.qdoc | 2 +- src/declarative/graphicsitems/qdeclarativerectangle.cpp | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc index 044758f..5232841 100644 --- a/doc/src/declarative/qtdeclarative.qdoc +++ b/doc/src/declarative/qtdeclarative.qdoc @@ -56,7 +56,7 @@ \macro QML_DECLARE_TYPE() \relates QDeclarativeEngine - Equivalent to Q_DECLARE_METATYPE(TYPE) and Q_DECLARE_METATYPE(QDeclarativeListProperty) + Equivalent to \c Q_DECLARE_METATYPE(TYPE) and \c Q_DECLARE_METATYPE(QDeclarativeListProperty) */ /*! @@ -93,7 +93,7 @@ specified module name and version number: \qml - imoprt com.mycompany.qmlcomponents 1.0 + import com.mycompany.qmlcomponents 1.0 Slider { ... } \endqml @@ -147,7 +147,7 @@ This will cause any QML which uses this module and attempts to use the type to produce an error message: \code -fun.qml: Get back to work, slacker! + fun.qml: Get back to work, slacker! Game { ^ \endcode @@ -176,6 +176,5 @@ fun.qml: Get back to work, slacker! This template function registers the C++ type in the QML system under the name \a typeName. - Returns the QML type id. */ diff --git a/doc/src/objectmodel/properties.qdoc b/doc/src/objectmodel/properties.qdoc index 3a8e3b4..2cb7c04 100644 --- a/doc/src/objectmodel/properties.qdoc +++ b/doc/src/objectmodel/properties.qdoc @@ -29,7 +29,7 @@ \page properties.html \title The Property System \brief An overview of Qt's property system. - + \ingroup qt-basic-concepts \target Qt's Property System diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index e33969d..9831d5f 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -85,8 +85,8 @@ void QDeclarativePen::setWidth(int w) /*! \qmlclass GradientStop QDeclarativeGradientStop \ingroup qml-basic-visual-elements - \since 4.7 - \brief The GradientStop item defines the color at a position in a Gradient + \since 4.7 + \brief The GradientStop item defines the color at a position in a Gradient. \sa Gradient */ -- cgit v0.12 From ef6f2bf9098eff849290494f2da55c3b9ab0b95f Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 15 Sep 2010 16:56:15 +0200 Subject: Maintaining codecsData in qtextcodec_symbian.cpp Adding portuguese_gsm7_single, portuguese_locking_gsm7ext, portuguese_locking_single, spanish_gsm7_single and GB18030. This should reduce the amount of expensive calls to CCnvCharacterSetConverter:: ConvertCharacterSetIdentifierToStandardNameL() Also adding an alias "Java UTF-8" to the existing "JAVA UTF-8" since that is what the function with long name would return. Task-Number: QTBUG-13565 Reviewed-By: Olivier Goffart --- src/corelib/codecs/qtextcodec_symbian.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/corelib/codecs/qtextcodec_symbian.cpp b/src/corelib/codecs/qtextcodec_symbian.cpp index 20e0cfc..322c146 100644 --- a/src/corelib/codecs/qtextcodec_symbian.cpp +++ b/src/corelib/codecs/qtextcodec_symbian.cpp @@ -60,7 +60,7 @@ struct QSymbianCodecInitData { */ static const QSymbianCodecInitData codecsData[] = { { /*268439485*/ KCharacterSetIdentifierShiftJis, 17, "Shift_JIS\0MS_Kanji\0csShiftJIS\0MS_KANJI\0SJIS\0" }, - { /*268439486*/ KCharacterSetIdentifierGb2312, 57, "GB2312\0csGB2312\0CN-GB\0EUC-CN\0" }, + { /*268439486*/ KCharacterSetIdentifierGb2312, 57, "GB2312\0csGB2312\0CN-GB\0EUC-CN\0" }, // Note: ConvertCharacterSetIdentifierToMibEnumL returns Mib 0 instaead of 57 { /*268439487*/ KCharacterSetIdentifierBig5, 2026, "Big5\0csBig5\0Big5-ETen\0CP950\0BIG-FIVE\0CN-BIG5\0" }, { /*268440246*/ KCharacterSetIdentifierCodePage1252, 2252, "windows-1252\0Code Page 1252\0CP1252\0MS-ANSI\0" }, // { /*268450576*/ KCharacterSetIdentifierIso88591, 4, "ISO-8859-1\0ISO_8859-1:1987\0iso-ir-100\0ISO_8859-1\0latin1\0l1\0IBM819\0CP819\0csISOLatin1\0ISO-IR-100\0ISO8859-1\0L1\0LATIN1\0CSISOLATIN1\0" }, @@ -76,7 +76,7 @@ static const QSymbianCodecInitData codecsData[] = { { /*268458028*/ KCharacterSetIdentifierUtf7, 103, "UTF-7\0UNICODE-1-1-UTF-7\0CSUNICODE11UTF7\0" }, // { /*268458029*/ KCharacterSetIdentifierUtf8, 106, "UTF-8\0" }, { /*268458030*/ KCharacterSetIdentifierImapUtf7, 0, "IMAP UTF-7\0" }, - { /*268458031*/ KCharacterSetIdentifierJavaConformantUtf8, 0, "JAVA UTF-8\0" }, + { /*268458031*/ KCharacterSetIdentifierJavaConformantUtf8, 0, "Java UTF-8\0JAVA UTF-8\0" }, { /*268458454*/ 268458454, 2250, "Windows-1250\0CP1250\0MS-EE\0" }, { /*268458455*/ 268458455, 2251, "Windows-1251\0CP1251\0MS-CYRL\0" }, { /*268458456*/ 268458456, 2253, "Windows-1253\0CP1253\0MS-GREEK\0" }, @@ -110,11 +110,16 @@ static const QSymbianCodecInitData codecsData[] = { { /*270562232*/ 270562232, 2258, "Windows-1258\0CP1258\0WINDOWS-1258\0" }, { /*270586888*/ 270586888, 0, "J5\0" }, { /*271011982*/ 271011982, 0, "ISCII\0" }, - { /*271066541*/ 271066541, 2009, "CP850\0IBM850\0""850\0csPC850Multilingual\0" }, + { /*271066541*/ 271066541, 2009, "CP850\0IBM850\0""850\0csPC850Multilingual\0" }, // Note: ConvertCharacterSetIdentifierToMibEnumL returns Mib 0 instead of 2009 { /*271082493*/ 271082493, 0, "EXTENDED_SMS_7BIT\0" }, { /*271082494*/ 271082494, 0, "gsm7_turkish_single\0" }, { /*271082495*/ 271082495, 0, "turkish_locking_gsm7ext\0" }, { /*271082496*/ 271082496, 0, "turkish_locking_single\0" }, + { /*271082503*/ 271082503, 0, "portuguese_gsm7_single\0" }, + { /*271082504*/ 271082504, 0, "portuguese_locking_gsm7ext\0" }, + { /*271082505*/ 271082505, 0, "portuguese_locking_single\0" }, + { /*271082506*/ 271082506, 0, "spanish_gsm7_single\0" }, + { /*271085624*/ 271085624, 114, "GB18030\0" }, { /*536929574*/ 536929574, 38, "EUC-KR\0" }, { /*536936703*/ 536936703, 0, "CP949\0" }, { /*536936705*/ 536936705, 37, "ISO-2022-KR\0" }, @@ -659,6 +664,10 @@ QSymbianTextCodec *QSymbianTextCodec::init() if (charsetId == localeMapperId) localeMapper = c; } else { + // We did not find the charsetId in our codecsData[], therefore we ask + // the OS for the codec name. We first try to get a "standard name" and fall + // back to array->At(i).Name(), if really needed. array->At(i).Name() is not + // guaranteed to be a correct name for QTextCodec::codecFromName(). QScopedPointer buf; QT_TRAP_THROWING(buf.reset(converter->ConvertCharacterSetIdentifierToStandardNameL(charsetId, qt_s60GetRFs()))) QByteArray name; -- cgit v0.12 From 42bceb1f394e462a43615286b008e31025c8f0f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Tue, 14 Sep 2010 16:23:54 +0200 Subject: doc: Fixed a \overload --- src/corelib/tools/qcryptographichash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index f418de9..043d6a3 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -147,7 +147,7 @@ void QCryptographicHash::addData(const char *data, int length) } /*! - /overload + \overload addData() */ void QCryptographicHash::addData(const QByteArray &data) { -- cgit v0.12 From 1d30c86ab0b0c609c68bb53adc633b3da8b2863d Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 15 Sep 2010 19:05:09 +0200 Subject: Fix bug in 34b805d66c09fb324d1b6a7bcf259e8743ef3894 This time the implementation of clear is correct Reviewed-by: Marco Bubke --- src/declarative/graphicsitems/qdeclarativeflickable.cpp | 7 ++++--- src/declarative/graphicsitems/qdeclarativeitem.cpp | 7 ++++--- src/gui/graphicsview/qgraphicsitem.cpp | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index bf3d88b..5a94afb 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -1069,8 +1069,9 @@ static inline QObject *children_at_helper(QGraphicsObject *object, int index) static inline void children_clear_helper(QGraphicsObject *object) { QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(object); - for (int index = 0 ;index < d->children.count();index++) - QGraphicsItemPrivate::get(d->children.at(index))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); + int childCount = d->children.count(); + for (int index = 0 ;index < childCount; index++) + QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); } int QDeclarativeFlickablePrivate::data_count(QDeclarativeListProperty *prop) @@ -1087,7 +1088,7 @@ QObject *QDeclarativeFlickablePrivate::data_at(QDeclarativeListProperty const int j = i - resourcesCount; QGraphicsObject *contentObject = static_cast(prop->data)->contentItem; if (j < children_count_helper(contentObject)) - children_at_helper(contentObject, j); + return children_at_helper(contentObject, j); return 0; } diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 53a4710..0ac616d 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1638,8 +1638,9 @@ static inline QObject *children_at_helper(QDeclarativeListProperty *pro static inline void children_clear_helper(QDeclarativeListProperty *prop) { QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast(prop->object)); - for (int index = 0 ;index < d->children.count();index++) - QGraphicsItemPrivate::get(d->children.at(index))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); + int childCount = d->children.count(); + for (int index = 0 ;index < childCount; index++) + QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); } int QDeclarativeItemPrivate::data_count(QDeclarativeListProperty *prop) @@ -1654,7 +1655,7 @@ QObject *QDeclarativeItemPrivate::data_at(QDeclarativeListProperty *pro return resources_at(prop, i); const int j = i - resourcesCount; if (j < children_count_helper(prop)) - children_at_helper(prop, j); + return children_at_helper(prop, j); return 0; } diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 9e43f2f..2600d06 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -7679,8 +7679,9 @@ QGraphicsObject *QGraphicsItemPrivate::children_at(QDeclarativeListProperty *list) { QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast(list->object)); - for (int index = 0 ;index < d->children.count();index++) - QGraphicsItemPrivate::get(d->children.at(index))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); + int childCount = d->children.count(); + for (int index = 0; index < childCount; index++) + QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); } /*! -- cgit v0.12 From f41eac269d354ebeb797b9cb173b09fc996564cf Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 15 Sep 2010 19:20:12 +0200 Subject: Doc: Further QML improvements. --- doc/src/images/qml-mousearea-snippet.png | Bin 0 -> 780 bytes doc/src/snippets/declarative/mousearea.qml | 119 --------------------- .../declarative/mousearea/mousearea-snippet.qml | 53 +++++++++ .../snippets/declarative/mousearea/mousearea.qml | 119 +++++++++++++++++++++ .../declarative/mousearea/mouseareadragfilter.qml | 72 +++++++++++++ .../snippets/declarative/mouseareadragfilter.qml | 72 ------------- .../graphicsitems/qdeclarativemousearea.cpp | 83 ++++++++++---- 7 files changed, 305 insertions(+), 213 deletions(-) create mode 100644 doc/src/images/qml-mousearea-snippet.png delete mode 100644 doc/src/snippets/declarative/mousearea.qml create mode 100644 doc/src/snippets/declarative/mousearea/mousearea-snippet.qml create mode 100644 doc/src/snippets/declarative/mousearea/mousearea.qml create mode 100644 doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml delete mode 100644 doc/src/snippets/declarative/mouseareadragfilter.qml diff --git a/doc/src/images/qml-mousearea-snippet.png b/doc/src/images/qml-mousearea-snippet.png new file mode 100644 index 0000000..1522944 Binary files /dev/null and b/doc/src/images/qml-mousearea-snippet.png differ diff --git a/doc/src/snippets/declarative/mousearea.qml b/doc/src/snippets/declarative/mousearea.qml deleted file mode 100644 index e7764f9..0000000 --- a/doc/src/snippets/declarative/mousearea.qml +++ /dev/null @@ -1,119 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -//! [import] -import Qt 4.7 -//! [import] - -Rectangle { - width: childrenRect.width - height: childrenRect.height - -Row { - -//! [intro] -Rectangle { - width: 100; height: 100 - color: "green" - - MouseArea { - anchors.fill: parent - onClicked: { parent.color = 'red' } - } -} -//! [intro] - -//! [intro-extended] -Rectangle { - width: 100; height: 100 - color: "green" - - MouseArea { - anchors.fill: parent - acceptedButtons: Qt.LeftButton | Qt.RightButton - onClicked: { - if (mouse.button == Qt.RightButton) - parent.color = 'blue'; - else - parent.color = 'red'; - } - } -} -//! [intro-extended] - -//! [drag] -Rectangle { - id: container - width: 600; height: 200 - - Rectangle { - id: rect - width: 50; height: 50 - color: "red" - opacity: (600.0 - rect.x) / 600 - - MouseArea { - anchors.fill: parent - drag.target: rect - drag.axis: Drag.XAxis - drag.minimumX: 0 - drag.maximumX: container.width - rect.width - } - } -} -//! [drag] - -//! [mousebuttons] -Text { - text: mouseArea.pressedButtons & Qt.RightButton ? "right" : "" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - - MouseArea { - id: mouseArea - anchors.fill: parent - acceptedButtons: Qt.LeftButton | Qt.RightButton - } -} -//! [mousebuttons] - -} - -} diff --git a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml new file mode 100644 index 0000000..85071f1 --- /dev/null +++ b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import Qt 4.7 + +Rectangle { + width: 100; height: 100 + color: "green" + + MouseArea { + anchors.fill: parent + onClicked: { parent.color = 'red' } + } +} +//! [document] diff --git a/doc/src/snippets/declarative/mousearea/mousearea.qml b/doc/src/snippets/declarative/mousearea/mousearea.qml new file mode 100644 index 0000000..e7764f9 --- /dev/null +++ b/doc/src/snippets/declarative/mousearea/mousearea.qml @@ -0,0 +1,119 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [import] +import Qt 4.7 +//! [import] + +Rectangle { + width: childrenRect.width + height: childrenRect.height + +Row { + +//! [intro] +Rectangle { + width: 100; height: 100 + color: "green" + + MouseArea { + anchors.fill: parent + onClicked: { parent.color = 'red' } + } +} +//! [intro] + +//! [intro-extended] +Rectangle { + width: 100; height: 100 + color: "green" + + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + onClicked: { + if (mouse.button == Qt.RightButton) + parent.color = 'blue'; + else + parent.color = 'red'; + } + } +} +//! [intro-extended] + +//! [drag] +Rectangle { + id: container + width: 600; height: 200 + + Rectangle { + id: rect + width: 50; height: 50 + color: "red" + opacity: (600.0 - rect.x) / 600 + + MouseArea { + anchors.fill: parent + drag.target: rect + drag.axis: Drag.XAxis + drag.minimumX: 0 + drag.maximumX: container.width - rect.width + } + } +} +//! [drag] + +//! [mousebuttons] +Text { + text: mouseArea.pressedButtons & Qt.RightButton ? "right" : "" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + + MouseArea { + id: mouseArea + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + } +} +//! [mousebuttons] + +} + +} diff --git a/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml b/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml new file mode 100644 index 0000000..fa0682e --- /dev/null +++ b/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [dragfilter] +import Qt 4.7 + +Rectangle { + width: 480 + height: 320 + Rectangle { + x: 30; y: 30 + width: 300; height: 240 + color: "lightsteelblue" + + MouseArea { + anchors.fill: parent + drag.target: parent; + drag.axis: "XAxis" + drag.minimumX: 30 + drag.maximumX: 150 + drag.filterChildren: true + + Rectangle { + color: "yellow" + x: 50; y : 50 + width: 100; height: 100 + MouseArea { + anchors.fill: parent + onClicked: console.log("Clicked") + } + } + } + } +} +//! [dragfilter] diff --git a/doc/src/snippets/declarative/mouseareadragfilter.qml b/doc/src/snippets/declarative/mouseareadragfilter.qml deleted file mode 100644 index fa0682e..0000000 --- a/doc/src/snippets/declarative/mouseareadragfilter.qml +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -//! [dragfilter] -import Qt 4.7 - -Rectangle { - width: 480 - height: 320 - Rectangle { - x: 30; y: 30 - width: 300; height: 240 - color: "lightsteelblue" - - MouseArea { - anchors.fill: parent - drag.target: parent; - drag.axis: "XAxis" - drag.minimumX: 30 - drag.maximumX: 150 - drag.filterChildren: true - - Rectangle { - color: "yellow" - x: 50; y : 50 - width: 100; height: 100 - MouseArea { - anchors.fill: parent - onClicked: console.log("Clicked") - } - } - } - } -} -//! [dragfilter] diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index 5516611..666f5e1 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -185,27 +185,57 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() \brief The MouseArea item enables simple mouse handling. \inherits Item - A MouseArea is typically used in conjunction with a visible item, - where the MouseArea effectively 'proxies' mouse handling for that - item. For example, we can put a MouseArea in a \l Rectangle that changes + A MouseArea is an invisible item that is typically used in conjunction with + a visible item in order to provide mouse handling for that item. + By effectively acting as a proxy, the logic for mouse handling can be + contained within a MouseArea item. + + For basic key handling, see the \l{Keys}{Keys attached property}. + + The \l enabled property is used to enable and disable mouse handling for + the proxied item. When disabled, the mouse area becomes transparent to + mouse events. + + The \l pressed read-only property indicates whether or not the user is + holding down a mouse button over the mouse area. This property is often + used in bindings between properties in a user interface. The containsMouse + read-only property indicates the presence of the mouse cursor over the + mouse area but, by default, only when a mouse button is held down; see below + for further details. + + Information about the mouse position and button clicks are provided via + signals for which event handler properties are defined. The most commonly + used involved handling mouse presses and clicks: onClicked, onDoubleClicked, + onPressed, onReleased and onPressAndHold. + + By default, MouseArea items only report mouse clicks and not changes to the + position of the mouse cursor. Setting the hoverEnabled property ensures that + handlers defined for onPositionChanged, onEntered and onExited are used and + that the containsMouse property is updated even when no mouse buttons are + pressed. + + \section1 Example Usage + + \beginfloatright + \inlineimage qml-mousearea-snippet.png + \endfloat + + The following example uses a MouseArea in a \l Rectangle that changes the \l Rectangle color to red when clicked: - \snippet doc/src/snippets/declarative/mousearea.qml import + \snippet doc/src/snippets/declarative/mousearea/mousearea.qml import \codeline - \snippet doc/src/snippets/declarative/mousearea.qml intro + \snippet doc/src/snippets/declarative/mousearea/mousearea.qml intro - Many MouseArea signals pass a \l {MouseEvent}{mouse} parameter that contains + \clearfloat + Many MouseArea signals pass a \l{MouseEvent}{mouse} parameter that contains additional information about the mouse event, such as the position, button, and any key modifiers. Here is an extension of the previous example that produces a different color when the area is right clicked: - \snippet doc/src/snippets/declarative/mousearea.qml intro-extended - - For basic key handling, see the \l {Keys}{Keys attached property}. - - MouseArea is an invisible item: it is never painted. + \snippet doc/src/snippets/declarative/mousearea/mousearea.qml intro-extended \sa MouseEvent, {declarative/touchinteraction/mousearea}{MouseArea example} */ @@ -310,11 +340,14 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() \qmlsignal MouseArea::onCanceled() This handler is called when mouse events have been canceled, either because an event was not accepted, or - because another element stole the mouse event handling. This signal is for advanced use: it is useful when - there is more than one MouseArea that is handling input, or when there is a MouseArea inside a \l Flickable. In the latter - case, if you execute some logic on the pressed signal and then start dragging, the \l Flickable will steal the mouse handling - from the MouseArea. In these cases, to reset the logic when the MouseArea has lost the mouse handling to the - \l Flickable, \c onCanceled should be used in addition to onReleased. + because another element stole the mouse event handling. + + This signal is for advanced use: it is useful when there is more than one MouseArea + that is handling input, or when there is a MouseArea inside a \l Flickable. In the latter + case, if you execute some logic on the pressed signal and then start dragging, the + \l Flickable will steal the mouse handling from the MouseArea. In these cases, to reset + the logic when the MouseArea has lost the mouse handling to the \l Flickable, + \c onCanceled should be used in addition to onReleased. */ QDeclarativeMouseArea::QDeclarativeMouseArea(QDeclarativeItem *parent) @@ -331,11 +364,13 @@ QDeclarativeMouseArea::~QDeclarativeMouseArea() /*! \qmlproperty real MouseArea::mouseX \qmlproperty real MouseArea::mouseY - These properties hold the coordinates of the mouse. + These properties hold the coordinates of the mouse cursor. If the hoverEnabled property is false then these properties will only be valid while a button is pressed, and will remain valid as long as the button is held - even if the mouse is moved outside the area. + down even if the mouse is moved outside the area. + + By default, this property is false. If hoverEnabled is true then these properties will be valid when: \list @@ -360,6 +395,8 @@ qreal QDeclarativeMouseArea::mouseY() const /*! \qmlproperty bool MouseArea::enabled This property holds whether the item accepts mouse events. + + By default, this property is true. */ bool QDeclarativeMouseArea::isEnabled() const { @@ -387,7 +424,8 @@ void QDeclarativeMouseArea::setEnabled(bool a) \endlist The code below displays "right" when the right mouse buttons is pressed: - \snippet doc/src/snippets/declarative/mousearea.qml mousebuttons + + \snippet doc/src/snippets/declarative/mousearea/mousearea.qml mousebuttons \sa acceptedButtons */ @@ -704,7 +742,8 @@ QVariant QDeclarativeMouseArea::itemChange(GraphicsItemChange change, pressed. Hover enables handling of all mouse events even when no mouse button is pressed. - This property affects the containsMouse property and the onEntered, onExited and onPositionChanged signals. + This property affects the containsMouse property and the onEntered, onExited and + onPositionChanged signals. */ bool QDeclarativeMouseArea::hoverEnabled() const { @@ -847,7 +886,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag() The following example displays a \l Rectangle that can be dragged along the X-axis. The opacity of the rectangle is reduced when it is dragged to the right. - \snippet doc/src/snippets/declarative/mousearea.qml drag + \snippet doc/src/snippets/declarative/mousearea/mousearea.qml drag \note Items cannot be dragged if they are anchored for the requested \c drag.axis. For example, if \c anchors.left or \c anchors.right was set @@ -858,7 +897,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag() If \c drag.filterChildren is set to true, a drag can override descendant MouseAreas. This enables a parent MouseArea to handle drags, for example, while descendants handle clicks: - \snippet doc/src/snippets/declarative/mouseareadragfilter.qml dragfilter + \snippet doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml dragfilter */ -- cgit v0.12 From 8530763d5a3e516b79260b9d0a32fcf05c7cdaf0 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 16 Sep 2010 10:12:28 +1000 Subject: Fix test. --- tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index f61ecf5..0d10c10 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -1247,8 +1247,6 @@ void tst_qdeclarativestates::extendsBug() QCOMPARE(greenRect->y(), qreal(100)); } -extern void qmlExecuteDeferred(QObject *object); - void tst_qdeclarativestates::editProperties() { QDeclarativeEngine engine; -- cgit v0.12 From f6bfc5bcbed84a71b22fb04b56ae6eb294e4914d Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 16 Sep 2010 10:29:47 +1000 Subject: Models with a single role may not update due to "modelData" conflict. Models with a single role also have a modelData property added. These role names both ended up in a hash, resulting in only one or the other updating. Now we handle modelData specially. Task-number: QTBUG-13664 Reviewed-by: Michael Brasser --- .../graphicsitems/qdeclarativevisualitemmodel.cpp | 40 ++++++++--- .../data/singlerole1.qml | 11 +++ .../data/singlerole2.qml | 11 +++ .../tst_qdeclarativevisualdatamodel.cpp | 82 ++++++++++++++++++++++ 4 files changed, 134 insertions(+), 10 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole1.qml create mode 100644 tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole2.qml diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index a46ee73..a70886e 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -287,16 +287,12 @@ public: m_roles = m_listModelInterface->roles(); for (int ii = 0; ii < m_roles.count(); ++ii) m_roleNames.insert(m_listModelInterface->toString(m_roles.at(ii)).toUtf8(), m_roles.at(ii)); - if (m_roles.count() == 1) - m_roleNames.insert("modelData", m_roles.at(0)); } else if (m_abstractItemModel) { for (QHash::const_iterator it = m_abstractItemModel->roleNames().begin(); it != m_abstractItemModel->roleNames().end(); ++it) { m_roles.append(it.key()); m_roleNames.insert(*it, it.key()); } - if (m_roles.count() == 1) - m_roleNames.insert("modelData", m_roles.at(0)); if (m_roles.count()) m_roleNames.insert("hasModelChildren", -1); } else if (m_listAccessor) { @@ -314,7 +310,8 @@ public: } } - QHash roleToPropId; + QHash m_roleToPropId; + int m_modelDataPropId; void createMetaData() { if (!m_metaDataCreated) { ensureRoles(); @@ -322,9 +319,12 @@ public: QHash::const_iterator it = m_roleNames.begin(); while (it != m_roleNames.end()) { int propId = m_delegateDataType->createProperty(it.key()) - m_delegateDataType->propertyOffset(); - roleToPropId.insert(*it, propId); + m_roleToPropId.insert(*it, propId); ++it; } + // Add modelData property + if (m_roles.count() == 1) + m_modelDataPropId = m_delegateDataType->createProperty("modelData") - m_delegateDataType->propertyOffset(); m_metaDataCreated = true; } } @@ -430,6 +430,11 @@ public: void setIndex(int index); int propForRole(int) const; + int modelDataPropertyId() const { + QDeclarativeVisualDataModelPrivate *model = QDeclarativeVisualDataModelPrivate::get(m_model); + return model->m_modelDataPropId; + } + void setValue(int, const QVariant &); bool hasValue(int id) const { return m_meta->hasValue(id); @@ -450,8 +455,8 @@ private: int QDeclarativeVisualDataModelData::propForRole(int id) const { QDeclarativeVisualDataModelPrivate *model = QDeclarativeVisualDataModelPrivate::get(m_model); - QHash::const_iterator it = model->roleToPropId.find(id); - if (it != model->roleToPropId.end()) + QHash::const_iterator it = model->m_roleToPropId.find(id); + if (it != model->m_roleToPropId.end()) return *it; return -1; @@ -518,14 +523,16 @@ QVariant QDeclarativeVisualDataModelDataMetaObject::initialValue(int propId) } } else if (model->m_abstractItemModel) { model->ensureRoles(); + QModelIndex index = model->m_abstractItemModel->index(data->m_index, 0, model->m_root); if (propName == "hasModelChildren") { - QModelIndex index = model->m_abstractItemModel->index(data->m_index, 0, model->m_root); return model->m_abstractItemModel->hasChildren(index); } else { QHash::const_iterator it = model->m_roleNames.find(propName); if (it != model->m_roleNames.end()) { - QModelIndex index = model->m_abstractItemModel->index(data->m_index, 0, model->m_root); return model->m_abstractItemModel->data(index, *it); + } else if (model->m_roles.count() == 1 && propName == "modelData") { + //for compatibility with other lists, assign modelData if there is only a single role + return model->m_abstractItemModel->data(index, model->m_roles.first()); } } } @@ -1195,6 +1202,19 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count, qmlInfo(this) << "Changing role not present in item: " << roleName; } } + if (roles.count() == 1) { + // Handle the modelData role we add if there is just one role. + int propId = data->modelDataPropertyId(); + if (data->hasValue(propId)) { + int role = roles.at(0); + if (d->m_listModelInterface) { + data->setValue(propId, d->m_listModelInterface->data(idx, QList() << role).value(role)); + } else if (d->m_abstractItemModel) { + QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root); + data->setValue(propId, d->m_abstractItemModel->data(index, role)); + } + } + } } } } diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole1.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole1.qml new file mode 100644 index 0000000..7ea74f2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole1.qml @@ -0,0 +1,11 @@ +import Qt 4.7 + +ListView { + width: 100 + height: 100 + anchors.fill: parent + model: myModel + delegate: Component { + Text { objectName: "name"; text: name } + } +} diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole2.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole2.qml new file mode 100644 index 0000000..6654d6b --- /dev/null +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole2.qml @@ -0,0 +1,11 @@ +import Qt 4.7 + +ListView { + width: 100 + height: 100 + anchors.fill: parent + model: myModel + delegate: Component { + Text { objectName: "name"; text: modelData } + } +} diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp index 95ef4fc..d73a872 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp @@ -75,6 +75,39 @@ static void initStandardTreeModel(QStandardItemModel *model) model->insertRow(2, item); } +class SingleRoleModel : public QAbstractListModel +{ + Q_OBJECT + +public: + SingleRoleModel(QObject *parent = 0) { + QHash roles; + roles.insert(Qt::DisplayRole , "name"); + setRoleNames(roles); + list << "one" << "two" << "three" << "four"; + } + +public slots: + void set(int idx, QString string) { + list[idx] = string; + emit dataChanged(index(idx,0), index(idx,0)); + } + +protected: + int rowCount(const QModelIndex &parent = QModelIndex()) const { + return list.count(); + } + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const { + if (role == Qt::DisplayRole) + return list.at(index.row()); + return QVariant(); + } + +private: + QStringList list; +}; + + class tst_qdeclarativevisualdatamodel : public QObject { Q_OBJECT @@ -86,6 +119,7 @@ private slots: void updateLayout(); void childChanged(); void objectListModel(); + void singleRole(); private: QDeclarativeEngine engine; @@ -282,6 +316,54 @@ void tst_qdeclarativevisualdatamodel::objectListModel() QCOMPARE(name->text(), QString("Changed")); } +void tst_qdeclarativevisualdatamodel::singleRole() +{ + { + QDeclarativeView view; + + SingleRoleModel model; + + QDeclarativeContext *ctxt = view.rootContext(); + ctxt->setContextProperty("myModel", &model); + + view.setSource(QUrl::fromLocalFile(SRCDIR "/data/singlerole1.qml")); + + QDeclarativeListView *listview = qobject_cast(view.rootObject()); + QVERIFY(listview != 0); + + QDeclarativeItem *contentItem = listview->contentItem(); + QVERIFY(contentItem != 0); + + QDeclarativeText *name = findItem(contentItem, "name", 1); + QCOMPARE(name->text(), QString("two")); + + model.set(1, "Changed"); + QCOMPARE(name->text(), QString("Changed")); + } + { + QDeclarativeView view; + + SingleRoleModel model; + + QDeclarativeContext *ctxt = view.rootContext(); + ctxt->setContextProperty("myModel", &model); + + view.setSource(QUrl::fromLocalFile(SRCDIR "/data/singlerole2.qml")); + + QDeclarativeListView *listview = qobject_cast(view.rootObject()); + QVERIFY(listview != 0); + + QDeclarativeItem *contentItem = listview->contentItem(); + QVERIFY(contentItem != 0); + + QDeclarativeText *name = findItem(contentItem, "name", 1); + QCOMPARE(name->text(), QString("two")); + + model.set(1, "Changed"); + QCOMPARE(name->text(), QString("Changed")); + } +} + template T *tst_qdeclarativevisualdatamodel::findItem(QGraphicsObject *parent, const QString &objectName, int index) { -- cgit v0.12 From e40ea467df17d2cff1ca51c7b02a31962a5a1622 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 15 Sep 2010 19:31:26 -0500 Subject: Fixed Q_DECLARE_METATYPE for aix-xlc XLC needs to see the full declaration of these classes to use them in templates, where other compilers are satisfied with a forward declaration. Reviewed-by: Kevin Wu Won --- src/corelib/kernel/qmetatype.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 2108b92..e16ffe8 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -156,7 +156,18 @@ void qMetaTypeLoadHelper(QDataStream &stream, T *t) } #endif // QT_NO_DATASTREAM -template struct QMetaTypeId2; +template +struct QMetaTypeId +{ + enum { Defined = 0 }; +}; + +template +struct QMetaTypeId2 +{ + enum { Defined = QMetaTypeId::Defined }; + static inline int qt_metatype_id() { return QMetaTypeId::qt_metatype_id(); } +}; namespace QtPrivate { template ::Defined> @@ -210,19 +221,6 @@ void qRegisterMetaTypeStreamOperators(const char *typeName #endif // QT_NO_DATASTREAM template -struct QMetaTypeId -{ - enum { Defined = 0 }; -}; - -template -struct QMetaTypeId2 -{ - enum { Defined = QMetaTypeId::Defined }; - static inline int qt_metatype_id() { return QMetaTypeId::qt_metatype_id(); } -}; - -template inline int qMetaTypeId( #ifndef qdoc T * /* dummy */ = 0 -- cgit v0.12 From 0537750396ea519bbdf2b0fed086d535fc8c53b7 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 16 Sep 2010 12:29:28 +1000 Subject: Compile fix for static build using mingw. Fix follows the pattern of commit bbf78c9b422c4c7eda7e7fce067578c75d3bc9b3. Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativevaluetype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp index 98e9a58..fda62ee 100644 --- a/src/declarative/qml/qdeclarativevaluetype.cpp +++ b/src/declarative/qml/qdeclarativevaluetype.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE -Q_DECL_IMPORT extern int qt_defaultDpi(); +Q_GUI_EXPORT int qt_defaultDpi(); template int qmlRegisterValueTypeEnums(const char *qmlName) -- cgit v0.12 From cddb605d7569840ff4c7f911b63f1dae6a19615c Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Thu, 16 Sep 2010 12:40:11 +1000 Subject: Remove libconninet in preperation to updating it to version 0.45. --- src/3rdparty/libconninet/AUTHORS | 0 src/3rdparty/libconninet/COPYING | 510 ------ src/3rdparty/libconninet/ChangeLog | 0 src/3rdparty/libconninet/INSTALL | 229 --- src/3rdparty/libconninet/NEWS | 0 src/3rdparty/libconninet/README | 0 src/3rdparty/libconninet/autogen.sh | 3 - src/3rdparty/libconninet/config.guess | 1533 ------------------ src/3rdparty/libconninet/config.sub | 1693 -------------------- src/3rdparty/libconninet/configure.ac | 90 -- src/3rdparty/libconninet/conninet.pc.in | 11 - src/3rdparty/libconninet/debian/changelog | 293 ---- src/3rdparty/libconninet/debian/compat | 1 - src/3rdparty/libconninet/debian/control | 39 - src/3rdparty/libconninet/debian/copyright | 19 - .../libconninet/debian/libconninet0-dev.dirs | 2 - .../libconninet/debian/libconninet0-dev.files | 4 - src/3rdparty/libconninet/debian/libconninet0.dirs | 1 - src/3rdparty/libconninet/debian/libconninet0.files | 1 - src/3rdparty/libconninet/debian/rules | 123 -- src/3rdparty/libconninet/doxygen.cfg.in | 1147 ------------- src/3rdparty/libconninet/src/dbusdispatcher.cpp | 611 ------- src/3rdparty/libconninet/src/dbusdispatcher.h | 91 -- src/3rdparty/libconninet/src/iapconf.cpp | 299 ---- src/3rdparty/libconninet/src/iapconf.h | 84 - src/3rdparty/libconninet/src/iapmonitor.cpp | 110 -- src/3rdparty/libconninet/src/iapmonitor.h | 48 - src/3rdparty/libconninet/src/maemo_icd.cpp | 1316 --------------- src/3rdparty/libconninet/src/maemo_icd.h | 182 --- src/3rdparty/libconninet/src/proxyconf.cpp | 315 ---- src/3rdparty/libconninet/src/proxyconf.h | 53 - .../libconninet/tests/ut_dbusdispatcher.cpp | 191 --- src/3rdparty/libconninet/tests/ut_iapconf.cpp | 186 --- src/3rdparty/libconninet/tests/ut_iapmonitor.cpp | 118 -- src/3rdparty/libconninet/tests/ut_maemo_icd.cpp | 274 ---- src/3rdparty/libconninet/tests/ut_proxyconf.cpp | 400 ----- 36 files changed, 9977 deletions(-) delete mode 100644 src/3rdparty/libconninet/AUTHORS delete mode 100644 src/3rdparty/libconninet/COPYING delete mode 100644 src/3rdparty/libconninet/ChangeLog delete mode 100644 src/3rdparty/libconninet/INSTALL delete mode 100644 src/3rdparty/libconninet/NEWS delete mode 100644 src/3rdparty/libconninet/README delete mode 100755 src/3rdparty/libconninet/autogen.sh delete mode 100755 src/3rdparty/libconninet/config.guess delete mode 100755 src/3rdparty/libconninet/config.sub delete mode 100644 src/3rdparty/libconninet/configure.ac delete mode 100644 src/3rdparty/libconninet/conninet.pc.in delete mode 100644 src/3rdparty/libconninet/debian/changelog delete mode 100644 src/3rdparty/libconninet/debian/compat delete mode 100644 src/3rdparty/libconninet/debian/control delete mode 100644 src/3rdparty/libconninet/debian/copyright delete mode 100644 src/3rdparty/libconninet/debian/libconninet0-dev.dirs delete mode 100644 src/3rdparty/libconninet/debian/libconninet0-dev.files delete mode 100644 src/3rdparty/libconninet/debian/libconninet0.dirs delete mode 100644 src/3rdparty/libconninet/debian/libconninet0.files delete mode 100755 src/3rdparty/libconninet/debian/rules delete mode 100644 src/3rdparty/libconninet/doxygen.cfg.in delete mode 100644 src/3rdparty/libconninet/src/dbusdispatcher.cpp delete mode 100644 src/3rdparty/libconninet/src/dbusdispatcher.h delete mode 100644 src/3rdparty/libconninet/src/iapconf.cpp delete mode 100644 src/3rdparty/libconninet/src/iapconf.h delete mode 100644 src/3rdparty/libconninet/src/iapmonitor.cpp delete mode 100644 src/3rdparty/libconninet/src/iapmonitor.h delete mode 100644 src/3rdparty/libconninet/src/maemo_icd.cpp delete mode 100644 src/3rdparty/libconninet/src/maemo_icd.h delete mode 100644 src/3rdparty/libconninet/src/proxyconf.cpp delete mode 100644 src/3rdparty/libconninet/src/proxyconf.h delete mode 100644 src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp delete mode 100644 src/3rdparty/libconninet/tests/ut_iapconf.cpp delete mode 100644 src/3rdparty/libconninet/tests/ut_iapmonitor.cpp delete mode 100644 src/3rdparty/libconninet/tests/ut_maemo_icd.cpp delete mode 100644 src/3rdparty/libconninet/tests/ut_proxyconf.cpp diff --git a/src/3rdparty/libconninet/AUTHORS b/src/3rdparty/libconninet/AUTHORS deleted file mode 100644 index e69de29..0000000 diff --git a/src/3rdparty/libconninet/COPYING b/src/3rdparty/libconninet/COPYING deleted file mode 100644 index b124cf5..0000000 --- a/src/3rdparty/libconninet/COPYING +++ /dev/null @@ -1,510 +0,0 @@ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes a de-facto standard. To achieve this, non-free programs must -be allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control -compilation and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at least - three years, to give the same user the materials specified in - Subsection 6a, above, for a charge no more than the cost of - performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply, and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License -may add an explicit geographical distribution limitation excluding those -countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms -of the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should -have at least the "copyright" line and a pointer to where the full -notice is found. - - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or -your school, if any, to sign a "copyright disclaimer" for the library, -if necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James - Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/src/3rdparty/libconninet/ChangeLog b/src/3rdparty/libconninet/ChangeLog deleted file mode 100644 index e69de29..0000000 diff --git a/src/3rdparty/libconninet/INSTALL b/src/3rdparty/libconninet/INSTALL deleted file mode 100644 index 54caf7c..0000000 --- a/src/3rdparty/libconninet/INSTALL +++ /dev/null @@ -1,229 +0,0 @@ -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software -Foundation, Inc. - - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -will cause the specified gcc to be used as the C compiler (unless it is -overridden in the site shell script). - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/src/3rdparty/libconninet/NEWS b/src/3rdparty/libconninet/NEWS deleted file mode 100644 index e69de29..0000000 diff --git a/src/3rdparty/libconninet/README b/src/3rdparty/libconninet/README deleted file mode 100644 index e69de29..0000000 diff --git a/src/3rdparty/libconninet/autogen.sh b/src/3rdparty/libconninet/autogen.sh deleted file mode 100755 index a8fd885..0000000 --- a/src/3rdparty/libconninet/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -autoreconf --verbose --install --force diff --git a/src/3rdparty/libconninet/config.guess b/src/3rdparty/libconninet/config.guess deleted file mode 100755 index e3a2116..0000000 --- a/src/3rdparty/libconninet/config.guess +++ /dev/null @@ -1,1533 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-06-10' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd | genuineintel) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/src/3rdparty/libconninet/config.sub b/src/3rdparty/libconninet/config.sub deleted file mode 100755 index eb0389a..0000000 --- a/src/3rdparty/libconninet/config.sub +++ /dev/null @@ -1,1693 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-06-11' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/src/3rdparty/libconninet/configure.ac b/src/3rdparty/libconninet/configure.ac deleted file mode 100644 index 2a383ee..0000000 --- a/src/3rdparty/libconninet/configure.ac +++ /dev/null @@ -1,90 +0,0 @@ -AC_INIT([libconninet], patsubst(esyscmd([dpkg-parsechangelog | sed -n '/^Version: \(.*\)$/ {s//\1/;p}']), [ -]), [jukka.rissanen@nokia.com]) -AM_INIT_AUTOMAKE([foreign]) - -AC_PROG_CXX -AC_PROG_LIBTOOL - -AC_ARG_ENABLE(docs, [ --enable-docs Build DOXYGEN documentation (requires Doxygen)],enable_docs=$enableval,enable_docs=auto) - -AC_PATH_PROG(DOXYGEN, doxygen, no) -AC_MSG_CHECKING([whether to build Doxygen documentation]) - -if test x$DOXYGEN = xno ; then - have_doxygen=no -else - have_doxygen=yes -fi -if test x$enable_docs = xauto ; then - if test x$have_doxygen = xno ; then - enable_docs=no - else - enable_docs=yes - fi -fi -if test x$enable_docs = xyes; then - if test x$have_doxygen = xno; then - AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found]) - else - AC_MSG_RESULT(yes) - fi -else - AC_MSG_RESULT(no) -fi - -AM_CONDITIONAL(DOXYGEN_DOCS_ENABLED, test x$enable_docs = xyes) -AC_SUBST(DOXYGEN) - -PKG_CHECK_MODULES(GLIB, glib-2.0) -AC_SUBST(GLIB_CFLAGS) -AC_SUBST(GLIB_LIBS) - -PKG_CHECK_MODULES(QTCORE, QtCore) -AC_SUBST(QTCORE_CFLAGS) -AC_SUBST(QTCORE_LIBS) - -PKG_CHECK_MODULES(QTNETWORK, QtNetwork) -AC_SUBST(QTNETWORK_CFLAGS) -AC_SUBST(QTNETWORK_LIBS) - -PKG_CHECK_MODULES(QTDBUS, QtDBus) -AC_SUBST(QTDBUS_CFLAGS) -AC_SUBST(QTDBUS_LIBS) - -PKG_CHECK_MODULES(QTTEST, QtTest) -AC_SUBST(QTTEST_CFLAGS) -AC_SUBST(QTTEST_LIBS) - -PKG_CHECK_MODULES(DBUS, dbus-glib-1) -AC_SUBST(DBUS_CFLAGS) -AC_SUBST(DBUS_LIBS) - -PKG_CHECK_MODULES(CONNSETTINGS, connsettings) -AC_SUBST(CONNSETTINGS_CFLAGS) -AC_SUBST(CONNSETTINGS_LIBS) - -PKG_CHECK_MODULES(OSSO_IC, osso-ic) -AC_SUBST(OSSO_IC_CFLAGS) -AC_SUBST(OSSO_IC_LIBS) - -PKG_CHECK_MODULES(ICD_DEV, icd2) -AC_SUBST(ICD_DEV_CFLAGS) -AC_SUBST(ICD_DEV_LIBS) - -PKG_CHECK_MODULES(GCONF, gconf-2.0) -AC_SUBST(GCONF_CFLAGS) -AC_SUBST(GCONF_LIBS) - -PKG_CHECK_MODULES(QGCONF, gq-gconf) -AC_SUBST(QGCONF_CFLAGS) -AC_SUBST(QGCONF_LIBS) - -CONCFLAGS="-Wall -Werror -Wmissing-prototypes" -AC_SUBST(CONCFLAGS) - -AC_CONFIG_FILES([Makefile \ - src/Makefile \ - tests/Makefile \ - conninet.pc \ - doxygen.cfg]) -AC_OUTPUT diff --git a/src/3rdparty/libconninet/conninet.pc.in b/src/3rdparty/libconninet/conninet.pc.in deleted file mode 100644 index 68cdee0..0000000 --- a/src/3rdparty/libconninet/conninet.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libconninet -Description: Internet Connectivity support library -Version: @VERSION@ -Requires: dbus-1 >= 0.60 glib-2.0 QtCore QtDBus QtGui -Libs: -lconninet -Cflags: -I${includedir}/conninet diff --git a/src/3rdparty/libconninet/debian/changelog b/src/3rdparty/libconninet/debian/changelog deleted file mode 100644 index 4063317..0000000 --- a/src/3rdparty/libconninet/debian/changelog +++ /dev/null @@ -1,293 +0,0 @@ -libconninet (0.42+0m6) unstable; urgency=low - - * This entry has been added by BIFH queue processor - version has been changed to 0.42+0m6 - - -- Qing Jin Thu, 22 Jul 2010 14:04:58 +0300 - -libconninet (0.42) unstable; urgency=low - - * Fixes: NB#180536 - Uploads to online services are not working. - This is a regression caused by fix to bug 175098, the timeout was never - expiring when waiting reply from icd. - - -- Jukka Rissanen Mon, 19 Jul 2010 12:23:30 +0300 - -libconninet (0.41) unstable; urgency=low - - * Fixes: NB#175098 - Qt4.7 Webkit crashes when bearer API QNetworkSession - constructor calls QNetworkSession::syncStateWithInterface() which in turn - calls Maemo::state() and Maemo::addrinfo() and webkit expects that event - loop is not run but those function process main loop events. - Now Maemo::state() and Maemo::addrinfo() are changed to be synchronous - and fully blocking functions. The old non-blocking versions are called - Maemo::state_non_blocking() and Maemo::addrinfo_non_blocking(). - - -- Jukka Rissanen Wed, 14 Jul 2010 10:12:47 +0300 - -libconninet (0.40) unstable; urgency=low - - * Fixes: NB#167465 - Unable to open network connection using libbearer - - -- Jukka Rissanen Tue, 11 May 2010 10:47:10 +0300 - -libconninet (0.39) unstable; urgency=low - - * Fixes: NB#167982 - initialize DBus vtable in DBusDispatcher. - - -- Aapo Makela Mon, 10 May 2010 14:42:39 +0300 - -libconninet (0.38) unstable; urgency=low - - * Changing icd2 connect_req to be synchronous as the check for - returned connect signal did not work correctly, this caused a - long timeout when connect() was called. - * Scan sometimes missed results and did not return them to caller. - * HTTP proxy settings were not set correctly. - - -- Jukka Rissanen Thu, 15 Apr 2010 11:25:06 +0300 - -libconninet (0.37) unstable; urgency=low - - * Make proxy config reference counting atomic. - - -- Jukka Rissanen Wed, 3 Mar 2010 13:23:08 +0200 - -libconninet (0.36) unstable; urgency=low - - * Fixes: NB#157586 - Cleanup dbus listener when WLAN scanning object is - deleted. - - -- Jukka Rissanen Fri, 26 Feb 2010 13:30:41 +0200 - -libconninet (0.35) unstable; urgency=low - - * Fixes: NB#156883 - libconninet fails to build under the Platform SDK (SB2) - - -- Jukka Rissanen Thu, 18 Feb 2010 12:14:40 +0200 - -libconninet (0.34) unstable; urgency=low - - * Coverity fix - - -- Jukka Rissanen Tue, 16 Feb 2010 16:38:00 +0200 - -libconninet (0.33) unstable; urgency=low - - * Added API to update Qt proxy config. - - -- Jukka Rissanen Tue, 26 Jan 2010 15:48:36 +0200 - -libconninet (0.32) unstable; urgency=low - - * Fixed IAPConf to unset value when set value is invalid. - * Updated IAPMonitor to use libconnsettings. - - -- Aapo Makela Wed, 03 Feb 2010 07:32:45 +0200 - -libconninet (0.31) unstable; urgency=low - - * Fixes: NB#154892 - Check nulls in IAPConf. - - -- Aapo Makela Mon, 01 Feb 2010 09:32:06 +0200 - -libconninet (0.30) unstable; urgency=low - - * Updated IAPConf to use libconnsettings. - - -- Aapo Makela Fri, 29 Jan 2010 12:58:03 +0200 - -libconninet (0.29) unstable; urgency=low - - * Fixed dependencies - - -- Jukka Rissanen Fri, 15 Jan 2010 10:16:07 +0200 - -libconninet (0.28) unstable; urgency=low - - * Get rid of libdui dependency - - -- Jukka Rissanen Wed, 13 Jan 2010 09:56:26 +0200 - -libconninet (0.27) unstable; urgency=low - - * Insert new pending calls to the list in DBusDispatcher. - - -- Aapo Makela Tue, 22 Dec 2009 14:27:32 +0200 - -libconninet (0.26) unstable; urgency=low - - * Added possibility to specify different signal path for DBusDispatcher. - - -- Aapo Makela Wed, 25 Nov 2009 14:27:34 +0200 - -libconninet (0.25) unstable; urgency=low - - * Fixes: NB#146450 - All scan results were not returned to the caller. - - -- Jukka Rissanen Mon, 16 Nov 2009 17:23:15 +0200 - -libconninet (0.24) unstable; urgency=low - - * Wait all scan results for all network types in Maemo::Icd::scan() - - -- Jukka Rissanen Fri, 6 Nov 2009 14:45:23 +0200 - -libconninet (0.23) unstable; urgency=low - - * Fixes: NB#143361 - Assert failure in session class for GPRS IAP. - - -- Jukka Rissanen Mon, 19 Oct 2009 16:00:14 +0300 - -libconninet (0.22) unstable; urgency=low - - * Fixed the error checking if scan returns 0 results. - - -- Jukka Rissanen Wed, 7 Oct 2009 13:50:27 +0300 - -libconninet (0.21) unstable; urgency=low - - * Support multiple DBusDispatcher classes at the same time. This is - required by Maemo::Icd class so that multiple instances of it can - be used the same time. - - -- Jukka Rissanen Mon, 5 Oct 2009 16:33:43 +0300 - -libconninet (0.20) unstable; urgency=low - - * Fixed memory leak in IAPConf::setValue() - - -- Jukka Rissanen Fri, 2 Oct 2009 13:02:21 +0300 - -libconninet (0.19) unstable; urgency=low - - * Fixed connect_req to one specific IAP in Icd class. - - -- Jukka Rissanen Tue, 29 Sep 2009 17:02:46 +0300 - -libconninet (0.18) unstable; urgency=low - - * Make sure the library will not abort in Icd class if scan does - not return any results. - - -- Jukka Rissanen Tue, 22 Sep 2009 17:00:12 +0300 - -libconninet (0.17) unstable; urgency=low - - * Added IAP monitoring support. - - -- Jukka Rissanen Mon, 21 Sep 2009 16:29:31 +0300 - -libconninet (0.16) unstable; urgency=low - - * Disabled the old osso-ic dbus interface as it is currently not used. - * Fixed the addrinfo request, now addresses are returned correctly to - the caller. - - -- Jukka Rissanen Thu, 17 Sep 2009 15:56:13 +0300 - -libconninet (0.15) unstable; urgency=low - - * Enabling state_req, statistics_req and addrinfo_req support - functions in Maemo::Icd as the corresponding DBUS API functions are - fixed in icd2 v0.89 - - -- Jukka Rissanen Fri, 24 Jul 2009 15:23:02 +0300 - -libconninet (0.14) unstable; urgency=low - - * Icd statistics support added. - * Icd address information support added. - * Icd scan method does not return the final (and empty) result any more. - * Added initial unit test implementation for Icd class. - * Some of the status functions in Icd class disabled because of issues - in icd2 and the dbus api. - - -- Jukka Rissanen Thu, 23 Jul 2009 11:03:05 +0300 - -libconninet (0.13) unstable; urgency=low - - * Added API to get all the configured IAPs. - - -- Jukka Rissanen Tue, 21 Jul 2009 09:47:18 +0300 - -libconninet (0.12) unstable; urgency=low - - * Replaced duivaluespace by Dui in pkg-config file because the - duivaluespace is deprecated. - - -- Jukka Rissanen Mon, 20 Jul 2009 16:00:10 +0300 - -libconninet (0.11) unstable; urgency=low - - * Using libdui instead of libduivaluespace because it is deprecated. - * The IAPConf::clear() uses native gconf API instead of launching gconftool - * Check that state_req call returned list and the list contains entries - before trying to access it. - - -- Jukka Rissanen Mon, 20 Jul 2009 14:55:15 +0300 - -libconninet (0.10) unstable; urgency=low - - * connect() did not return ok when connection succeeded. - - -- Jukka Rissanen Thu, 25 Jun 2009 09:31:21 +0300 - -libconninet (0.9) unstable; urgency=low - - * Connection timeout set to 2.5min, same as in fremantle. - - -- Jukka Rissanen Wed, 17 Jun 2009 13:36:40 +0300 - -libconninet (0.8) unstable; urgency=low - - * Fix state_req signal received from Icd - - -- Jukka Rissanen Thu, 11 Jun 2009 17:19:33 +0300 - -libconninet (0.7) unstable; urgency=low - - * Icd disconnect and select reqs are made synchronous as we do not - wait the return status. The previous async version was causing core - dumps if Icd class was destroyed too early. - - -- Jukka Rissanen Thu, 11 Jun 2009 11:52:36 +0300 - -libconninet (0.6) unstable; urgency=low - - * Fixed the libconninet0-dev dependencies. - - -- Jukka Rissanen Mon, 8 Jun 2009 10:47:56 +0300 - -libconninet (0.5) unstable; urgency=low - - * Fixed missing QObject connect functions. - * Fixed IAPConf to return invalid QVariant if the value does not exist. - - -- Jukka Rissanen Mon, 01 Jun 2009 13:58:53 +0300 - -libconninet (0.4) unstable; urgency=low - - * Fixed QObject signal setting for Maemo::Icd - - -- Jukka Rissanen Wed, 20 May 2009 13:51:11 +0300 - -libconninet (0.3) unstable; urgency=low - - * Refactoring classes - * Added IAPConf class. - - -- Jukka Rissanen Thu, 14 May 2009 13:24:11 +0300 - -libconninet (0.2) unstable; urgency=low - - * Fixed pkgconfig file which had wrong dependency - * Added DBus array and struct support to DBusDispatcher. - - -- Jukka Rissanen Wed, 13 May 2009 12:11:00 +0300 - -libconninet (0.1) unstable; urgency=low - - * Initial Release. - - -- Jukka Rissanen Tue, 12 May 2009 16:10:27 +0200 diff --git a/src/3rdparty/libconninet/debian/compat b/src/3rdparty/libconninet/debian/compat deleted file mode 100644 index b8626c4..0000000 --- a/src/3rdparty/libconninet/debian/compat +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/src/3rdparty/libconninet/debian/control b/src/3rdparty/libconninet/debian/control deleted file mode 100644 index 2db660f..0000000 --- a/src/3rdparty/libconninet/debian/control +++ /dev/null @@ -1,39 +0,0 @@ -Source: libconninet -Priority: optional -Maintainer: Jukka Rissanen -Build-Depends: debhelper (>= 4.0.0), autotools-dev, libglib2.0-dev (>= 2.8), - libdbus-1-dev (>= 0.60), libconnsettings0-dev (>= 0.4), icd2-osso-ic-dev, - icd2-dev, libqt4-dev, libgconf2-dev (>> 2.6.4), libgq-gconf-dev -Standards-Version: 3.6.2 -Section: libs - -Package: libconninet0-dev -Section: libdevel -Architecture: any -Depends: libconninet0 (= ${Source-Version}), libdbus-1-dev (>= 0.60), - libglib2.0-dev (>= 2.8), libconnsettings0-dev (>= 0.4), libqt4-dev, - icd2-osso-ic-dev, icd2-dev, libgconf2-dev (>> 2.6.4), libgq-gconf-dev -Description: Internet Connectivity support library development files - Internet Connectivity support library (libconninet) provides common - support functions for connecting to icd2 and accessing configuration - data. - . - This package contains the header files. - -Package: libconninet0 -Section: libs -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Internet Connectivity support library - Internet Connectivity support library (libconninet) provides common - support functions for connecting to icd2 and accessing configuration - data. - . - This package contains the shared libraries. - -Package: libconninet0-dbg -Section: libs -Architecture: any -Depends: libconninet0 (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends} -Description: Debug symbols for the Internet Connectivity support library - Internet Connectivity support library (libconninet) debug symbols. diff --git a/src/3rdparty/libconninet/debian/copyright b/src/3rdparty/libconninet/debian/copyright deleted file mode 100644 index 97e8e68..0000000 --- a/src/3rdparty/libconninet/debian/copyright +++ /dev/null @@ -1,19 +0,0 @@ -libconninet - Internet Connectivity support library - -Copyright (C) 2009 Nokia Corporation. All rights reserved. - -Contact: Jukka Rissanen - -This library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License version 2.1 -as published by the Free Software Foundation. - -This library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -02110-1301 USA diff --git a/src/3rdparty/libconninet/debian/libconninet0-dev.dirs b/src/3rdparty/libconninet/debian/libconninet0-dev.dirs deleted file mode 100644 index 4418816..0000000 --- a/src/3rdparty/libconninet/debian/libconninet0-dev.dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib -usr/include diff --git a/src/3rdparty/libconninet/debian/libconninet0-dev.files b/src/3rdparty/libconninet/debian/libconninet0-dev.files deleted file mode 100644 index 78bbac8..0000000 --- a/src/3rdparty/libconninet/debian/libconninet0-dev.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/include/* -usr/lib/lib*.so -usr/lib/pkgconfig/* -usr/share/pkgconfig/* diff --git a/src/3rdparty/libconninet/debian/libconninet0.dirs b/src/3rdparty/libconninet/debian/libconninet0.dirs deleted file mode 100644 index 6845771..0000000 --- a/src/3rdparty/libconninet/debian/libconninet0.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/lib diff --git a/src/3rdparty/libconninet/debian/libconninet0.files b/src/3rdparty/libconninet/debian/libconninet0.files deleted file mode 100644 index d0dbfd1..0000000 --- a/src/3rdparty/libconninet/debian/libconninet0.files +++ /dev/null @@ -1 +0,0 @@ -usr/lib/lib*.so.* diff --git a/src/3rdparty/libconninet/debian/rules b/src/3rdparty/libconninet/debian/rules deleted file mode 100755 index 2a3d395..0000000 --- a/src/3rdparty/libconninet/debian/rules +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - - -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -# shared library versions, option 1 -#version=2.0.5 -#major=2 -# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so -version=`ls src/.libs/lib*.so.* | \ - awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` -major=`ls src/.libs/lib*.so.* | \ - awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` - -configure: configure.ac debian/changelog - -./autogen.sh - -config.status: configure - dh_testdir - # Add here commands to configure the package. - CFLAGS="$(CFLAGS)" ./configure \ - --host=$(DEB_HOST_GNU_TYPE) \ - --build=$(DEB_BUILD_GNU_TYPE) \ - --prefix=/usr \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info - - -build: build-stamp -build-stamp: config.status - dh_testdir - - # Add here commands to compile the package. - $(MAKE) - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - # Add here commands to clean up after the build process. - -$(MAKE) distclean -ifneq "$(wildcard /usr/share/misc/config.sub)" "" - cp -f /usr/share/misc/config.sub config.sub -endif -ifneq "$(wildcard /usr/share/misc/config.guess)" "" - cp -f /usr/share/misc/config.guess config.guess -endif - - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/tmp - $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_movefiles - dh_installchangelogs ChangeLog - dh_installdocs - dh_installexamples -# dh_install -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman - dh_link - dh_strip --dbg-package=libconninet0 - dh_compress - dh_fixperms -# dh_perl -# dh_python - dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/src/3rdparty/libconninet/doxygen.cfg.in b/src/3rdparty/libconninet/doxygen.cfg.in deleted file mode 100644 index 80a4c8d..0000000 --- a/src/3rdparty/libconninet/doxygen.cfg.in +++ /dev/null @@ -1,1147 +0,0 @@ -# Doxyfile 1.3.7 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = "Internet Connectivity Support Library" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = @VERSION@ - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 2 levels of 10 sub-directories under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of source -# files, where putting all generated files in the same directory would otherwise -# cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = YES - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = conic/conic.h \ - conic/conicconnection.h \ - conic/conicconnectionevent.h \ - conic/conicevent.h \ - conic/coniciap.h \ - conic/conicstatisticsevent.h - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/src/3rdparty/libconninet/src/dbusdispatcher.cpp b/src/3rdparty/libconninet/src/dbusdispatcher.cpp deleted file mode 100644 index 7581982..0000000 --- a/src/3rdparty/libconninet/src/dbusdispatcher.cpp +++ /dev/null @@ -1,611 +0,0 @@ -/* * This file is part of conninet * - * - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * - * Contact: Aapo Makela - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 2.1 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ - -#include -#include -#include -#include -#include -#include -#include "dbusdispatcher.h" - -namespace Maemo { - -/*! - \class DBusDispatcher - - \brief DBusDispatcher is a class, which is able to send DBUS method call - messages and receive unicast signals from DBUS object. -*/ - -class DBusDispatcherPrivate -{ -public: - DBusDispatcherPrivate(const QString& service, - const QString& path, - const QString& interface, - const QString& signalPath) - : service(service), path(path), interface(interface), - signalPath(signalPath), connection(0) - { - memset(&signal_vtable, 0, sizeof(signal_vtable)); - } - - ~DBusDispatcherPrivate() - { - foreach(DBusPendingCall *call, pending_calls) { - dbus_pending_call_cancel(call); - dbus_pending_call_unref(call); - } - } - - QString service; - QString path; - QString interface; - QString signalPath; - struct DBusConnection *connection; - QList pending_calls; - struct DBusObjectPathVTable signal_vtable; -}; - -static bool constantVariantList(const QVariantList& variantList) { - // Special case, empty list == empty struct - if (variantList.isEmpty()) { - return false; - } else { - QVariant::Type type = variantList[0].type(); - // Iterate items in the list and check if they are same type - foreach(QVariant variant, variantList) { - if (variant.type() != type) { - return false; - } - } - } - return true; -} - -static QString variantToSignature(const QVariant& argument, - bool constantList = true) { - switch (argument.type()) { - case QVariant::Bool: - return "b"; - case QVariant::ByteArray: - return "ay"; - case QVariant::Char: - return "y"; - case QVariant::Int: - return "i"; - case QVariant::UInt: - return "u"; - case QVariant::StringList: - return "as"; - case QVariant::String: - return "s"; - case QVariant::LongLong: - return "x"; - case QVariant::ULongLong: - return "t"; - case QVariant::List: - { - QString signature; - QVariantList variantList = argument.toList(); - if (!constantList) { - signature += DBUS_STRUCT_BEGIN_CHAR_AS_STRING; - foreach(QVariant listItem, variantList) { - signature += variantToSignature(listItem); - } - signature += DBUS_STRUCT_END_CHAR_AS_STRING; - } else { - if (variantList.isEmpty()) - return ""; - signature = "a" + variantToSignature(variantList[0]); - } - - return signature; - } - default: - qDebug() << "Unsupported variant type: " << argument.type(); - break; - } - - return ""; -} - -static bool appendVariantToDBusMessage(const QVariant& argument, - DBusMessageIter *dbus_iter) { - int idx = 0; - DBusMessageIter array_iter; - QStringList str_list; - dbus_bool_t bool_data; - dbus_int32_t int32_data; - dbus_uint32_t uint32_data; - dbus_int64_t int64_data; - dbus_uint64_t uint64_data; - char *str_data; - char char_data; - - switch (argument.type()) { - - case QVariant::Bool: - bool_data = argument.toBool(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BOOLEAN, - &bool_data); - break; - - case QVariant::ByteArray: - str_data = argument.toByteArray().data(); - dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, - DBUS_TYPE_BYTE_AS_STRING, &array_iter); - dbus_message_iter_append_fixed_array(&array_iter, - DBUS_TYPE_BYTE, - &str_data, - argument.toByteArray().size()); - dbus_message_iter_close_container(dbus_iter, &array_iter); - break; - - case QVariant::Char: - char_data = argument.toChar().toAscii(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BYTE, - &char_data); - break; - - case QVariant::Int: - int32_data = argument.toInt(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT32, - &int32_data); - break; - - case QVariant::String: - str_data = argument.toString().toLatin1().data(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING, - &str_data); - break; - - case QVariant::StringList: - str_list = argument.toStringList(); - dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, - "s", &array_iter); - for (idx = 0; idx < str_list.size(); idx++) { - str_data = str_list.at(idx).toLatin1().data(); - dbus_message_iter_append_basic(&array_iter, - DBUS_TYPE_STRING, - &str_data); - } - dbus_message_iter_close_container(dbus_iter, &array_iter); - break; - - case QVariant::UInt: - uint32_data = argument.toUInt(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT32, - &uint32_data); - break; - - case QVariant::ULongLong: - uint64_data = argument.toULongLong(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT64, - &uint64_data); - break; - - case QVariant::LongLong: - int64_data = argument.toLongLong(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT64, - &int64_data); - break; - - case QVariant::List: - { - QVariantList variantList = argument.toList(); - bool constantList = constantVariantList(variantList); - DBusMessageIter array_iter; - - // List is mapped either as an DBUS array (all items same type) - // DBUS struct (variable types) depending on constantList - if (constantList) { - // Resolve the signature for the first item - QString signature = ""; - if (!variantList.isEmpty()) { - signature = variantToSignature( - variantList[0], - constantVariantList(variantList[0].toList())); - } - - // Mapped as DBUS array - dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, - signature.toAscii(), - &array_iter); - - foreach(QVariant listItem, variantList) { - appendVariantToDBusMessage(listItem, &array_iter); - } - - dbus_message_iter_close_container(dbus_iter, &array_iter); - } else { - // Mapped as DBUS struct - dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_STRUCT, - NULL, - &array_iter); - - foreach(QVariant listItem, variantList) { - appendVariantToDBusMessage(listItem, &array_iter); - } - - dbus_message_iter_close_container(dbus_iter, &array_iter); - } - - break; - } - default: - qDebug() << "Unsupported variant type: " << argument.type(); - break; - } - - return true; -} - -static QVariant getVariantFromDBusMessage(DBusMessageIter *iter) { - dbus_bool_t bool_data; - dbus_int32_t int32_data; - dbus_uint32_t uint32_data; - dbus_int64_t int64_data; - dbus_uint64_t uint64_data; - char *str_data; - char char_data; - int argtype = dbus_message_iter_get_arg_type(iter); - - switch (argtype) { - - case DBUS_TYPE_BOOLEAN: - { - dbus_message_iter_get_basic(iter, &bool_data); - QVariant variant((bool)bool_data); - return variant; - } - - case DBUS_TYPE_ARRAY: - { - // Handle all arrays here - int elem_type = dbus_message_iter_get_element_type(iter); - DBusMessageIter array_iter; - - dbus_message_iter_recurse(iter, &array_iter); - - if (elem_type == DBUS_TYPE_BYTE) { - QByteArray byte_array; - do { - dbus_message_iter_get_basic(&array_iter, &char_data); - byte_array.append(char_data); - } while (dbus_message_iter_next(&array_iter)); - QVariant variant(byte_array); - return variant; - } else if (elem_type == DBUS_TYPE_STRING) { - QStringList str_list; - do { - dbus_message_iter_get_basic(&array_iter, &str_data); - str_list.append(str_data); - } while (dbus_message_iter_next(&array_iter)); - QVariant variant(str_list); - return variant; - } else { - QVariantList variantList; - do { - variantList << getVariantFromDBusMessage(&array_iter); - } while (dbus_message_iter_next(&array_iter)); - QVariant variant(variantList); - return variant; - } - break; - } - - case DBUS_TYPE_BYTE: - { - dbus_message_iter_get_basic(iter, &char_data); - QChar ch(char_data); - QVariant variant(ch); - return variant; - } - - case DBUS_TYPE_INT32: - { - dbus_message_iter_get_basic(iter, &int32_data); - QVariant variant((int)int32_data); - return variant; - } - - case DBUS_TYPE_UINT32: - { - dbus_message_iter_get_basic(iter, &uint32_data); - QVariant variant((uint)uint32_data); - return variant; - } - - case DBUS_TYPE_STRING: - { - dbus_message_iter_get_basic(iter, &str_data); - QString str(str_data); - QVariant variant(str); - return variant; - } - - case DBUS_TYPE_INT64: - { - dbus_message_iter_get_basic(iter, &int64_data); - QVariant variant((qlonglong)int64_data); - return variant; - } - - case DBUS_TYPE_UINT64: - { - dbus_message_iter_get_basic(iter, &uint64_data); - QVariant variant((qulonglong)uint64_data); - return variant; - } - - case DBUS_TYPE_STRUCT: - { - // Handle all structs here - DBusMessageIter struct_iter; - dbus_message_iter_recurse(iter, &struct_iter); - - QVariantList variantList; - do { - variantList << getVariantFromDBusMessage(&struct_iter); - } while (dbus_message_iter_next(&struct_iter)); - QVariant variant(variantList); - return variant; - } - - default: - qDebug() << "Unsupported DBUS type: " << argtype; - } - - return QVariant(); -} - -static DBusHandlerResult signalHandler (DBusConnection *connection, - DBusMessage *message, - void *object_ref) { - (void)connection; - QString interface; - QString signal; - DBusDispatcher *dispatcher = (DBusDispatcher *)object_ref; - - if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL) { - interface = dbus_message_get_interface(message); - signal = dbus_message_get_member(message); - - QList arglist; - DBusMessageIter dbus_iter; - - if (dbus_message_iter_init(message, &dbus_iter)) { - // Read return arguments - while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { - arglist << getVariantFromDBusMessage(&dbus_iter); - dbus_message_iter_next(&dbus_iter); - } - } - - dispatcher->emitSignalReceived(interface, signal, arglist); - return DBUS_HANDLER_RESULT_HANDLED; - } - (void)message; - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - -DBusDispatcher::DBusDispatcher(const QString& service, - const QString& path, - const QString& interface, - QObject *parent) - : QObject(parent), - d_ptr(new DBusDispatcherPrivate(service, path, interface, path)) { - setupDBus(); -} - -DBusDispatcher::DBusDispatcher(const QString& service, - const QString& path, - const QString& interface, - const QString& signalPath, - QObject *parent) - : QObject(parent), - d_ptr(new DBusDispatcherPrivate(service, path, interface, signalPath)) { - setupDBus(); -} - -DBusDispatcher::~DBusDispatcher() -{ - if (d_ptr->connection) { - dbus_connection_close(d_ptr->connection); - dbus_connection_unref(d_ptr->connection); - } - delete d_ptr; -} - -void DBusDispatcher::setupDBus() -{ - d_ptr->connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL); - - if (d_ptr->connection == NULL) - qDebug() << "Unable to get DBUS connection!"; - else { - d_ptr->signal_vtable.message_function = signalHandler; - - dbus_connection_set_exit_on_disconnect(d_ptr->connection, FALSE); - dbus_connection_setup_with_g_main(d_ptr->connection, NULL); - dbus_connection_register_object_path(d_ptr->connection, - d_ptr->signalPath.toLatin1(), - &d_ptr->signal_vtable, - this); - } -} - -static DBusMessage *prepareDBusCall(const QString& service, - const QString& path, - const QString& interface, - const QString& method, - const QVariant& arg1 = QVariant(), - const QVariant& arg2 = QVariant(), - const QVariant& arg3 = QVariant(), - const QVariant& arg4 = QVariant(), - const QVariant& arg5 = QVariant(), - const QVariant& arg6 = QVariant(), - const QVariant& arg7 = QVariant(), - const QVariant& arg8 = QVariant()) -{ - DBusMessage *message = dbus_message_new_method_call(service.toLatin1(), - path.toLatin1(), - interface.toLatin1(), - method.toLatin1()); - DBusMessageIter dbus_iter; - - // Append variants to DBUS message - QList arglist; - if (arg1.isValid()) arglist << arg1; - if (arg2.isValid()) arglist << arg2; - if (arg3.isValid()) arglist << arg3; - if (arg4.isValid()) arglist << arg4; - if (arg5.isValid()) arglist << arg5; - if (arg6.isValid()) arglist << arg6; - if (arg7.isValid()) arglist << arg7; - if (arg8.isValid()) arglist << arg8; - - dbus_message_iter_init_append (message, &dbus_iter); - - while (!arglist.isEmpty()) { - QVariant argument = arglist.takeFirst(); - appendVariantToDBusMessage(argument, &dbus_iter); - } - - return message; -} - -QList DBusDispatcher::call(const QString& method, - const QVariant& arg1, - const QVariant& arg2, - const QVariant& arg3, - const QVariant& arg4, - const QVariant& arg5, - const QVariant& arg6, - const QVariant& arg7, - const QVariant& arg8) { - DBusMessageIter dbus_iter; - DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path, - d_ptr->interface, method, - arg1, arg2, arg3, arg4, arg5, - arg6, arg7, arg8); - DBusMessage *reply = dbus_connection_send_with_reply_and_block( - d_ptr->connection, - message, -1, NULL); - dbus_message_unref(message); - - QList replylist; - if (reply != NULL && dbus_message_iter_init(reply, &dbus_iter)) { - // Read return arguments - while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { - replylist << getVariantFromDBusMessage(&dbus_iter); - dbus_message_iter_next(&dbus_iter); - } - } - if (reply != NULL) dbus_message_unref(reply); - return replylist; -} - -class PendingCallInfo { -public: - QString method; - DBusDispatcher *dispatcher; - DBusDispatcherPrivate *priv; -}; - -static void freePendingCallInfo(void *memory) { - PendingCallInfo *info = (PendingCallInfo *)memory; - delete info; -} - -static void pendingCallFunction (DBusPendingCall *pending, - void *memory) { - PendingCallInfo *info = (PendingCallInfo *)memory; - QString errorStr; - QList replyList; - DBusMessage *reply = dbus_pending_call_steal_reply (pending); - - Q_ASSERT(reply != NULL); - - if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) { - errorStr = dbus_message_get_error_name (reply); - } else { - DBusMessageIter dbus_iter; - dbus_message_iter_init(reply, &dbus_iter); - // Read return arguments - while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { - replyList << getVariantFromDBusMessage(&dbus_iter); - dbus_message_iter_next(&dbus_iter); - } - } - - info->priv->pending_calls.removeOne(pending); - info->dispatcher->emitCallReply(info->method, replyList, errorStr); - dbus_message_unref(reply); - dbus_pending_call_unref(pending); -} - -bool DBusDispatcher::callAsynchronous(const QString& method, - const QVariant& arg1, - const QVariant& arg2, - const QVariant& arg3, - const QVariant& arg4, - const QVariant& arg5, - const QVariant& arg6, - const QVariant& arg7, - const QVariant& arg8) { - DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path, - d_ptr->interface, method, - arg1, arg2, arg3, arg4, arg5, - arg6, arg7, arg8); - DBusPendingCall *call = NULL; - dbus_bool_t ret = dbus_connection_send_with_reply(d_ptr->connection, - message, &call, -1); - PendingCallInfo *info = new PendingCallInfo; - info->method = method; - info->dispatcher = this; - info->priv = d_ptr; - - dbus_pending_call_set_notify(call, pendingCallFunction, info, freePendingCallInfo); - d_ptr->pending_calls.append(call); - return (bool)ret; -} - -void DBusDispatcher::emitSignalReceived(const QString& interface, - const QString& signal, - const QList& args) { - emit signalReceived(interface, signal, args); } - -void DBusDispatcher::emitCallReply(const QString& method, - const QList& args, - const QString& error) { - emit callReply(method, args, error); } - -void DBusDispatcher::synchronousDispatch(int timeout_ms) -{ - dbus_connection_read_write_dispatch(d_ptr->connection, timeout_ms); -} - -} // Maemo namespace - diff --git a/src/3rdparty/libconninet/src/dbusdispatcher.h b/src/3rdparty/libconninet/src/dbusdispatcher.h deleted file mode 100644 index 2f71b6f..0000000 --- a/src/3rdparty/libconninet/src/dbusdispatcher.h +++ /dev/null @@ -1,91 +0,0 @@ -/* * This file is part of conn-dui-settings-inet * - * - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * - * Contact: Aapo Makela - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 2.1 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ - -#ifndef DBUSDISPATCHER_H -#define DBUSDISPATCHER_H - -#include -#include - -namespace Maemo { - -class DBusDispatcherPrivate; -class DBusDispatcher : public QObject -{ - Q_OBJECT - -public: - DBusDispatcher(const QString& service, - const QString& path, - const QString& interface, - QObject *parent = 0); - DBusDispatcher(const QString& service, - const QString& path, - const QString& interface, - const QString& signalPath, - QObject *parent = 0); - ~DBusDispatcher(); - - QList call(const QString& method, - const QVariant& arg1 = QVariant(), - const QVariant& arg2 = QVariant(), - const QVariant& arg3 = QVariant(), - const QVariant& arg4 = QVariant(), - const QVariant& arg5 = QVariant(), - const QVariant& arg6 = QVariant(), - const QVariant& arg7 = QVariant(), - const QVariant& arg8 = QVariant()); - bool callAsynchronous(const QString& method, - const QVariant& arg1 = QVariant(), - const QVariant& arg2 = QVariant(), - const QVariant& arg3 = QVariant(), - const QVariant& arg4 = QVariant(), - const QVariant& arg5 = QVariant(), - const QVariant& arg6 = QVariant(), - const QVariant& arg7 = QVariant(), - const QVariant& arg8 = QVariant()); - void emitSignalReceived(const QString& interface, - const QString& signal, - const QList& args); - void emitCallReply(const QString& method, - const QList& args, - const QString& error = ""); - void synchronousDispatch(int timeout_ms); - -Q_SIGNALS: - void signalReceived(const QString& interface, - const QString& signal, - const QList& args); - void callReply(const QString& method, - const QList& args, - const QString& error); - -protected: - void setupDBus(); - -private: - DBusDispatcherPrivate *d_ptr; -}; - -} // Maemo namespace - -#endif diff --git a/src/3rdparty/libconninet/src/iapconf.cpp b/src/3rdparty/libconninet/src/iapconf.cpp deleted file mode 100644 index 2e77fa5..0000000 --- a/src/3rdparty/libconninet/src/iapconf.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. - - Contact: Aapo Makela - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#include -#include -#include - -#include "iapconf.h" - -#define QSTRING_TO_CONST_CSTR(str) \ - str.toUtf8().constData() - -namespace Maemo { - -class IAPConfPrivate { -public: - ConnSettings *settings; - - ConnSettingsValue *variantToValue(const QVariant &variant); - QVariant valueToVariant(ConnSettingsValue *value); -}; - -ConnSettingsValue *IAPConfPrivate::variantToValue(const QVariant &variant) -{ - // Convert variant to ConnSettingsValue - ConnSettingsValue *value = conn_settings_value_new(); - if (value == 0) { - qWarning("IAPConf: Unable to create new ConnSettingsValue"); - return 0; - } - - switch(variant.type()) { - - case QVariant::Invalid: - value->type = CONN_SETTINGS_VALUE_INVALID; - break; - - case QVariant::String: { - char *valueStr = strdup(QSTRING_TO_CONST_CSTR(variant.toString())); - value->type = CONN_SETTINGS_VALUE_STRING; - value->value.string_val = valueStr; - break; - } - - case QVariant::Int: - value->type = CONN_SETTINGS_VALUE_INT; - value->value.int_val = variant.toInt(); - break; - - case QMetaType::Float: - case QVariant::Double: - value->type = CONN_SETTINGS_VALUE_DOUBLE; - value->value.double_val = variant.toDouble(); - break; - - case QVariant::Bool: - value->type = CONN_SETTINGS_VALUE_BOOL; - value->value.bool_val = variant.toBool() ? 1 : 0; - break; - - case QVariant::ByteArray: { - QByteArray array = variant.toByteArray(); - value->type = CONN_SETTINGS_VALUE_BYTE_ARRAY; - value->value.byte_array.len = array.size(); - value->value.byte_array.val = (unsigned char *)malloc(array.size()); - memcpy(value->value.byte_array.val, array.constData(), array.size()); - break; - } - - case QVariant::List: { - QVariantList list = variant.toList(); - ConnSettingsValue **list_val = (ConnSettingsValue **)malloc( - (list.size() + 1) * sizeof(ConnSettingsValue *)); - - for (int idx = 0; idx < list.size(); idx++) { - list_val[idx] = variantToValue(list.at(idx)); - } - list_val[list.size()] = 0; - - value->type = CONN_SETTINGS_VALUE_LIST; - value->value.list_val = list_val; - break; - } - - default: - qWarning("IAPConf: Can not handle QVariant of type %d", - variant.type()); - conn_settings_value_destroy(value); - return 0; - } - - return value; -} - -QVariant IAPConfPrivate::valueToVariant(ConnSettingsValue *value) -{ - if (value == 0 || value->type == CONN_SETTINGS_VALUE_INVALID) { - return QVariant(); - } - - switch(value->type) { - - case CONN_SETTINGS_VALUE_BOOL: - return QVariant(value->value.bool_val ? true : false); - - case CONN_SETTINGS_VALUE_STRING: - return QVariant(QString(value->value.string_val)); - - case CONN_SETTINGS_VALUE_DOUBLE: - return QVariant(value->value.double_val); - - case CONN_SETTINGS_VALUE_INT: - return QVariant(value->value.int_val); - - case CONN_SETTINGS_VALUE_LIST: { - // At least with GConf backend connsettings returns byte array as list - // of ints, first check for that case - if (value->value.list_val && value->value.list_val[0]) { - bool canBeConvertedToByteArray = true; - for (int idx = 0; value->value.list_val[idx]; idx++) { - ConnSettingsValue *val = value->value.list_val[idx]; - if (val->type != CONN_SETTINGS_VALUE_INT - || val->value.int_val > 255 - || val->value.int_val < 0) { - canBeConvertedToByteArray = false; - break; - } - } - - if (canBeConvertedToByteArray) { - QByteArray array; - for (int idx = 0; value->value.list_val[idx]; idx++) { - array.append(value->value.list_val[idx]->value.int_val); - } - return array; - } - - // Create normal list - QVariantList list; - for (int idx = 0; value->value.list_val[idx]; idx++) { - list.append(valueToVariant(value->value.list_val[idx])); - } - return list; - } - } - - case CONN_SETTINGS_VALUE_BYTE_ARRAY: - return QByteArray::fromRawData((char *)value->value.byte_array.val, - value->value.byte_array.len); - - default: - return QVariant(); - } -} - -// Public class implementation - -IAPConf::IAPConf(const QString &iap_id) - : d_ptr(new IAPConfPrivate) -{ - d_ptr->settings = conn_settings_open(CONN_SETTINGS_CONNECTION, - QSTRING_TO_CONST_CSTR(iap_id)); - if (d_ptr->settings == 0) { - qWarning("IAPConf: Unable to open ConnSettings for %s", - QSTRING_TO_CONST_CSTR(iap_id)); - } -} - -IAPConf::~IAPConf() -{ - conn_settings_close(d_ptr->settings); - delete d_ptr; -} - -void IAPConf::setValue(const QString& key, const QVariant& value) -{ - // Invalid value means unsetting the given key - if (!value.isValid()) { - int err = conn_settings_unset(d_ptr->settings, - QSTRING_TO_CONST_CSTR(key)); - if (err != CONN_SETTINGS_E_NO_ERROR) { - qWarning("IAPConf: unable to unset key %s: %s", - QSTRING_TO_CONST_CSTR(key), - conn_settings_error_text((ConnSettingsError)err)); - } - return; - } - - // Convert value to ConnSettingsValue - ConnSettingsValue *val = d_ptr->variantToValue(value); - if (val == 0) return; - - // Set value and handle errors - int error = conn_settings_set(d_ptr->settings, - QSTRING_TO_CONST_CSTR(key), - val); - if (error != CONN_SETTINGS_E_NO_ERROR) { - qWarning("IAPConf: error in setting key %s: %s", - QSTRING_TO_CONST_CSTR(key), - conn_settings_error_text((ConnSettingsError)error)); - } - - // Destroy value - conn_settings_value_destroy(val); - return; -} - -void IAPConf::set(const QString& key1, const QVariant& value1, - const QString& key2, const QVariant& value2, - const QString& key3, const QVariant& value3, - const QString& key4, const QVariant& value4, - const QString& key5, const QVariant& value5, - const QString& key6, const QVariant& value6, - const QString& key7, const QVariant& value7, - const QString& key8, const QVariant& value8, - const QString& key9, const QVariant& value9, - const QString& key10, const QVariant& value10) -{ - if (!key1.isEmpty()) setValue(key1, value1); - if (!key2.isEmpty()) setValue(key2, value2); - if (!key3.isEmpty()) setValue(key3, value3); - if (!key4.isEmpty()) setValue(key4, value4); - if (!key5.isEmpty()) setValue(key5, value5); - if (!key6.isEmpty()) setValue(key6, value6); - if (!key7.isEmpty()) setValue(key7, value7); - if (!key8.isEmpty()) setValue(key8, value8); - if (!key9.isEmpty()) setValue(key9, value9); - if (!key10.isEmpty()) setValue(key10, value10); -} - -QVariant IAPConf::value(const QString& key) const -{ - ConnSettingsValue *val = conn_settings_get(d_ptr->settings, - QSTRING_TO_CONST_CSTR(key)); - - QVariant variant = d_ptr->valueToVariant(val); - conn_settings_value_destroy(val); - return variant; -} - -void IAPConf::clear(const char *default_path) -{ - Q_UNUSED(default_path); // default path is unused - - int error = conn_settings_remove(d_ptr->settings); - if (error != CONN_SETTINGS_E_NO_ERROR) { - qWarning("IAPConf: Error when removing IAP: %s", - conn_settings_error_text((ConnSettingsError)error)); - } -} - -void IAPConf::clearAll() -{ - ConnSettings *settings = conn_settings_open(CONN_SETTINGS_CONNECTION, - NULL); - conn_settings_remove(settings); - conn_settings_close(settings); -} - - -void IAPConf::getAll(QList &all_iaps, bool return_path) -{ - Q_UNUSED(return_path); // We don't use return path currently - - // Go through all available connections and add them to the list - char **ids = conn_settings_list_ids(CONN_SETTINGS_CONNECTION); - if (ids == 0) { - // No ids found - nothing to do - return; - } - - for (int idx = 0; ids[idx]; idx++) { - all_iaps.append(QString(ids[idx])); - free(ids[idx]); - } - free(ids); -} - - -} // namespace Maemo diff --git a/src/3rdparty/libconninet/src/iapconf.h b/src/3rdparty/libconninet/src/iapconf.h deleted file mode 100644 index 57c0856..0000000 --- a/src/3rdparty/libconninet/src/iapconf.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009 Nokia Corporation. All rights reserved. - - Contact: Aapo Makela - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#ifndef IAPCONF_H -#define IAPCONF_H - -#include -#include - -namespace Maemo { - -class IAPConfPrivate; -class IAPConf { -public: - IAPConf(const QString &iap_id); - virtual ~IAPConf(); - - /** - Convenience method for setting multiple IAP values with one call. - */ - void set(const QString& key1, const QVariant& value1, - const QString& key2 = "", const QVariant& value2 = QVariant(), - const QString& key3 = "", const QVariant& value3 = QVariant(), - const QString& key4 = "", const QVariant& value4 = QVariant(), - const QString& key5 = "", const QVariant& value5 = QVariant(), - const QString& key6 = "", const QVariant& value6 = QVariant(), - const QString& key7 = "", const QVariant& value7 = QVariant(), - const QString& key8 = "", const QVariant& value8 = QVariant(), - const QString& key9 = "", const QVariant& value9 = QVariant(), - const QString& key10 = "", const QVariant& value10 = QVariant()); - - /** - Set one IAP value. - */ - void setValue(const QString& key, const QVariant& value); - - /** - Get one IAP value. - */ - QVariant value(const QString& key) const; - - /** - Clear this IAP from GConf - */ - void clear(const char *default_path=0); - - /** - Clear all IAP specific information from GConf (including all IAPs). - DO NOT USE THIS FUNCTION IN ANYWHERE ELSE EXCEPT IN TEST CODE! - */ - void clearAll(); - - /** - Return all the IAPs found in the system. If return_path is true, - then do not strip the IAP path away. - */ - static void getAll(QList &all_iaps, bool return_path=false); - -private: - IAPConfPrivate *d_ptr; -}; - -} // namespace Maemo - -#endif diff --git a/src/3rdparty/libconninet/src/iapmonitor.cpp b/src/3rdparty/libconninet/src/iapmonitor.cpp deleted file mode 100644 index c44cbc8..0000000 --- a/src/3rdparty/libconninet/src/iapmonitor.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#include - -#include -#include "iapmonitor.h" - -namespace Maemo { - - -void conn_settings_notify_func (ConnSettingsType type, - const char *id, - const char *key, - ConnSettingsValue *value, - void *user_data); - -class IAPMonitorPrivate { -private: - IAPMonitor *monitor; - ConnSettings *settings; - -public: - - IAPMonitorPrivate(IAPMonitor *monitor) - : monitor(monitor) - { - settings = conn_settings_open(CONN_SETTINGS_CONNECTION, NULL); - conn_settings_add_notify( - settings, - (ConnSettingsNotifyFunc *)conn_settings_notify_func, - this); - } - - ~IAPMonitorPrivate() - { - conn_settings_del_notify(settings); - conn_settings_close(settings); - } - - void iapAdded(const QString &iap) - { - monitor->iapAdded(iap); - } - - void iapRemoved(const QString &iap) - { - monitor->iapRemoved(iap); - } -}; - -void conn_settings_notify_func (ConnSettingsType type, - const char *id, - const char *key, - ConnSettingsValue *value, - void *user_data) -{ - if (type != CONN_SETTINGS_CONNECTION) return; - IAPMonitorPrivate *priv = (IAPMonitorPrivate *)user_data; - - QString iapId(key); - iapId = iapId.split("/")[0]; - if (value != 0) { - priv->iapAdded(iapId); - } else if (iapId == QString(key)) { - // IAP is removed only when the directory gets removed - priv->iapRemoved(iapId); - } -} - -IAPMonitor::IAPMonitor() - : d_ptr(new IAPMonitorPrivate(this)) -{ -} - -IAPMonitor::~IAPMonitor() -{ - delete d_ptr; -} - -void IAPMonitor::iapAdded(const QString &id) -{ - // By default do nothing -} - -void IAPMonitor::iapRemoved(const QString &id) -{ - // By default do nothing -} - -} // namespace Maemo diff --git a/src/3rdparty/libconninet/src/iapmonitor.h b/src/3rdparty/libconninet/src/iapmonitor.h deleted file mode 100644 index 558f23e..0000000 --- a/src/3rdparty/libconninet/src/iapmonitor.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#ifndef IAPMONITOR_H -#define IAPMONITOR_H - -#include - -namespace Maemo { - -class IAPMonitorPrivate; -class IAPMonitor { -public: - IAPMonitor(); - ~IAPMonitor(); - -protected: - virtual void iapAdded(const QString &id); - virtual void iapRemoved(const QString &id); - -private: - IAPMonitorPrivate *d_ptr; - Q_DECLARE_PRIVATE(IAPMonitor); -}; - -} // namespace Maemo - -#endif // IAPMONITOR_H - diff --git a/src/3rdparty/libconninet/src/maemo_icd.cpp b/src/3rdparty/libconninet/src/maemo_icd.cpp deleted file mode 100644 index 026241c..0000000 --- a/src/3rdparty/libconninet/src/maemo_icd.cpp +++ /dev/null @@ -1,1316 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#include -#include "maemo_icd.h" -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace Maemo { - -#undef PRINT_DEBUGINFO -#ifdef PRINT_DEBUGINFO - static FILE *fdebug = NULL; -#define PDEBUG(fmt, args...) \ - do { \ - struct timeval tv; \ - gettimeofday(&tv, 0); \ - fprintf(fdebug, "DEBUG[%d]:%ld.%ld:%s:%s():%d: " fmt, \ - getpid(), \ - tv.tv_sec, tv.tv_usec, \ - __FILE__, __FUNCTION__, __LINE__, args); \ - fflush(fdebug); \ - } while(0) -#else -#define PDEBUG(fmt...) -#endif - - -/* Reference counting singleton class that creates a single connection - * to icd so that icd reference counting works as expected. This is - * needed because DBusDispatcher uses private dbus connections - * which come and go and icd cannot use that information to - * determine whether application quit or not. So we create one - * persistent connection that is only teared down when application - * quits or calls disconnect() - */ -class IcdRefCounting -{ -public: - IcdRefCounting() : first_call(true) { } - void setup(enum icd_connection_flags flag); - void cleanup(); - -private: - bool first_call; - struct DBusConnection *connection; -}; - -Q_GLOBAL_STATIC(IcdRefCounting, icdRefCounting); - - -void IcdRefCounting::setup(enum icd_connection_flags flag) -{ - if (first_call) { - DBusMessage *msg = NULL; - - connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL); - dbus_connection_set_exit_on_disconnect(connection, FALSE); - dbus_connection_setup_with_g_main(connection, NULL); - - msg = dbus_message_new_method_call(ICD_DBUS_API_INTERFACE, - ICD_DBUS_API_PATH, - ICD_DBUS_API_INTERFACE, - ICD_DBUS_API_CONNECT_REQ); - if (msg == NULL) - goto out; - - if (!dbus_message_append_args(msg, - DBUS_TYPE_UINT32, &flag, - DBUS_TYPE_INVALID)) - goto out; - - if (!dbus_connection_send_with_reply(connection, msg, - NULL, 60*1000)) - goto out; - - first_call = false; - return; - - out: - dbus_connection_close(connection); - dbus_connection_unref(connection); - } -} - -void IcdRefCounting::cleanup() -{ - if (!first_call) { - dbus_connection_close(connection); - dbus_connection_unref(connection); - first_call = true; - } -} - - -class IcdPrivate -{ -public: - IcdPrivate(Icd *myfriend) - { - init(10000, IcdNewDbusInterface, myfriend); - } - - IcdPrivate(unsigned int timeout, Icd *myfriend) - { - init(timeout, IcdNewDbusInterface, myfriend); - } - - IcdPrivate(unsigned int timeout, IcdDbusInterfaceVer ver, Icd *myfriend) - { - /* Note that the old Icd interface is currently disabled and - * the new one is always used. - */ - init(timeout, IcdNewDbusInterface, myfriend); - } - - ~IcdPrivate() - { - QObject::disconnect(mDBus, - SIGNAL(signalReceived(const QString&, - const QString&, - const QList&)), - icd, - SLOT(icdSignalReceived(const QString&, - const QString&, - const QList&))); - - QObject::disconnect(mDBus, - SIGNAL(callReply(const QString&, - const QList&, - const QString&)), - icd, - SLOT(icdCallReply(const QString&, - const QList&, - const QString&))); - - delete mDBus; - mDBus = 0; - } - - /* Icd2 dbus API functions */ - QStringList scan(icd_scan_request_flags flags, - QStringList &network_types, - QList& scan_results, - QString& error); - void scanCancel(); - bool connect(icd_connection_flags flags, IcdConnectResult& result); - bool connect(icd_connection_flags flags, QList& params, - IcdConnectResult& result); - bool connect(icd_connection_flags flags, QString& iap, QString& result); - void select(uint flags); - void disconnect(uint connect_flags, QString& service_type, - uint service_attrs, QString& service_id, - QString& network_type, uint network_attrs, - QByteArray& network_id); - void disconnect(uint connect_flags); - - uint state(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStateResult &state_result); - uint statistics(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStatisticsResult& stats_result); - uint addrinfo(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdAddressInfoResult& addr_result); - - uint state(QList& state_results); - uint state_non_blocking(QList& state_results); - uint statistics(QList& stats_results); - uint addrinfo(QList& addr_results); - uint addrinfo_non_blocking(QList& addr_results); - - void signalReceived(const QString& interface, - const QString& signal, - const QList& args); - void callReply(const QString& method, - const QList& args, - const QString& error); - - QString error() { return mError; } - -public: - DBusDispatcher *mDBus; - QString mMethod; - QString mInterface; - QString mSignal; - QString mError; - QList mArgs; - QList receivedSignals; - unsigned int timeout; - IcdDbusInterfaceVer icd_dbus_version; - Icd *icd; - - void init(unsigned int dbus_timeout, IcdDbusInterfaceVer ver, - Icd *myfriend) - { - if (ver == IcdNewDbusInterface) { - mDBus = new DBusDispatcher(ICD_DBUS_API_INTERFACE, - ICD_DBUS_API_PATH, - ICD_DBUS_API_INTERFACE); - } else { - mDBus = new DBusDispatcher(ICD_DBUS_SERVICE, - ICD_DBUS_PATH, - ICD_DBUS_INTERFACE); - } - icd_dbus_version = ver; - - /* This connect has a side effect as it means that only one - * Icd object can exists in one time. This should be fixed! - */ - QObject::connect(mDBus, - SIGNAL(signalReceived(const QString&, - const QString&, - const QList&)), - myfriend, - SLOT(icdSignalReceived(const QString&, - const QString&, - const QList&))); - - QObject::connect(mDBus, - SIGNAL(callReply(const QString&, - const QList&, - const QString&)), - myfriend, - SLOT(icdCallReply(const QString&, - const QList&, - const QString&))); - - icd = myfriend; - timeout = dbus_timeout; - -#ifdef PRINT_DEBUGINFO - if (!fdebug) { - fdebug = fopen("/tmp/maemoicd.log", "a+"); - } - PDEBUG("created %s\n", "IcdPrivate"); -#endif - } - - void clearState() - { - mMethod.clear(); - mInterface.clear(); - mSignal.clear(); - mError.clear(); - mArgs.clear(); - receivedSignals.clear(); - } - - bool doConnect(IcdConnectResult& result); - bool doConnect(QString& result); - bool doState(); -}; - - -void IcdPrivate::signalReceived(const QString& interface, - const QString& signal, - const QList& args) -{ - // Signal handler, which simply records what has been signalled - mInterface = interface; - mSignal = signal; - mArgs = args; - - //qDebug() << "signal" << signal << "received:" << args; - receivedSignals << QVariant(interface) << QVariant(signal) << QVariant(args); -} - - -void IcdPrivate::callReply(const QString& method, - const QList& /*args*/, - const QString& error) -{ - mMethod = method; - mError = error; -} - - -static void get_scan_result(QList& args, - IcdScanResult& ret) -{ - int i=0; - - if (args.isEmpty()) - return; - - ret.status = args[i++].toUInt(); - ret.timestamp = args[i++].toUInt(); - ret.scan.service_type = args[i++].toString(); - ret.service_name = args[i++].toString(); - ret.scan.service_attrs = args[i++].toUInt(); - ret.scan.service_id = args[i++].toString(); - ret.service_priority = args[i++].toInt(); - ret.scan.network_type = args[i++].toString(); - ret.network_name = args[i++].toString(); - ret.scan.network_attrs = args[i++].toUInt(); - ret.scan.network_id = args[i++].toByteArray(); - ret.network_priority = args[i++].toInt(); - ret.signal_strength = args[i++].toInt(); - ret.station_id = args[i++].toString(); - ret.signal_dB = args[i++].toInt(); -} - - -static void get_connect_result(QList& args, - IcdConnectResult& ret) -{ - int i=0; - - if (args.isEmpty()) - return; - - ret.connect.service_type = args[i++].toString(); - ret.connect.service_attrs = args[i++].toInt(); - ret.connect.service_id = args[i++].toString(); - ret.connect.network_type = args[i++].toString(); - ret.connect.network_attrs = args[i++].toInt(); - ret.connect.network_id = args[i++].toByteArray(); - ret.status = args[i++].toInt(); -} - - -QStringList IcdPrivate::scan(icd_scan_request_flags flags, - QStringList &network_types, - QList& scan_results, - QString& error) -{ - QStringList scanned_types; - QTimer timer; - QVariant reply; - QVariantList vl; - bool last_result = false; - IcdScanResult result; - int all_waited; - - clearState(); - reply = mDBus->call(ICD_DBUS_API_SCAN_REQ, (uint)flags); - if (reply.type() != QVariant::List) - return scanned_types; - vl = reply.toList(); - if (vl.isEmpty()) { - error = "Scan did not return anything."; - return scanned_types; - } - reply = vl.first(); - scanned_types = reply.toStringList(); - //qDebug() << "Scanning:" << scanned_types; - all_waited = scanned_types.size(); - - timer.setSingleShot(true); - timer.start(timeout); - - scan_results.clear(); - while (!last_result) { - while (timer.isActive() && mInterface.isEmpty() && mError.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - if (!timer.isActive()) { - //qDebug() << "Timeout happened"; - break; - } - - if (mSignal != ICD_DBUS_API_SCAN_SIG) { - //qDebug() << "Received" << mSignal << "while waiting" << ICD_DBUS_API_SCAN_SIG << ", ignoring"; - mInterface.clear(); - continue; - } - - if (mError.isEmpty()) { - QString msgInterface = receivedSignals.takeFirst().toString(); - QString msgSignal = receivedSignals.takeFirst().toString(); - QList msgArgs = receivedSignals.takeFirst().toList(); - //qDebug() << "Signal" << msgSignal << "received."; - //qDebug() << "Params:" << msgArgs; - - while (!msgSignal.isEmpty()) { - get_scan_result(msgArgs, result); - -#if 0 - qDebug() << "Received: " << - "status =" << result.status << - ", timestamp =" << result.timestamp << - ", service_type =" << result.scan.service_type << - ", service_name =" << result.service_name << - ", service_attrs =" << result.scan.service_attrs << - ", service_id =" << result.scan.service_id << - ", service_priority =" << result.service_priority << - ", network_type =" << result.scan.network_type << - ", network_name =" << result.network_name << - ", network_attrs =" << result.scan.network_attrs << - ", network_id =" << "-" << - ", network_priority =" << result.network_priority << - ", signal_strength =" << result.signal_strength << - ", station_id =" << result.station_id << - ", signal_dB =" << result.signal_dB; -#endif - - if (result.status == ICD_SCAN_COMPLETE) { - //qDebug() << "waited =" << all_waited; - if (--all_waited == 0) { - last_result = true; - break; - } - } else - scan_results << result; - - if (receivedSignals.isEmpty()) - break; - - msgInterface = receivedSignals.takeFirst().toString(); - msgSignal = receivedSignals.takeFirst().toString(); - msgArgs = receivedSignals.takeFirst().toList(); - } - mInterface.clear(); - - } else { - qWarning() << "Error while scanning:" << mError; - break; - } - } - timer.stop(); - - error = mError; - return scanned_types; -} - - -void IcdPrivate::scanCancel() -{ - mDBus->call(ICD_DBUS_API_SCAN_CANCEL); -} - - -bool IcdPrivate::doConnect(IcdConnectResult& result) -{ - QTimer timer; - bool status = false; - - timer.setSingleShot(true); - timer.start(timeout); - - //qDebug() << "Waiting" << ICD_DBUS_API_CONNECT_SIG << "signal"; - - while (timer.isActive() && mInterface.isEmpty() && - mSignal != ICD_DBUS_API_CONNECT_SIG && - mError.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - timer.stop(); - - if (mError.isEmpty()) { - if (!mArgs.isEmpty()) { - get_connect_result(mArgs, result); - status = true; - } else - status = false; - } else - status = false; - - return status; -} - - -bool IcdPrivate::connect(icd_connection_flags flags, IcdConnectResult& result) -{ - clearState(); - //mDBus->callAsynchronous(ICD_DBUS_API_CONNECT_REQ, (uint)flags); - mDBus->call(ICD_DBUS_API_CONNECT_REQ, (uint)flags); - icdRefCounting()->setup(flags); - return doConnect(result); -} - - -bool IcdPrivate::connect(icd_connection_flags flags, QList& params, - IcdConnectResult& result) -{ - QVariantList varlist; - QVariantList varlist2; - - foreach (ConnectParams param, params) { - QVariantList items; - - items.append(QVariant(param.connect.service_type)); - items.append(QVariant(param.connect.service_attrs)); - items.append(QVariant(param.connect.service_id)); - items.append(QVariant(param.connect.network_type)); - items.append(QVariant(param.connect.network_attrs)); - items.append(QVariant(param.connect.network_id)); - - varlist.append(items); - } - - varlist2.append(QVariant(varlist)); - - clearState(); - //mDBus->callAsynchronous(ICD_DBUS_API_CONNECT_REQ, (uint)flags, varlist2); - mDBus->call(ICD_DBUS_API_CONNECT_REQ, (uint)flags, varlist2); - icdRefCounting()->setup(flags); - return doConnect(result); -} - - -bool IcdPrivate::doConnect(QString& ret) -{ - QTimer timer; - bool status = false; - - timer.setSingleShot(true); - timer.start(timeout); - - while (timer.isActive() && mInterface.isEmpty() && - mError.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - timer.stop(); - - if (mError.isEmpty()) { - if (!mArgs.isEmpty()) { - status = true; - //ret = mArgs[0]; // TODO correctly - } else - status = false; - } else - status = false; - - return status; -} - - -bool IcdPrivate::connect(icd_connection_flags flags, QString& iap, QString& result) -{ - clearState(); - //mDBus->callAsynchronous(ICD_CONNECT_REQ, iap, (uint)flags); - mDBus->call(ICD_CONNECT_REQ, iap, (uint)flags); - icdRefCounting()->setup(flags); - return doConnect(result); -} - - -void IcdPrivate::select(uint flags) -{ - mDBus->call(ICD_DBUS_API_SELECT_REQ, flags); -} - - -void IcdPrivate::disconnect(uint flags, QString& service_type, - uint service_attrs, QString& service_id, - QString& network_type, uint network_attrs, - QByteArray& network_id) -{ - clearState(); - mDBus->call(ICD_DBUS_API_DISCONNECT_REQ, flags, - service_type, service_attrs, service_id, - network_type, network_attrs, network_id); - icdRefCounting()->cleanup(); -} - - -void IcdPrivate::disconnect(uint flags) -{ - clearState(); - mDBus->call(ICD_DBUS_API_DISCONNECT_REQ, flags); - icdRefCounting()->cleanup(); -} - - -static void get_state_all_result(QList& args, - IcdStateResult& ret) -{ - int i=0; - - ret.params.service_type = args[i++].toString(); - ret.params.service_attrs = args[i++].toUInt(); - ret.params.service_id = args[i++].toString(); - ret.params.network_type = args[i++].toString(); - ret.params.network_attrs = args[i++].toUInt(); - ret.params.network_id = args[i++].toByteArray(); - ret.error = args[i++].toString(); - ret.state = args[i++].toInt(); -} - - -static void get_state_all_result2(QList& args, - IcdStateResult& ret) -{ - int i=0; - - ret.params.network_type = args[i++].toString(); - ret.state = args[i++].toInt(); - - // Initialize the other values so that the caller can - // notice we only returned partial status - ret.params.service_type = QString(); - ret.params.service_attrs = 0; - ret.params.service_id = QString(); - ret.params.network_attrs = 0; - ret.params.network_id = QByteArray(); - ret.error = QString(); -} - - -uint IcdPrivate::state(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStateResult& state_result) -{ - QTimer timer; - QVariant reply; - uint total_signals; - QVariantList vl; - - clearState(); - - reply = mDBus->call(ICD_DBUS_API_STATE_REQ, - service_type, service_attrs, service_id, - network_type, network_attrs, network_id); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - total_signals = reply.toUInt(); - if (!total_signals) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - - if (mSignal != ICD_DBUS_API_STATE_SIG) { - mInterface.clear(); - continue; - } - } - - timer.stop(); - - if (mError.isEmpty()) { - if (!mArgs.isEmpty()) { - if (mArgs.size()>2) - get_state_all_result(mArgs, state_result); - else { - // We are not connected as we did not get the status we asked - return 0; - } - } - } else { - qWarning() << "Error:" << mError; - } - - // The returned value should be one because we asked for one state - return total_signals; -} - - -uint IcdPrivate::state_non_blocking(QList& state_results) -{ - QTimer timer; - QVariant reply; - QVariantList vl; - uint signals_left, total_signals; - IcdStateResult result; - - PDEBUG("%s\n", "non blocking state"); - - clearState(); - reply = mDBus->call(ICD_DBUS_API_STATE_REQ); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - signals_left = total_signals = reply.toUInt(); - if (!signals_left) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - state_results.clear(); - mError.clear(); - while (signals_left) { - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - if (!timer.isActive()) { - total_signals = 0; - break; - } - - if (mSignal != ICD_DBUS_API_STATE_SIG) { - continue; - } - - if (mError.isEmpty()) { - if (!mArgs.isEmpty()) { - if (mArgs.size()==2) - get_state_all_result2(mArgs, result); - else - get_state_all_result(mArgs, result); - state_results << result; - } - signals_left--; - } else { - qWarning() << "Error:" << mError; - break; - } - } - timer.stop(); - - PDEBUG("total_signals=%d\n", total_signals); - return total_signals; -} - - -/* Special version of the state() call which does not call event loop. - * Needed in order to fix NB#175098 where Qt4.7 webkit crashes because event - * loop is run when webkit does not expect it. This function is called from - * bearer management API syncStateWithInterface() in QNetworkSession - * constructor. - */ -uint IcdPrivate::state(QList& state_results) -{ - QVariant reply; - QVariantList vl; - uint signals_left, total_signals; - IcdStateResult result; - time_t started; - int timeout_secs = timeout / 1000; - - PDEBUG("%s\n", "state_results"); - - clearState(); - reply = mDBus->call(ICD_DBUS_API_STATE_REQ); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - signals_left = total_signals = reply.toUInt(); - if (!signals_left) - return 0; - - started = time(0); - state_results.clear(); - mError.clear(); - while (signals_left) { - mInterface.clear(); - while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) { - mDBus->synchronousDispatch(1000); - } - - if (time(0)>(started+timeout_secs)) { - total_signals = 0; - break; - } - - if (mSignal != ICD_DBUS_API_STATE_SIG) { - continue; - } - - if (mError.isEmpty()) { - if (!mArgs.isEmpty()) { - if (mArgs.size()==2) - get_state_all_result2(mArgs, result); - else - get_state_all_result(mArgs, result); - state_results << result; - } - signals_left--; - } else { - qWarning() << "Error:" << mError; - break; - } - } - - PDEBUG("total_signals=%d\n", total_signals); - return total_signals; -} - - -static void get_statistics_all_result(QList& args, - IcdStatisticsResult& ret) -{ - int i=0; - - if (args.isEmpty()) - return; - - ret.params.service_type = args[i++].toString(); - ret.params.service_attrs = args[i++].toUInt(); - ret.params.service_id = args[i++].toString(); - ret.params.network_type = args[i++].toString(); - ret.params.network_attrs = args[i++].toUInt(); - ret.params.network_id = args[i++].toByteArray(); - ret.time_active = args[i++].toUInt(); - ret.signal_strength = (enum icd_nw_levels)args[i++].toUInt(); - ret.bytes_sent = args[i++].toUInt(); - ret.bytes_received = args[i++].toUInt(); -} - - -uint IcdPrivate::statistics(QList& stats_results) -{ - QTimer timer; - QVariant reply; - QVariantList vl; - uint signals_left, total_signals; - IcdStatisticsResult result; - - clearState(); - reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - if (reply.type() != QVariant::UInt) - return 0; - signals_left = total_signals = reply.toUInt(); - - if (!signals_left) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - stats_results.clear(); - while (signals_left) { - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - if (!timer.isActive()) { - total_signals = 0; - break; - } - - if (mSignal != ICD_DBUS_API_STATISTICS_SIG) { - continue; - } - - if (mError.isEmpty()) { - get_statistics_all_result(mArgs, result); - stats_results << result; - signals_left--; - } else { - qWarning() << "Error:" << mError; - break; - } - } - timer.stop(); - - return total_signals; -} - - -uint IcdPrivate::statistics(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStatisticsResult& stats_result) -{ - QTimer timer; - QVariant reply; - uint total_signals; - QVariantList vl; - - clearState(); - - reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ, - service_type, service_attrs, service_id, - network_type, network_attrs, network_id); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - total_signals = reply.toUInt(); - if (!total_signals) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - - if (mSignal != ICD_DBUS_API_STATISTICS_SIG) { - mInterface.clear(); - continue; - } - } - - timer.stop(); - - if (mError.isEmpty()) { - get_statistics_all_result(mArgs, stats_result); - } else { - qWarning() << "Error:" << mError; - } - - // The returned value should be one because we asked for one statistics - return total_signals; -} - - -static void get_addrinfo_all_result(QList& args, - IcdAddressInfoResult& ret) -{ - int i=0; - - if (args.isEmpty()) - return; - - ret.params.service_type = args[i++].toString(); - ret.params.service_attrs = args[i++].toUInt(); - ret.params.service_id = args[i++].toString(); - ret.params.network_type = args[i++].toString(); - ret.params.network_attrs = args[i++].toUInt(); - ret.params.network_id = args[i++].toByteArray(); - - QVariantList vl = args[i].toList(); - QVariant reply = vl.first(); - QList lst = reply.toList(); - for (int k=0; k& addr_results) -{ - QVariant reply; - QVariantList vl; - uint signals_left, total_signals; - IcdAddressInfoResult result; - time_t started; - int timeout_secs = timeout / 1000; - - PDEBUG("%s\n", "addr_results"); - - clearState(); - reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - if (reply.type() != QVariant::UInt) - return 0; - signals_left = total_signals = reply.toUInt(); - if (!signals_left) - return 0; - - started = time(0); - addr_results.clear(); - while (signals_left) { - mInterface.clear(); - while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) { - mDBus->synchronousDispatch(1000); - } - - if (time(0)>(started+timeout_secs)) { - total_signals = 0; - break; - } - - if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) { - continue; - } - - if (mError.isEmpty()) { - get_addrinfo_all_result(mArgs, result); - addr_results << result; - signals_left--; - } else { - qWarning() << "Error:" << mError; - break; - } - } - - PDEBUG("total_signals=%d\n", total_signals); - return total_signals; -} - -uint IcdPrivate::addrinfo_non_blocking(QList& addr_results) -{ - QTimer timer; - QVariant reply; - QVariantList vl; - uint signals_left, total_signals; - IcdAddressInfoResult result; - - PDEBUG("%s\n", "non blocking addrinfo"); - - clearState(); - reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - if (reply.type() != QVariant::UInt) - return 0; - signals_left = total_signals = reply.toUInt(); - if (!signals_left) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - addr_results.clear(); - while (signals_left) { - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - if (!timer.isActive()) { - total_signals = 0; - break; - } - - if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) { - continue; - } - - if (mError.isEmpty()) { - get_addrinfo_all_result(mArgs, result); - addr_results << result; - signals_left--; - } else { - qWarning() << "Error:" << mError; - break; - } - } - timer.stop(); - PDEBUG("total_signals=%d\n", total_signals); - return total_signals; -} - - -uint IcdPrivate::addrinfo(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdAddressInfoResult& addr_result) -{ - QTimer timer; - QVariant reply; - uint total_signals; - QVariantList vl; - - clearState(); - - reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ, - service_type, service_attrs, service_id, - network_type, network_attrs, network_id); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - total_signals = reply.toUInt(); - - if (!total_signals) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - - if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) { - mInterface.clear(); - continue; - } - } - - timer.stop(); - - if (mError.isEmpty()) { - get_addrinfo_all_result(mArgs, addr_result); - } else { - qWarning() << "Error:" << mError; - } - - // The returned value should be one because we asked for one addrinfo - return total_signals; -} - - -Icd::Icd(QObject *parent) - : QObject(parent), d(new IcdPrivate(this)) -{ -} - -Icd::Icd(unsigned int timeout, QObject *parent) - : QObject(parent), d(new IcdPrivate(timeout, this)) -{ -} - -Icd::Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent) - : QObject(parent), d(new IcdPrivate(timeout, ver, this)) -{ -} - -Icd::~Icd() -{ - delete d; -} - - -QStringList Icd::scan(icd_scan_request_flags flags, - QStringList &network_types, - QList& scan_results, - QString& error) -{ - return d->scan(flags, network_types, scan_results, error); -} - - -void Icd::scanCancel() -{ - d->scanCancel(); -} - - -bool Icd::connect(icd_connection_flags flags, IcdConnectResult& result) -{ - return d->connect(flags, result); -} - - -bool Icd::connect(icd_connection_flags flags, QList& params, - IcdConnectResult& result) -{ - return d->connect(flags, params, result); -} - - -bool Icd::connect(icd_connection_flags flags, QString& iap, QString& result) -{ - return d->connect(flags, iap, result); -} - - -void Icd::select(uint flags) -{ - d->select(flags); -} - - -void Icd::disconnect(uint connect_flags, QString& service_type, - uint service_attrs, QString& service_id, - QString& network_type, uint network_attrs, - QByteArray& network_id) -{ - d->disconnect(connect_flags, service_type, - service_attrs, service_id, - network_type, network_attrs, - network_id); -} - - -void Icd::disconnect(uint connect_flags) -{ - d->disconnect(connect_flags); -} - - -uint Icd::state(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStateResult &state_result) -{ - return d->state(service_type, service_attrs, service_id, - network_type, network_attrs, network_id, - state_result); -} - - -uint Icd::statistics(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStatisticsResult& stats_result) -{ - return d->statistics(service_type, service_attrs, service_id, - network_type, network_attrs, network_id, - stats_result); -} - - -uint Icd::addrinfo(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdAddressInfoResult& addr_result) -{ - return d->addrinfo(service_type, service_attrs, service_id, - network_type, network_attrs, network_id, - addr_result); -} - - -uint Icd::state(QList& state_results) -{ - return d->state(state_results); -} - -uint Icd::state_non_blocking(QList& state_results) -{ - return d->state_non_blocking(state_results); -} - -uint Icd::statistics(QList& stats_results) -{ - return d->statistics(stats_results); -} - - -uint Icd::addrinfo(QList& addr_results) -{ - return d->addrinfo(addr_results); -} - -uint Icd::addrinfo_non_blocking(QList& addr_results) -{ - return d->addrinfo_non_blocking(addr_results); -} - -void Icd::icdSignalReceived(const QString& interface, - const QString& signal, - const QList& args) -{ - d->signalReceived(interface, signal, args); -} - - -void Icd::icdCallReply(const QString& method, - const QList& args, - const QString& error) -{ - d->callReply(method, args, error); -} - - -QString Icd::error() -{ - return d->error(); -} - -} // Maemo namespace - - diff --git a/src/3rdparty/libconninet/src/maemo_icd.h b/src/3rdparty/libconninet/src/maemo_icd.h deleted file mode 100644 index d7a8d5b..0000000 --- a/src/3rdparty/libconninet/src/maemo_icd.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#ifndef MAEMO_ICD_H -#define MAEMO_ICD_H - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "dbusdispatcher.h" -#include - -#define ICD_LONG_SCAN_TIMEOUT (30*1000) /* 30sec */ -#define ICD_SHORT_SCAN_TIMEOUT (10*1000) /* 10sec */ -#define ICD_SHORT_CONNECT_TIMEOUT (10*1000) /* 10sec */ -#define ICD_LONG_CONNECT_TIMEOUT (150*1000) /* 2.5min */ - -namespace Maemo { - -struct CommonParams { - QString service_type; - uint service_attrs; - QString service_id; - QString network_type; - uint network_attrs; - QByteArray network_id; -}; - -struct ConnectParams { - struct CommonParams connect; -}; - -struct IcdScanResult { - uint status; // see #icd_scan_status - uint timestamp; // when last seen - QString service_name; - uint service_priority; // within a service type - QString network_name; - uint network_priority; - struct CommonParams scan; - uint signal_strength; // quality, 0 (none) - 10 (good) - QString station_id; // e.g. MAC address or similar id - uint signal_dB; // use signal strength above unless you know what you are doing - - IcdScanResult() { - status = timestamp = scan.service_attrs = service_priority = - scan.network_attrs = network_priority = signal_strength = - signal_dB = 0; - } -}; - -struct IcdConnectResult { - struct CommonParams connect; - uint status; -}; - -struct IcdStateResult { - struct CommonParams params; - QString error; - uint state; -}; - -struct IcdStatisticsResult { - struct CommonParams params; - uint time_active; // in seconds - enum icd_nw_levels signal_strength; // see network_api_defines.h in icd2-dev package - uint bytes_sent; - uint bytes_received; -}; - -struct IcdIPInformation { - QString address; - QString netmask; - QString default_gateway; - QString dns1; - QString dns2; - QString dns3; -}; - -struct IcdAddressInfoResult { - struct CommonParams params; - QList ip_info; -}; - -enum IcdDbusInterfaceVer { - IcdOldDbusInterface = 0, // use the old OSSO-IC interface - IcdNewDbusInterface // use the new Icd2 interface (default) -}; - - -class IcdPrivate; -class Icd : public QObject -{ - Q_OBJECT - -public: - Icd(QObject *parent = 0); - Icd(unsigned int timeout, QObject *parent = 0); - Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent = 0); - ~Icd(); - QString error(); // returns last error string - - /* Icd2 dbus API functions */ - QStringList scan(icd_scan_request_flags flags, - QStringList &network_types, - QList& scan_results, - QString& error); - void scanCancel(); - bool connect(icd_connection_flags flags, IcdConnectResult& result); - bool connect(icd_connection_flags flags, QList& params, - IcdConnectResult& result); - bool connect(icd_connection_flags flags, QString& iap, QString& result); - void select(uint flags); - void disconnect(uint connect_flags, QString& service_type, - uint service_attrs, QString& service_id, - QString& network_type, uint network_attrs, - QByteArray& network_id); - void disconnect(uint connect_flags); - - uint state(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStateResult &state_result); - uint statistics(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStatisticsResult& stats_result); - uint addrinfo(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdAddressInfoResult& addr_result); - - uint state(QList& state_results); - uint state_non_blocking(QList& state_results); - uint statistics(QList& stats_results); - uint addrinfo(QList& addr_results); - uint addrinfo_non_blocking(QList& addr_results); - -private Q_SLOTS: - void icdSignalReceived(const QString& interface, - const QString& signal, - const QList& args); - void icdCallReply(const QString& method, - const QList& args, - const QString& error); - -private: - IcdPrivate *d; - friend class IcdPrivate; -}; - -} // Maemo namespace - -#endif diff --git a/src/3rdparty/libconninet/src/proxyconf.cpp b/src/3rdparty/libconninet/src/proxyconf.cpp deleted file mode 100644 index 5b27565..0000000 --- a/src/3rdparty/libconninet/src/proxyconf.cpp +++ /dev/null @@ -1,315 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#include -#include -#include -#include -#include -#include -#include "proxyconf.h" - -#define CONF_PROXY "/system/proxy" -#define HTTP_PROXY "/system/http_proxy" - - -namespace Maemo { - -class NetworkProxyFactory : QNetworkProxyFactory { -public: - NetworkProxyFactory() { } - QList queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery()); -}; - - -QList NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query) -{ - ProxyConf proxy_conf; - - QList result = proxy_conf.flush(query); - if (result.isEmpty()) - result << QNetworkProxy::NoProxy; - - return result; -} - - -class ProxyConfPrivate { -private: - // proxy values from gconf - QString mode; - bool use_http_host; - QString autoconfig_url; - QString http_proxy; - quint16 http_port; - QList ignore_hosts; - QString secure_host; - quint16 secure_port; - QString ftp_host; - quint16 ftp_port; - QString socks_host; - quint16 socks_port; - QString rtsp_host; - quint16 rtsp_port; - - QVariant getValue(QString& name); - QVariant getHttpValue(QString& name); - QVariant getValue(const char *name); - QVariant getHttpValue(const char *name); - bool isHostExcluded(const QString &host); - -public: - QString prefix; - QString http_prefix; - - void readProxyData(); - QList flush(const QNetworkProxyQuery &query); -}; - - -QVariant ProxyConfPrivate::getValue(QString& name) -{ - GConfItem item(prefix + name); - return item.value(); -} - -QVariant ProxyConfPrivate::getHttpValue(QString& name) -{ - GConfItem item(http_prefix + name); - return item.value(); -} - - -QVariant ProxyConfPrivate::getValue(const char *name) -{ - QString n = QString(name); - return getValue(n); -} - -QVariant ProxyConfPrivate::getHttpValue(const char *name) -{ - QString n = QString(name); - return getHttpValue(n); -} - - -#define GET(var, type) \ - do { \ - var = getValue(#var).to##type (); \ - /*qDebug()<<"var="<prefix = CONF_PROXY "/"; - d_ptr->http_prefix = HTTP_PROXY "/"; -} - -ProxyConf::~ProxyConf() -{ - delete d_ptr; -} - - -QList ProxyConf::flush(const QNetworkProxyQuery &query) -{ - d_ptr->readProxyData(); - return d_ptr->flush(query); -} - - -static int refcount = 0; -static QReadWriteLock lock; - -void ProxyConf::update() -{ - QWriteLocker locker(&lock); - NetworkProxyFactory *factory = new NetworkProxyFactory(); - QNetworkProxyFactory::setApplicationProxyFactory((QNetworkProxyFactory*)factory); - refcount++; -} - - -void ProxyConf::clear(void) -{ - QWriteLocker locker(&lock); - refcount--; - if (refcount == 0) - QNetworkProxyFactory::setApplicationProxyFactory(NULL); - - if (refcount<0) - refcount = 0; -} - - -} // namespace Maemo diff --git a/src/3rdparty/libconninet/src/proxyconf.h b/src/3rdparty/libconninet/src/proxyconf.h deleted file mode 100644 index 7711c49..0000000 --- a/src/3rdparty/libconninet/src/proxyconf.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#ifndef PROXYCONF_H -#define PROXYCONF_H - -#include -#include - -namespace Maemo { - -class ProxyConfPrivate; -class ProxyConf { -private: - ProxyConfPrivate *d_ptr; - -public: - ProxyConf(); - virtual ~ProxyConf(); - - QList flush(const QNetworkProxyQuery &query = QNetworkProxyQuery()); // read the proxies from db - - /* Note that for each update() call there should be corresponding - * clear() call because the ProxyConf class implements a reference - * counting mechanism. The factory is removed only when there is - * no one using the factory any more. - */ - static void update(void); // this builds QNetworkProxy factory - static void clear(void); // this removes QNetworkProxy factory -}; - -} // namespace Maemo - -#endif diff --git a/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp b/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp deleted file mode 100644 index 70deb3f..0000000 --- a/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp +++ /dev/null @@ -1,191 +0,0 @@ -/* * This file is part of conn-dui-settings-inet * - * - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * - * Contact: Aapo Makela - * - * This software, including documentation, is protected by copyright - * controlled by Nokia Corporation. All rights are reserved. Copying, - * including reproducing, storing, adapting or translating, any or all of - * this material requires the prior written consent of Nokia Corporation. - * This material also contains confidential information which may not be - * disclosed to others without the prior written consent of Nokia. - */ - -#include -#include -#include -#include -#include - -#include - -class Ut_DBusDispatcher : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void init(); - void cleanup(); - void initTestCase(); - void cleanupTestCase(); - - void simpleSignalReceived(const QString& interface, - const QString& signal, - const QList& args); - void simpleCallReply(const QString& method, - const QList& args, - const QString& error); - void simpleCall(); - - void complexCallReply(const QString& method, - const QList& args, - const QString& error); - void complexCall(); - -private: - Maemo::DBusDispatcher *mSubject; - QProcess *icd_stub; - - QString mMethod; - QString mInterface; - QString mSignal; - QList mArgs; -}; - -void Ut_DBusDispatcher::init() -{ - mSubject = new Maemo::DBusDispatcher("com.nokia.icd2", "/com/nokia/icd2", - "com.nokia.icd2"); - - // Start icd2 stub - icd_stub = new QProcess(this); - icd_stub->start("/usr/bin/icd2_stub.py"); - QTest::qWait(1000); -} - -void Ut_DBusDispatcher::cleanup() -{ - // Terminate icd2 stub - icd_stub->terminate(); - icd_stub->waitForFinished(); - - delete mSubject; - mSubject = 0; -} - -void Ut_DBusDispatcher::initTestCase() -{ -} - -void Ut_DBusDispatcher::cleanupTestCase() -{ -} - -void Ut_DBusDispatcher::simpleSignalReceived(const QString& interface, - const QString& signal, - const QList& args) -{ - // Signal handler, which simply records what has been signalled - mInterface = interface; - mSignal = signal; - mArgs = args; -} - -void Ut_DBusDispatcher::simpleCallReply(const QString& method, - const QList& args, - const QString& error) -{ - mMethod = method; - - // Check that method matches and at least WLAN_INFRA is returned - QVERIFY(error.isEmpty()); - QVERIFY(args[0].toStringList().contains("WLAN_INFRA")); -} - -void Ut_DBusDispatcher::simpleCall() -{ - uint flags = 0; - QList reply; - int idx = 0; - QTimer timer; - - // Connect signals - connect(mSubject, SIGNAL(signalReceived(const QString&, - const QString&, - const QList&)), - this, SLOT(simpleSignalReceived(const QString&, - const QString&, - const QList&))); - connect(mSubject, SIGNAL(callReply(const QString&, - const QList&, - const QString&)), - this, SLOT(simpleCallReply(const QString&, - const QList&, - const QString&))); - - // Request scan and verify the call starts succesfully - QVERIFY(mSubject->callAsynchronous("scan_req", flags)); - - // Wait 1st scan signal for 10 secs - timer.setSingleShot(true); - timer.start(10000); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - idx++; - } - timer.stop(); - - // Sanity checks for the scan result - QVERIFY(mInterface == "com.nokia.icd2"); // interface is icd2 - QVERIFY(mMethod == "scan_req"); // method is scan_req - QVERIFY(mSignal == "scan_result_sig"); // signal is scan result - QVERIFY(mArgs[0] == QVariant(0) || - mArgs[0] == QVariant(4)); // First argument is status - // (0 == NEW, 4 == COMPLETED) - //QVERIFY(mArgs.contains(QVariant("WLAN_INFRA"))); // WLAN scan result -} - -void Ut_DBusDispatcher::complexCallReply(const QString& method, - const QList& args, - const QString& error) -{ - mMethod = method; - - // Check that method has not return arguments and error is not set - QVERIFY(error.isEmpty()); - QVERIFY(args.isEmpty()); -} - -void Ut_DBusDispatcher::complexCall() -{ - uint flags = ICD_CONNECTION_FLAG_UI_EVENT; - QList reply; - QVariantList networks; - QVariantList network1; - - network1 << "" << (uint)0 << "" << "WLAN_INFRA" << (uint)0x05000011 << QByteArray("osso@46@net"); - networks << QVariant(network1); - - // Connect signal - connect(mSubject, SIGNAL(callReply(const QString&, - const QList&, - const QString&)), - this, SLOT(complexCallReply(const QString&, - const QList&, - const QString&))); - - // Request connect and verify the call starts succesfully - QVERIFY(mSubject->callAsynchronous("connect_req", flags, networks)); - - QTest::qWait(1000); - - // Sanity checks for the scan result - QVERIFY(mInterface == "com.nokia.icd2"); // interface is icd2 - QVERIFY(mMethod == "connect_req"); // method connect_req -} - -QTEST_MAIN(Ut_DBusDispatcher) - -#include "ut_dbusdispatcher.moc" diff --git a/src/3rdparty/libconninet/tests/ut_iapconf.cpp b/src/3rdparty/libconninet/tests/ut_iapconf.cpp deleted file mode 100644 index 6a91d61..0000000 --- a/src/3rdparty/libconninet/tests/ut_iapconf.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009 Nokia Corporation. All rights reserved. - - Contact: Aapo Makela - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - - -#include -#include - -#include - -class Ut_IAPConf : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void init(); - void cleanup(); - void initTestCase(); - void cleanupTestCase(); - - void setupIAP(); - void setupIAPContainingDot(); - void unsetIAPValueIsNotValid(); - void verifyAllIAPs(); - void allForEmptyConfReturnsEmptyList(); - void settingInvalidValueUnsetsKey(); - -private: - Maemo::IAPConf *mSubject; -}; - -void Ut_IAPConf::init() -{ - mSubject = new Maemo::IAPConf("test_iap"); -} - -void Ut_IAPConf::cleanup() -{ - // Clear made settings - mSubject->clear(); - - delete mSubject; - mSubject = 0; -} - -void Ut_IAPConf::initTestCase() -{ -} - -void Ut_IAPConf::cleanupTestCase() -{ -} - -void Ut_IAPConf::setupIAP() -{ - // Set bunch of values - mSubject->set("ipv4_type", "AUTO", - "wlan_wepkey1", "connt", - "wlan_wepdefkey", 1, - "wlan_ssid", QByteArray("CONNTEST-1")); - - // Set one value - mSubject->setValue("type", "WLAN_INFRA"); - - // Check all values that they were set correctly - QVERIFY(mSubject->value("ipv4_type").toString() == "AUTO"); - QVERIFY(mSubject->value("wlan_wepkey1").toString() == "connt"); - QVERIFY(mSubject->value("wlan_wepdefkey").toInt() == 1); - QVERIFY(mSubject->value("wlan_ssid").toByteArray() == QByteArray("CONNTEST-1")); - QVERIFY(mSubject->value("type").toString() == "WLAN_INFRA"); -} - -void Ut_IAPConf::setupIAPContainingDot() -{ - delete mSubject; - mSubject = new Maemo::IAPConf("test.iap"); - - // Set and check one value - mSubject->setValue("type", "DUMMY"); - QVERIFY(mSubject->value("type").toString() == "DUMMY"); -} - -void Ut_IAPConf::unsetIAPValueIsNotValid() -{ - QVariant invalidValue = mSubject->value("this_value_does_not_exist"); - QVERIFY(invalidValue.isValid() == false); -} - -void Ut_IAPConf::verifyAllIAPs() -{ - int count = 0, extras = 0; - QRegExp regexp("iap[1-3]"); - Maemo::IAPConf iap1("iap1"); - Maemo::IAPConf iap2("iap2"); - Maemo::IAPConf iap3("iap3"); - - iap1.clear(); - iap2.clear(); - iap3.clear(); - - iap1.setValue("name", "iap1"); - iap2.setValue("name", "iap2"); - iap3.setValue("name", "iap3"); - - count = extras = 0; - QList iaps; - Maemo::IAPConf::getAll(iaps, true); - foreach (QString iap_path, iaps) { - QString iap_id = iap_path.section('/', 5); /* This is the IAP id */ - if (!iap_id.contains(regexp)) { - extras++; - continue; - } - Maemo::IAPConf iap(iap_id); - QString name = iap.value("name").toString(); - QVERIFY(name == iap_id); - count++; - } - QCOMPARE(count, iaps.size()-extras); - - iap1.clear(); - iap2.clear(); - iap3.clear(); - - iap1.setValue("name", "iap1"); - iap2.setValue("name", "iap2"); - iap3.setValue("name", "iap3"); - - count = extras = 0; - Maemo::IAPConf::getAll(iaps); - foreach (QString iap_id, iaps) { - if (!iap_id.contains(regexp)) { - extras++; - continue; - } - Maemo::IAPConf iap(iap_id); - QString name = iap.value("name").toString(); - QVERIFY(name == iap_id); - count++; - } - QCOMPARE(count, iaps.size()-extras); -} - -void Ut_IAPConf::allForEmptyConfReturnsEmptyList() -{ - // Clear everything in configuration - mSubject->clearAll(); - - // Get all for a list and check that it is empty - QStringList iaps; - mSubject->getAll(iaps); - QVERIFY(iaps.isEmpty()); -} - -void Ut_IAPConf::settingInvalidValueUnsetsKey() -{ - // Setup some IAP - setupIAP(); - - // Set invalid value to unset "wlan_wepdefkey" key and verify that the - // value is unset - mSubject->setValue("wlan_wepdefkey", QVariant()); - QVERIFY(!mSubject->value("wlan_wepdefkey").isValid()); -} - -QTEST_MAIN(Ut_IAPConf) - -#include "ut_iapconf.moc" diff --git a/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp b/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp deleted file mode 100644 index f14f623..0000000 --- a/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - - -#include -#include - -#include -#include - -static const char *iap_id = "test_monitor_1"; - -class TestIAPMonitor : public Maemo::IAPMonitor -{ -public: - QString addedIap; - QString removedIap; - -protected: - virtual void iapAdded(const QString &id) - { - addedIap = id; - } - - virtual void iapRemoved(const QString &id) - { - removedIap = id; - } -}; - -class Ut_IAPMonitor : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void init(); - void cleanup(); - void initTestCase(); - void cleanupTestCase(); - - void check(); - -private: - TestIAPMonitor *mon; - Maemo::IAPConf *iap; -}; - -void Ut_IAPMonitor::init() -{ - mon = new TestIAPMonitor; -} - -void Ut_IAPMonitor::cleanup() -{ - delete mon; - mon = 0; -} - -void Ut_IAPMonitor::initTestCase() -{ -} - -void Ut_IAPMonitor::cleanupTestCase() -{ -} - -void Ut_IAPMonitor::check() -{ - QVERIFY(mon->addedIap.isEmpty()); - - iap = new Maemo::IAPConf(iap_id); - iap->set("ipv4_type", "AUTO", - "wlan_wepkey1", "connt", - "wlan_wepdefkey", 1, - "wlan_ssid", QByteArray(iap_id)); - - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - QVERIFY(mon->addedIap == iap_id); - mon->addedIap.clear(); - - QVERIFY(mon->removedIap.isEmpty()); - - // Unset only one value and verify that IAP is not removed - iap->set("ipv4_type", QVariant()); - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - QVERIFY(mon->removedIap.isEmpty()); - - // Clear the whole IAP and check that it is removed - iap->clear(); - delete iap; - - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - - QVERIFY(mon->removedIap == iap_id); -} - -QTEST_MAIN(Ut_IAPMonitor) - -#include "ut_iapmonitor.moc" diff --git a/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp b/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp deleted file mode 100644 index 494829d..0000000 --- a/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * - * Contact: Jukka Rissanen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 2.1 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ - - -// !!!! -// !!!! NOTE: THESE TEST DO NOT REALLY WORK YET BECAUSE OF MISSING -// !!!! FUNCTIONALITY IN ICD2 STUB. YOU HAVE BEEN WARNED. -// !!!! - - -#include -#include -#include -#include -#include - -#include "maemo_icd.h" - -class Ut_MaemoIcd : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void init(); - void cleanup(); - void initTestCase(); - void cleanupTestCase(); - - void scan_req(); - void scan_cancel_req(); - void connect_req_default(); - void state_req_all(); - void state_req(); - void statistics_req_all(); - void statistics_req(); - void addrinfo_req_all(); - void addrinfo_req(); - -private: - void disconnect_req_default(); // this is currently not run - void connect_req_specific(); // this is currently not run - QProcess *icd_stub; - bool connect_iap(Maemo::IcdConnectResult &connect_result, - QString &result, - QString &error, - QString iap=QString()); -}; - - -QString create_error_str(Maemo::Icd &icd) -{ - return icd.error(); -} - - -void Ut_MaemoIcd::init() -{ - icd_stub = new QProcess(this); - icd_stub->setStandardOutputFile("/tmp/ut_maemo_icd.log"); - icd_stub->start("/usr/bin/icd2_stub.py"); - QTest::qWait(1000); - - // Set the statistics - QProcess dbus_send; - dbus_send.start("dbus-send --type=method_call --system " - "--dest=com.nokia.icd2 /com/nokia/icd2 " - "com.nokia.icd2.testing.set_statistics " - "uint32:1024 uint32:256"); - dbus_send.waitForFinished(); - -} - -void Ut_MaemoIcd::cleanup() -{ - icd_stub->terminate(); - icd_stub->waitForFinished(); -} - -void Ut_MaemoIcd::initTestCase() -{ -} - -void Ut_MaemoIcd::cleanupTestCase() -{ -} - -void Ut_MaemoIcd::scan_req() -{ - QList scanned; - QStringList scannedNetworkTypes; - QStringList networkTypesToScan; - QString error; - Maemo::Icd icd(ICD_SHORT_SCAN_TIMEOUT); - - scannedNetworkTypes = icd.scan(ICD_SCAN_REQUEST_ACTIVE, - networkTypesToScan, - scanned, - error); - QVERIFY(error.isEmpty()); - QCOMPARE(scanned.size(), 3); - QVERIFY(scannedNetworkTypes[0] == "WLAN_INFRA"); - QVERIFY(scannedNetworkTypes[1] == "DUN_GSM_PS"); -} - -void Ut_MaemoIcd::scan_cancel_req() -{ - Maemo::Icd icd; - icd.scanCancel(); - // Not much to verify here -} - -bool Ut_MaemoIcd::connect_iap(Maemo::IcdConnectResult &connect_result, - QString &result, - QString &error, - QString iap) -{ - icd_connection_flags flags = ICD_CONNECTION_FLAG_USER_EVENT; - bool st; - Maemo::Icd icd(ICD_SHORT_CONNECT_TIMEOUT); - - if (iap.isEmpty()) { - qDebug() << "connecting to default IAP"; - st = icd.connect(flags, connect_result); - } else { - qDebug() << "connecting to" << iap; - st = icd.connect(flags, iap, result); - } - - error = create_error_str(icd); - return st; -} - -void Ut_MaemoIcd::connect_req_default() -{ - Maemo::IcdConnectResult connect_result; - QString result, error; - bool st; - st = connect_iap(connect_result, result, error); - QVERIFY2(st, error.toAscii().data()); - result = connect_result.connect.network_id.data(); - qDebug() << result; -} - - -void Ut_MaemoIcd::disconnect_req_default() -{ - icd_connection_flags flags = ICD_CONNECTION_FLAG_USER_EVENT; - bool st; - Maemo::Icd icd(ICD_SHORT_CONNECT_TIMEOUT); - icd.disconnect(flags); -} - - -void Ut_MaemoIcd::connect_req_specific() -{ - Maemo::IcdConnectResult connect_result; - QString result; - QString error; - bool st; - st = connect_iap(connect_result, result, error, "wpa2gx2.osso.net"); - QVERIFY2(st, error.toAscii().data()); - qDebug() << result; -} - - -void Ut_MaemoIcd::state_req_all() -{ - QList state_results; - Maemo::Icd icd; - int sig; - sig = icd.state(state_results); - QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); -} - - -void Ut_MaemoIcd::state_req() -{ - Maemo::IcdStateResult state_result; - Maemo::Icd icd; - int sig; - QString service_type, service_id; - QString network_type("WLAN_INFRA"); - QByteArray network_id("wpa2gx2.osso.net"); - sig = icd.state(service_type, 0, service_id, - network_type, (uint)0x17a1, network_id, - state_result); - QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); -} - - -void Ut_MaemoIcd::statistics_req_all() -{ - QList stats_results; - Maemo::Icd icd; - int sig; - QString err; - sig = icd.statistics(stats_results); - err = create_error_str(icd); - if (!err.isEmpty()) - QVERIFY2(sig==1, err.toAscii().data()); - else - QCOMPARE(sig, 1); - - for(int i=0; i addr_results; - Maemo::Icd icd; - int sig; - sig = icd.addrinfo(addr_results); - QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); -} - - -void Ut_MaemoIcd::addrinfo_req() -{ - Maemo::IcdAddressInfoResult addr_result; - Maemo::Icd icd; - int sig; - QString service_type, service_id; - QString network_type("WLAN_INFRA"); - QByteArray network_id("wpa2gx2.osso.net"); - sig = icd.addrinfo(service_type, 0, service_id, - network_type, (uint)0x17a1, network_id, - addr_result); - QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); -} - - -QTEST_MAIN(Ut_MaemoIcd) - -#include "ut_maemo_icd.moc" diff --git a/src/3rdparty/libconninet/tests/ut_proxyconf.cpp b/src/3rdparty/libconninet/tests/ut_proxyconf.cpp deleted file mode 100644 index 1f407f0..0000000 --- a/src/3rdparty/libconninet/tests/ut_proxyconf.cpp +++ /dev/null @@ -1,400 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - - -#include -#include -#include -#include - -#include "../src/proxyconf.h" - -class Ut_ProxyConf : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void init(); - void cleanup(); - void initTestCase(); - void cleanupTestCase(); - - // tests without the factory - void proxy_ftp_no_factory_ok_auto(); - void proxy_ftp_no_factory_ok_manual(); - void proxy_http_no_factory_ok_manual(); - void proxy_https_no_factory_ok_manual(); - void proxy_socks_no_factory_ok_manual(); - void proxy_default_no_factory_ok_manual(); - - // tests using the factory - void proxy_ftp_factory_ok_auto(); - void proxy_ftp_factory_ok_manual(); - void proxy_http_factory_ok_manual(); - void proxy_https_factory_ok_manual(); - void proxy_socks_factory_ok_manual(); - void proxy_http_factory_ok_manual_clear(); - void proxy_default_factory_ok_manual(); - void proxy_http_factory_ok_manual_ignore_list(); - void proxy_default_factory_ok_manual_system(); - -private: - Maemo::ProxyConf *pc; -}; - - -void put(QString var, QString type, QString value) -{ - QProcess gconf; - if (value.isEmpty()) - gconf.start(QString("gconftool-2 -u /system/proxy/"+var)); - else - gconf.start(QString("gconftool-2 -s /system/proxy/"+var+" -t "+type+" "+value)); - gconf.waitForFinished(); -} - -void put_http(QString var, QString type, QString value) -{ - QProcess gconf; - if (value.isEmpty()) - gconf.start(QString("gconftool-2 -u /system/http_proxy/"+var)); - else - gconf.start(QString("gconftool-2 -s /system/http_proxy/"+var+" -t "+type+" "+value)); - gconf.waitForFinished(); -} - -void put_list(QString var, QString type, QList value) -{ - QProcess gconf; - QString values = "["; - foreach (QString str, value) - values = values + str + ","; - values.chop(1); - values = values + "]"; - - gconf.start(QString("gconftool-2 -s /system/http_proxy/"+var+" -t list --list-type="+type+" "+values)); - gconf.waitForFinished(); -} - - -void Ut_ProxyConf::init() -{ - put_http("host", "string", "my.proxy.com"); - put_http("port", "int", "8080"); - - QList list; - list.append("foo.bar.com"); - list.append("192.168.19.69"); - list.append("192.168.20.0/24"); - list.append("bar.foo.com"); - put_list("ignore_hosts", "string", list); - put_http("use_http_host", "boolean", "true"); - - put("mode", "string", "auto"); - put("autoconfig_url", "string", "http://foo.bar.com/autoconf"); - put("secure_host", "string", "secure_host.com"); - put("secure_port", "int", "112"); - - put("ftp_host", "string", "ftp.nuukia.com"); - put("ftp_port", "int", "2000"); - put("socks_host", "string", "socks.host.com"); - put("socks_port", "int", "10080"); - put("rtsp_host", "string", "rtsp.voice.com"); - put("rtsp_port", "int", "1554"); - - pc = new Maemo::ProxyConf(); -} - -void Ut_ProxyConf::cleanup() -{ - delete pc; - pc = 0; -} - -void Ut_ProxyConf::initTestCase() -{ -} - -void Ut_ProxyConf::cleanupTestCase() -{ -} - - -void Ut_ProxyConf::proxy_ftp_no_factory_ok_auto() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); - - nplist = pc->flush(query); - QVERIFY(nplist.length()==0); -} - - -void Ut_ProxyConf::proxy_ftp_no_factory_ok_manual() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); - - put("mode", "string", "manual"); - - nplist = pc->flush(query); - foreach (QNetworkProxy proxy, nplist) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(nplist.length()==3); - QVERIFY(nplist.first().type() == QNetworkProxy::FtpCachingProxy); -} - - -void Ut_ProxyConf::proxy_http_no_factory_ok_manual() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - - put("mode", "string", "manual"); - - nplist = pc->flush(query); - foreach (QNetworkProxy proxy, nplist) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(nplist.length()==3); - QVERIFY(nplist.first().type() == QNetworkProxy::HttpProxy); -} - - -void Ut_ProxyConf::proxy_https_no_factory_ok_manual() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("https://maps.google.com/")); - - put("mode", "string", "manual"); - - nplist = pc->flush(query); - foreach (QNetworkProxy proxy, nplist) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(nplist.length()==2); - QVERIFY(nplist.first().type() == QNetworkProxy::HttpProxy); -} - - -void Ut_ProxyConf::proxy_socks_no_factory_ok_manual() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - - put("mode", "string", "manual"); - put_http("host", "string", ""); - - nplist = pc->flush(query); - foreach (QNetworkProxy proxy, nplist) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(nplist.length()==2); - QVERIFY(nplist.first().type() == QNetworkProxy::Socks5Proxy); -} - - -void Ut_ProxyConf::proxy_default_no_factory_ok_manual() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("foobar://maps.google.com/")); - - put("mode", "string", "manual"); - put("socks_host", "string", ""); - put("secure_host", "string", ""); - - nplist = pc->flush(query); - foreach (QNetworkProxy proxy, nplist) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(nplist.length()==0); -} - - -void Ut_ProxyConf::proxy_ftp_factory_ok_auto() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); - Maemo::ProxyConf::update(); - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - QVERIFY(listOfProxies.length()==1); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_ftp_factory_ok_manual() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==3); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::FtpCachingProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_http_factory_ok_manual() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==3); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_https_factory_ok_manual() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("https://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==2); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_socks_factory_ok_manual() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - put_http("host", "string", ""); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==2); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::Socks5Proxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_http_factory_ok_manual_clear() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - put_http("host", "string", "192.168.1.1"); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==3); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); - - Maemo::ProxyConf::clear(); - listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - QVERIFY(listOfProxies.length()==1); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); -} - - -void Ut_ProxyConf::proxy_default_factory_ok_manual() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("foobar://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - put("socks_host", "string", ""); - put("secure_host", "string", ""); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - QVERIFY(listOfProxies.length()==1); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_http_factory_ok_manual_ignore_list() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://192.168.19.70/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==3); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); - - query = QNetworkProxyQuery(QUrl("http://192.168.20.10/")); - listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - QVERIFY(listOfProxies.length()==1); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_default_factory_ok_manual_system() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - - QList listOfProxies = QNetworkProxyFactory::systemProxyForQuery(query); - - QVERIFY(listOfProxies.length()==1); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); - Maemo::ProxyConf::clear(); -} - - - - -QTEST_MAIN(Ut_ProxyConf) - -#include "ut_proxyconf.moc" -- cgit v0.12 From d31b4c4853117d138dbdf1921c07c577850314fd Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Thu, 16 Sep 2010 12:41:58 +1000 Subject: Update add libconninet version 0.45. --- src/3rdparty/libconninet/AUTHORS | 0 src/3rdparty/libconninet/COPYING | 510 ++++++++ src/3rdparty/libconninet/ChangeLog | 0 src/3rdparty/libconninet/INSTALL | 229 ++++ src/3rdparty/libconninet/NEWS | 0 src/3rdparty/libconninet/README | 0 src/3rdparty/libconninet/autogen.sh | 3 + src/3rdparty/libconninet/configure.ac | 86 ++ src/3rdparty/libconninet/conninet.pc.in | 11 + src/3rdparty/libconninet/debian/changelog | 305 +++++ src/3rdparty/libconninet/debian/compat | 1 + src/3rdparty/libconninet/debian/control | 39 + src/3rdparty/libconninet/debian/copyright | 19 + .../libconninet/debian/libconninet0-dev.dirs | 2 + .../libconninet/debian/libconninet0-dev.files | 4 + src/3rdparty/libconninet/debian/libconninet0.dirs | 1 + src/3rdparty/libconninet/debian/libconninet0.files | 1 + src/3rdparty/libconninet/debian/rules | 123 ++ src/3rdparty/libconninet/doxygen.cfg.in | 1147 +++++++++++++++++ src/3rdparty/libconninet/src/dbusdispatcher.cpp | 611 +++++++++ src/3rdparty/libconninet/src/dbusdispatcher.h | 91 ++ src/3rdparty/libconninet/src/iapconf.cpp | 299 +++++ src/3rdparty/libconninet/src/iapconf.h | 84 ++ src/3rdparty/libconninet/src/iapmonitor.cpp | 110 ++ src/3rdparty/libconninet/src/iapmonitor.h | 48 + src/3rdparty/libconninet/src/maemo_icd.cpp | 1316 ++++++++++++++++++++ src/3rdparty/libconninet/src/maemo_icd.h | 182 +++ src/3rdparty/libconninet/src/proxyconf.cpp | 392 ++++++ src/3rdparty/libconninet/src/proxyconf.h | 53 + .../libconninet/tests/ut_dbusdispatcher.cpp | 191 +++ src/3rdparty/libconninet/tests/ut_iapconf.cpp | 186 +++ src/3rdparty/libconninet/tests/ut_iapmonitor.cpp | 118 ++ src/3rdparty/libconninet/tests/ut_maemo_icd.cpp | 274 ++++ src/3rdparty/libconninet/tests/ut_proxyconf.cpp | 400 ++++++ 34 files changed, 6836 insertions(+) create mode 100644 src/3rdparty/libconninet/AUTHORS create mode 100644 src/3rdparty/libconninet/COPYING create mode 100644 src/3rdparty/libconninet/ChangeLog create mode 100644 src/3rdparty/libconninet/INSTALL create mode 100644 src/3rdparty/libconninet/NEWS create mode 100644 src/3rdparty/libconninet/README create mode 100755 src/3rdparty/libconninet/autogen.sh create mode 100644 src/3rdparty/libconninet/configure.ac create mode 100644 src/3rdparty/libconninet/conninet.pc.in create mode 100644 src/3rdparty/libconninet/debian/changelog create mode 100644 src/3rdparty/libconninet/debian/compat create mode 100644 src/3rdparty/libconninet/debian/control create mode 100644 src/3rdparty/libconninet/debian/copyright create mode 100644 src/3rdparty/libconninet/debian/libconninet0-dev.dirs create mode 100644 src/3rdparty/libconninet/debian/libconninet0-dev.files create mode 100644 src/3rdparty/libconninet/debian/libconninet0.dirs create mode 100644 src/3rdparty/libconninet/debian/libconninet0.files create mode 100755 src/3rdparty/libconninet/debian/rules create mode 100644 src/3rdparty/libconninet/doxygen.cfg.in create mode 100644 src/3rdparty/libconninet/src/dbusdispatcher.cpp create mode 100644 src/3rdparty/libconninet/src/dbusdispatcher.h create mode 100644 src/3rdparty/libconninet/src/iapconf.cpp create mode 100644 src/3rdparty/libconninet/src/iapconf.h create mode 100644 src/3rdparty/libconninet/src/iapmonitor.cpp create mode 100644 src/3rdparty/libconninet/src/iapmonitor.h create mode 100644 src/3rdparty/libconninet/src/maemo_icd.cpp create mode 100644 src/3rdparty/libconninet/src/maemo_icd.h create mode 100644 src/3rdparty/libconninet/src/proxyconf.cpp create mode 100644 src/3rdparty/libconninet/src/proxyconf.h create mode 100644 src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp create mode 100644 src/3rdparty/libconninet/tests/ut_iapconf.cpp create mode 100644 src/3rdparty/libconninet/tests/ut_iapmonitor.cpp create mode 100644 src/3rdparty/libconninet/tests/ut_maemo_icd.cpp create mode 100644 src/3rdparty/libconninet/tests/ut_proxyconf.cpp diff --git a/src/3rdparty/libconninet/AUTHORS b/src/3rdparty/libconninet/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/src/3rdparty/libconninet/COPYING b/src/3rdparty/libconninet/COPYING new file mode 100644 index 0000000..b124cf5 --- /dev/null +++ b/src/3rdparty/libconninet/COPYING @@ -0,0 +1,510 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/src/3rdparty/libconninet/ChangeLog b/src/3rdparty/libconninet/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/src/3rdparty/libconninet/INSTALL b/src/3rdparty/libconninet/INSTALL new file mode 100644 index 0000000..54caf7c --- /dev/null +++ b/src/3rdparty/libconninet/INSTALL @@ -0,0 +1,229 @@ +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/src/3rdparty/libconninet/NEWS b/src/3rdparty/libconninet/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/src/3rdparty/libconninet/README b/src/3rdparty/libconninet/README new file mode 100644 index 0000000..e69de29 diff --git a/src/3rdparty/libconninet/autogen.sh b/src/3rdparty/libconninet/autogen.sh new file mode 100755 index 0000000..a8fd885 --- /dev/null +++ b/src/3rdparty/libconninet/autogen.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +autoreconf --verbose --install --force diff --git a/src/3rdparty/libconninet/configure.ac b/src/3rdparty/libconninet/configure.ac new file mode 100644 index 0000000..72fa98b --- /dev/null +++ b/src/3rdparty/libconninet/configure.ac @@ -0,0 +1,86 @@ +AC_INIT([libconninet], patsubst(esyscmd([dpkg-parsechangelog | sed -n '/^Version: \(.*\)$/ {s//\1/;p}']), [ +]), [jukka.rissanen@nokia.com]) +AM_INIT_AUTOMAKE([foreign]) + +AC_PROG_CXX +AC_PROG_LIBTOOL + +AC_ARG_ENABLE(docs, [ --enable-docs Build DOXYGEN documentation (requires Doxygen)],enable_docs=$enableval,enable_docs=auto) + +AC_PATH_PROG(DOXYGEN, doxygen, no) +AC_MSG_CHECKING([whether to build Doxygen documentation]) + +if test x$DOXYGEN = xno ; then + have_doxygen=no +else + have_doxygen=yes +fi +if test x$enable_docs = xauto ; then + if test x$have_doxygen = xno ; then + enable_docs=no + else + enable_docs=yes + fi +fi +if test x$enable_docs = xyes; then + if test x$have_doxygen = xno; then + AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found]) + else + AC_MSG_RESULT(yes) + fi +else + AC_MSG_RESULT(no) +fi + +AM_CONDITIONAL(DOXYGEN_DOCS_ENABLED, test x$enable_docs = xyes) +AC_SUBST(DOXYGEN) + +PKG_CHECK_MODULES(GLIB, glib-2.0) +AC_SUBST(GLIB_CFLAGS) +AC_SUBST(GLIB_LIBS) + +PKG_CHECK_MODULES(QTCORE, QtCore) +AC_SUBST(QTCORE_CFLAGS) +AC_SUBST(QTCORE_LIBS) + +PKG_CHECK_MODULES(QTNETWORK, QtNetwork) +AC_SUBST(QTNETWORK_CFLAGS) +AC_SUBST(QTNETWORK_LIBS) + +PKG_CHECK_MODULES(QTDBUS, QtDBus) +AC_SUBST(QTDBUS_CFLAGS) +AC_SUBST(QTDBUS_LIBS) + +PKG_CHECK_MODULES(QTTEST, QtTest) +AC_SUBST(QTTEST_CFLAGS) +AC_SUBST(QTTEST_LIBS) + +PKG_CHECK_MODULES(DBUS, dbus-glib-1) +AC_SUBST(DBUS_CFLAGS) +AC_SUBST(DBUS_LIBS) + +PKG_CHECK_MODULES(CONNSETTINGS, connsettings) +AC_SUBST(CONNSETTINGS_CFLAGS) +AC_SUBST(CONNSETTINGS_LIBS) + +PKG_CHECK_MODULES(OSSO_IC, osso-ic) +AC_SUBST(OSSO_IC_CFLAGS) +AC_SUBST(OSSO_IC_LIBS) + +PKG_CHECK_MODULES(ICD_DEV, icd2) +AC_SUBST(ICD_DEV_CFLAGS) +AC_SUBST(ICD_DEV_LIBS) + +PKG_CHECK_MODULES(GCONF, gconf-2.0) +AC_SUBST(GCONF_CFLAGS) +AC_SUBST(GCONF_LIBS) + +CONCFLAGS="-Wall -Werror -Wmissing-prototypes" +AC_SUBST(CONCFLAGS) + +AC_CONFIG_FILES([Makefile \ + src/Makefile \ + tests/Makefile \ + conninet.pc \ + doxygen.cfg]) +AC_OUTPUT diff --git a/src/3rdparty/libconninet/conninet.pc.in b/src/3rdparty/libconninet/conninet.pc.in new file mode 100644 index 0000000..68cdee0 --- /dev/null +++ b/src/3rdparty/libconninet/conninet.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libconninet +Description: Internet Connectivity support library +Version: @VERSION@ +Requires: dbus-1 >= 0.60 glib-2.0 QtCore QtDBus QtGui +Libs: -lconninet +Cflags: -I${includedir}/conninet diff --git a/src/3rdparty/libconninet/debian/changelog b/src/3rdparty/libconninet/debian/changelog new file mode 100644 index 0000000..10e9dec --- /dev/null +++ b/src/3rdparty/libconninet/debian/changelog @@ -0,0 +1,305 @@ +libconninet (0.45) unstable; urgency=low + + * Fixes: NB#187470 - libconninet: add automake to build-deps + + -- Markus Silvan Wed, 25 Aug 2010 09:02:55 +0300 + +libconninet (0.44) unstable; urgency=low + + * Added autoconf to build dependencies + + -- Markus Silvan Wed, 25 Aug 2010 09:02:55 +0300 + +libconninet (0.43) unstable; urgency=low + + * Fixes: NB#184824 - Getting all proxy variables from gconf in one go + which will speedup the HTTP requests done by Qt4.7 webkit + + -- Jukka Rissanen Thu, 12 Aug 2010 10:15:20 +0300 + +libconninet (0.42) unstable; urgency=low + + * Fixes: NB#180536 - Uploads to online services are not working. + This is a regression caused by fix to bug 175098, the timeout was never + expiring when waiting reply from icd. + + -- Jukka Rissanen Mon, 19 Jul 2010 12:23:30 +0300 + +libconninet (0.41) unstable; urgency=low + + * Fixes: NB#175098 - Qt4.7 Webkit crashes when bearer API QNetworkSession + constructor calls QNetworkSession::syncStateWithInterface() which in turn + calls Maemo::state() and Maemo::addrinfo() and webkit expects that event + loop is not run but those function process main loop events. + Now Maemo::state() and Maemo::addrinfo() are changed to be synchronous + and fully blocking functions. The old non-blocking versions are called + Maemo::state_non_blocking() and Maemo::addrinfo_non_blocking(). + + -- Jukka Rissanen Wed, 14 Jul 2010 10:12:47 +0300 + +libconninet (0.40) unstable; urgency=low + + * Fixes: NB#167465 - Unable to open network connection using libbearer + + -- Jukka Rissanen Tue, 11 May 2010 10:47:10 +0300 + +libconninet (0.39) unstable; urgency=low + + * Fixes: NB#167982 - initialize DBus vtable in DBusDispatcher. + + -- Aapo Makela Mon, 10 May 2010 14:42:39 +0300 + +libconninet (0.38) unstable; urgency=low + + * Changing icd2 connect_req to be synchronous as the check for + returned connect signal did not work correctly, this caused a + long timeout when connect() was called. + * Scan sometimes missed results and did not return them to caller. + * HTTP proxy settings were not set correctly. + + -- Jukka Rissanen Thu, 15 Apr 2010 11:25:06 +0300 + +libconninet (0.37) unstable; urgency=low + + * Make proxy config reference counting atomic. + + -- Jukka Rissanen Wed, 3 Mar 2010 13:23:08 +0200 + +libconninet (0.36) unstable; urgency=low + + * Fixes: NB#157586 - Cleanup dbus listener when WLAN scanning object is + deleted. + + -- Jukka Rissanen Fri, 26 Feb 2010 13:30:41 +0200 + +libconninet (0.35) unstable; urgency=low + + * Fixes: NB#156883 - libconninet fails to build under the Platform SDK (SB2) + + -- Jukka Rissanen Thu, 18 Feb 2010 12:14:40 +0200 + +libconninet (0.34) unstable; urgency=low + + * Coverity fix + + -- Jukka Rissanen Tue, 16 Feb 2010 16:38:00 +0200 + +libconninet (0.33) unstable; urgency=low + + * Added API to update Qt proxy config. + + -- Jukka Rissanen Tue, 26 Jan 2010 15:48:36 +0200 + +libconninet (0.32) unstable; urgency=low + + * Fixed IAPConf to unset value when set value is invalid. + * Updated IAPMonitor to use libconnsettings. + + -- Aapo Makela Wed, 03 Feb 2010 07:32:45 +0200 + +libconninet (0.31) unstable; urgency=low + + * Fixes: NB#154892 - Check nulls in IAPConf. + + -- Aapo Makela Mon, 01 Feb 2010 09:32:06 +0200 + +libconninet (0.30) unstable; urgency=low + + * Updated IAPConf to use libconnsettings. + + -- Aapo Makela Fri, 29 Jan 2010 12:58:03 +0200 + +libconninet (0.29) unstable; urgency=low + + * Fixed dependencies + + -- Jukka Rissanen Fri, 15 Jan 2010 10:16:07 +0200 + +libconninet (0.28) unstable; urgency=low + + * Get rid of libdui dependency + + -- Jukka Rissanen Wed, 13 Jan 2010 09:56:26 +0200 + +libconninet (0.27) unstable; urgency=low + + * Insert new pending calls to the list in DBusDispatcher. + + -- Aapo Makela Tue, 22 Dec 2009 14:27:32 +0200 + +libconninet (0.26) unstable; urgency=low + + * Added possibility to specify different signal path for DBusDispatcher. + + -- Aapo Makela Wed, 25 Nov 2009 14:27:34 +0200 + +libconninet (0.25) unstable; urgency=low + + * Fixes: NB#146450 - All scan results were not returned to the caller. + + -- Jukka Rissanen Mon, 16 Nov 2009 17:23:15 +0200 + +libconninet (0.24) unstable; urgency=low + + * Wait all scan results for all network types in Maemo::Icd::scan() + + -- Jukka Rissanen Fri, 6 Nov 2009 14:45:23 +0200 + +libconninet (0.23) unstable; urgency=low + + * Fixes: NB#143361 - Assert failure in session class for GPRS IAP. + + -- Jukka Rissanen Mon, 19 Oct 2009 16:00:14 +0300 + +libconninet (0.22) unstable; urgency=low + + * Fixed the error checking if scan returns 0 results. + + -- Jukka Rissanen Wed, 7 Oct 2009 13:50:27 +0300 + +libconninet (0.21) unstable; urgency=low + + * Support multiple DBusDispatcher classes at the same time. This is + required by Maemo::Icd class so that multiple instances of it can + be used the same time. + + -- Jukka Rissanen Mon, 5 Oct 2009 16:33:43 +0300 + +libconninet (0.20) unstable; urgency=low + + * Fixed memory leak in IAPConf::setValue() + + -- Jukka Rissanen Fri, 2 Oct 2009 13:02:21 +0300 + +libconninet (0.19) unstable; urgency=low + + * Fixed connect_req to one specific IAP in Icd class. + + -- Jukka Rissanen Tue, 29 Sep 2009 17:02:46 +0300 + +libconninet (0.18) unstable; urgency=low + + * Make sure the library will not abort in Icd class if scan does + not return any results. + + -- Jukka Rissanen Tue, 22 Sep 2009 17:00:12 +0300 + +libconninet (0.17) unstable; urgency=low + + * Added IAP monitoring support. + + -- Jukka Rissanen Mon, 21 Sep 2009 16:29:31 +0300 + +libconninet (0.16) unstable; urgency=low + + * Disabled the old osso-ic dbus interface as it is currently not used. + * Fixed the addrinfo request, now addresses are returned correctly to + the caller. + + -- Jukka Rissanen Thu, 17 Sep 2009 15:56:13 +0300 + +libconninet (0.15) unstable; urgency=low + + * Enabling state_req, statistics_req and addrinfo_req support + functions in Maemo::Icd as the corresponding DBUS API functions are + fixed in icd2 v0.89 + + -- Jukka Rissanen Fri, 24 Jul 2009 15:23:02 +0300 + +libconninet (0.14) unstable; urgency=low + + * Icd statistics support added. + * Icd address information support added. + * Icd scan method does not return the final (and empty) result any more. + * Added initial unit test implementation for Icd class. + * Some of the status functions in Icd class disabled because of issues + in icd2 and the dbus api. + + -- Jukka Rissanen Thu, 23 Jul 2009 11:03:05 +0300 + +libconninet (0.13) unstable; urgency=low + + * Added API to get all the configured IAPs. + + -- Jukka Rissanen Tue, 21 Jul 2009 09:47:18 +0300 + +libconninet (0.12) unstable; urgency=low + + * Replaced duivaluespace by Dui in pkg-config file because the + duivaluespace is deprecated. + + -- Jukka Rissanen Mon, 20 Jul 2009 16:00:10 +0300 + +libconninet (0.11) unstable; urgency=low + + * Using libdui instead of libduivaluespace because it is deprecated. + * The IAPConf::clear() uses native gconf API instead of launching gconftool + * Check that state_req call returned list and the list contains entries + before trying to access it. + + -- Jukka Rissanen Mon, 20 Jul 2009 14:55:15 +0300 + +libconninet (0.10) unstable; urgency=low + + * connect() did not return ok when connection succeeded. + + -- Jukka Rissanen Thu, 25 Jun 2009 09:31:21 +0300 + +libconninet (0.9) unstable; urgency=low + + * Connection timeout set to 2.5min, same as in fremantle. + + -- Jukka Rissanen Wed, 17 Jun 2009 13:36:40 +0300 + +libconninet (0.8) unstable; urgency=low + + * Fix state_req signal received from Icd + + -- Jukka Rissanen Thu, 11 Jun 2009 17:19:33 +0300 + +libconninet (0.7) unstable; urgency=low + + * Icd disconnect and select reqs are made synchronous as we do not + wait the return status. The previous async version was causing core + dumps if Icd class was destroyed too early. + + -- Jukka Rissanen Thu, 11 Jun 2009 11:52:36 +0300 + +libconninet (0.6) unstable; urgency=low + + * Fixed the libconninet0-dev dependencies. + + -- Jukka Rissanen Mon, 8 Jun 2009 10:47:56 +0300 + +libconninet (0.5) unstable; urgency=low + + * Fixed missing QObject connect functions. + * Fixed IAPConf to return invalid QVariant if the value does not exist. + + -- Jukka Rissanen Mon, 01 Jun 2009 13:58:53 +0300 + +libconninet (0.4) unstable; urgency=low + + * Fixed QObject signal setting for Maemo::Icd + + -- Jukka Rissanen Wed, 20 May 2009 13:51:11 +0300 + +libconninet (0.3) unstable; urgency=low + + * Refactoring classes + * Added IAPConf class. + + -- Jukka Rissanen Thu, 14 May 2009 13:24:11 +0300 + +libconninet (0.2) unstable; urgency=low + + * Fixed pkgconfig file which had wrong dependency + * Added DBus array and struct support to DBusDispatcher. + + -- Jukka Rissanen Wed, 13 May 2009 12:11:00 +0300 + +libconninet (0.1) unstable; urgency=low + + * Initial Release. + + -- Jukka Rissanen Tue, 12 May 2009 16:10:27 +0200 diff --git a/src/3rdparty/libconninet/debian/compat b/src/3rdparty/libconninet/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/src/3rdparty/libconninet/debian/compat @@ -0,0 +1 @@ +4 diff --git a/src/3rdparty/libconninet/debian/control b/src/3rdparty/libconninet/debian/control new file mode 100644 index 0000000..a2343a0 --- /dev/null +++ b/src/3rdparty/libconninet/debian/control @@ -0,0 +1,39 @@ +Source: libconninet +Priority: optional +Maintainer: Jukka Rissanen +Build-Depends: debhelper (>= 4.0.0), autotools-dev, libglib2.0-dev (>= 2.8), + libdbus-1-dev (>= 0.60), libconnsettings0-dev (>= 0.4), icd2-osso-ic-dev, + icd2-dev, libqt4-dev, libgconf2-dev (>> 2.6.4), autoconf, automake +Standards-Version: 3.6.2 +Section: libs + +Package: libconninet0-dev +Section: libdevel +Architecture: any +Depends: libconninet0 (= ${Source-Version}), libdbus-1-dev (>= 0.60), + libglib2.0-dev (>= 2.8), libconnsettings0-dev (>= 0.4), libqt4-dev, + icd2-osso-ic-dev, icd2-dev, libgconf2-dev (>> 2.6.4) +Description: Internet Connectivity support library development files + Internet Connectivity support library (libconninet) provides common + support functions for connecting to icd2 and accessing configuration + data. + . + This package contains the header files. + +Package: libconninet0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Internet Connectivity support library + Internet Connectivity support library (libconninet) provides common + support functions for connecting to icd2 and accessing configuration + data. + . + This package contains the shared libraries. + +Package: libconninet0-dbg +Section: libs +Architecture: any +Depends: libconninet0 (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Debug symbols for the Internet Connectivity support library + Internet Connectivity support library (libconninet) debug symbols. diff --git a/src/3rdparty/libconninet/debian/copyright b/src/3rdparty/libconninet/debian/copyright new file mode 100644 index 0000000..97e8e68 --- /dev/null +++ b/src/3rdparty/libconninet/debian/copyright @@ -0,0 +1,19 @@ +libconninet - Internet Connectivity support library + +Copyright (C) 2009 Nokia Corporation. All rights reserved. + +Contact: Jukka Rissanen + +This library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License version 2.1 +as published by the Free Software Foundation. + +This library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +02110-1301 USA diff --git a/src/3rdparty/libconninet/debian/libconninet0-dev.dirs b/src/3rdparty/libconninet/debian/libconninet0-dev.dirs new file mode 100644 index 0000000..4418816 --- /dev/null +++ b/src/3rdparty/libconninet/debian/libconninet0-dev.dirs @@ -0,0 +1,2 @@ +usr/lib +usr/include diff --git a/src/3rdparty/libconninet/debian/libconninet0-dev.files b/src/3rdparty/libconninet/debian/libconninet0-dev.files new file mode 100644 index 0000000..78bbac8 --- /dev/null +++ b/src/3rdparty/libconninet/debian/libconninet0-dev.files @@ -0,0 +1,4 @@ +usr/include/* +usr/lib/lib*.so +usr/lib/pkgconfig/* +usr/share/pkgconfig/* diff --git a/src/3rdparty/libconninet/debian/libconninet0.dirs b/src/3rdparty/libconninet/debian/libconninet0.dirs new file mode 100644 index 0000000..6845771 --- /dev/null +++ b/src/3rdparty/libconninet/debian/libconninet0.dirs @@ -0,0 +1 @@ +usr/lib diff --git a/src/3rdparty/libconninet/debian/libconninet0.files b/src/3rdparty/libconninet/debian/libconninet0.files new file mode 100644 index 0000000..d0dbfd1 --- /dev/null +++ b/src/3rdparty/libconninet/debian/libconninet0.files @@ -0,0 +1 @@ +usr/lib/lib*.so.* diff --git a/src/3rdparty/libconninet/debian/rules b/src/3rdparty/libconninet/debian/rules new file mode 100755 index 0000000..2a3d395 --- /dev/null +++ b/src/3rdparty/libconninet/debian/rules @@ -0,0 +1,123 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +# shared library versions, option 1 +#version=2.0.5 +#major=2 +# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so +version=`ls src/.libs/lib*.so.* | \ + awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` +major=`ls src/.libs/lib*.so.* | \ + awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` + +configure: configure.ac debian/changelog + -./autogen.sh + +config.status: configure + dh_testdir + # Add here commands to configure the package. + CFLAGS="$(CFLAGS)" ./configure \ + --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr \ + --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info + + +build: build-stamp +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) distclean +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_movefiles + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip --dbg-package=libconninet0 + dh_compress + dh_fixperms +# dh_perl +# dh_python + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/src/3rdparty/libconninet/doxygen.cfg.in b/src/3rdparty/libconninet/doxygen.cfg.in new file mode 100644 index 0000000..80a4c8d --- /dev/null +++ b/src/3rdparty/libconninet/doxygen.cfg.in @@ -0,0 +1,1147 @@ +# Doxyfile 1.3.7 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = "Internet Connectivity Support Library" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = @VERSION@ + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 2 levels of 10 sub-directories under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of source +# files, where putting all generated files in the same directory would otherwise +# cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, +# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en +# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, +# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is used +# as the annotated text. Otherwise, the brief description is used as-is. If left +# blank, the following values are used ("$name" is automatically replaced with the +# name of the entity): "The $name class" "The $name widget" "The $name file" +# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited +# members of a class in the documentation of that class as if those members were +# ordinary class members. Constructors, destructors and assignment operators of +# the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = YES + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = YES + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources +# only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = conic/conic.h \ + conic/conicconnection.h \ + conic/conicconnectionevent.h \ + conic/conicevent.h \ + conic/coniciap.h \ + conic/conicstatisticsevent.h + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp +# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories +# that are symbolic links (a Unix filesystem feature) are excluded from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. + +INPUT_FILTER = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_PREDEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse the +# parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or +# super classes. Setting the tag to NO turns the diagrams off. Note that this +# option is superseded by the HAVE_DOT option below. This is only a fallback. It is +# recommended to install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found on the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes that +# lay further from the root node will be omitted. Note that setting this option to +# 1 or 2 may greatly reduce the computation time needed for large code bases. Also +# note that a graph may be further truncated if the graph's image dimensions are +# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). +# If 0 is used for the depth value (the default), the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/src/3rdparty/libconninet/src/dbusdispatcher.cpp b/src/3rdparty/libconninet/src/dbusdispatcher.cpp new file mode 100644 index 0000000..7581982 --- /dev/null +++ b/src/3rdparty/libconninet/src/dbusdispatcher.cpp @@ -0,0 +1,611 @@ +/* * This file is part of conninet * + * + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * + * Contact: Aapo Makela + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#include +#include +#include +#include +#include +#include +#include "dbusdispatcher.h" + +namespace Maemo { + +/*! + \class DBusDispatcher + + \brief DBusDispatcher is a class, which is able to send DBUS method call + messages and receive unicast signals from DBUS object. +*/ + +class DBusDispatcherPrivate +{ +public: + DBusDispatcherPrivate(const QString& service, + const QString& path, + const QString& interface, + const QString& signalPath) + : service(service), path(path), interface(interface), + signalPath(signalPath), connection(0) + { + memset(&signal_vtable, 0, sizeof(signal_vtable)); + } + + ~DBusDispatcherPrivate() + { + foreach(DBusPendingCall *call, pending_calls) { + dbus_pending_call_cancel(call); + dbus_pending_call_unref(call); + } + } + + QString service; + QString path; + QString interface; + QString signalPath; + struct DBusConnection *connection; + QList pending_calls; + struct DBusObjectPathVTable signal_vtable; +}; + +static bool constantVariantList(const QVariantList& variantList) { + // Special case, empty list == empty struct + if (variantList.isEmpty()) { + return false; + } else { + QVariant::Type type = variantList[0].type(); + // Iterate items in the list and check if they are same type + foreach(QVariant variant, variantList) { + if (variant.type() != type) { + return false; + } + } + } + return true; +} + +static QString variantToSignature(const QVariant& argument, + bool constantList = true) { + switch (argument.type()) { + case QVariant::Bool: + return "b"; + case QVariant::ByteArray: + return "ay"; + case QVariant::Char: + return "y"; + case QVariant::Int: + return "i"; + case QVariant::UInt: + return "u"; + case QVariant::StringList: + return "as"; + case QVariant::String: + return "s"; + case QVariant::LongLong: + return "x"; + case QVariant::ULongLong: + return "t"; + case QVariant::List: + { + QString signature; + QVariantList variantList = argument.toList(); + if (!constantList) { + signature += DBUS_STRUCT_BEGIN_CHAR_AS_STRING; + foreach(QVariant listItem, variantList) { + signature += variantToSignature(listItem); + } + signature += DBUS_STRUCT_END_CHAR_AS_STRING; + } else { + if (variantList.isEmpty()) + return ""; + signature = "a" + variantToSignature(variantList[0]); + } + + return signature; + } + default: + qDebug() << "Unsupported variant type: " << argument.type(); + break; + } + + return ""; +} + +static bool appendVariantToDBusMessage(const QVariant& argument, + DBusMessageIter *dbus_iter) { + int idx = 0; + DBusMessageIter array_iter; + QStringList str_list; + dbus_bool_t bool_data; + dbus_int32_t int32_data; + dbus_uint32_t uint32_data; + dbus_int64_t int64_data; + dbus_uint64_t uint64_data; + char *str_data; + char char_data; + + switch (argument.type()) { + + case QVariant::Bool: + bool_data = argument.toBool(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BOOLEAN, + &bool_data); + break; + + case QVariant::ByteArray: + str_data = argument.toByteArray().data(); + dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, + DBUS_TYPE_BYTE_AS_STRING, &array_iter); + dbus_message_iter_append_fixed_array(&array_iter, + DBUS_TYPE_BYTE, + &str_data, + argument.toByteArray().size()); + dbus_message_iter_close_container(dbus_iter, &array_iter); + break; + + case QVariant::Char: + char_data = argument.toChar().toAscii(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BYTE, + &char_data); + break; + + case QVariant::Int: + int32_data = argument.toInt(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT32, + &int32_data); + break; + + case QVariant::String: + str_data = argument.toString().toLatin1().data(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING, + &str_data); + break; + + case QVariant::StringList: + str_list = argument.toStringList(); + dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, + "s", &array_iter); + for (idx = 0; idx < str_list.size(); idx++) { + str_data = str_list.at(idx).toLatin1().data(); + dbus_message_iter_append_basic(&array_iter, + DBUS_TYPE_STRING, + &str_data); + } + dbus_message_iter_close_container(dbus_iter, &array_iter); + break; + + case QVariant::UInt: + uint32_data = argument.toUInt(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT32, + &uint32_data); + break; + + case QVariant::ULongLong: + uint64_data = argument.toULongLong(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT64, + &uint64_data); + break; + + case QVariant::LongLong: + int64_data = argument.toLongLong(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT64, + &int64_data); + break; + + case QVariant::List: + { + QVariantList variantList = argument.toList(); + bool constantList = constantVariantList(variantList); + DBusMessageIter array_iter; + + // List is mapped either as an DBUS array (all items same type) + // DBUS struct (variable types) depending on constantList + if (constantList) { + // Resolve the signature for the first item + QString signature = ""; + if (!variantList.isEmpty()) { + signature = variantToSignature( + variantList[0], + constantVariantList(variantList[0].toList())); + } + + // Mapped as DBUS array + dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, + signature.toAscii(), + &array_iter); + + foreach(QVariant listItem, variantList) { + appendVariantToDBusMessage(listItem, &array_iter); + } + + dbus_message_iter_close_container(dbus_iter, &array_iter); + } else { + // Mapped as DBUS struct + dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_STRUCT, + NULL, + &array_iter); + + foreach(QVariant listItem, variantList) { + appendVariantToDBusMessage(listItem, &array_iter); + } + + dbus_message_iter_close_container(dbus_iter, &array_iter); + } + + break; + } + default: + qDebug() << "Unsupported variant type: " << argument.type(); + break; + } + + return true; +} + +static QVariant getVariantFromDBusMessage(DBusMessageIter *iter) { + dbus_bool_t bool_data; + dbus_int32_t int32_data; + dbus_uint32_t uint32_data; + dbus_int64_t int64_data; + dbus_uint64_t uint64_data; + char *str_data; + char char_data; + int argtype = dbus_message_iter_get_arg_type(iter); + + switch (argtype) { + + case DBUS_TYPE_BOOLEAN: + { + dbus_message_iter_get_basic(iter, &bool_data); + QVariant variant((bool)bool_data); + return variant; + } + + case DBUS_TYPE_ARRAY: + { + // Handle all arrays here + int elem_type = dbus_message_iter_get_element_type(iter); + DBusMessageIter array_iter; + + dbus_message_iter_recurse(iter, &array_iter); + + if (elem_type == DBUS_TYPE_BYTE) { + QByteArray byte_array; + do { + dbus_message_iter_get_basic(&array_iter, &char_data); + byte_array.append(char_data); + } while (dbus_message_iter_next(&array_iter)); + QVariant variant(byte_array); + return variant; + } else if (elem_type == DBUS_TYPE_STRING) { + QStringList str_list; + do { + dbus_message_iter_get_basic(&array_iter, &str_data); + str_list.append(str_data); + } while (dbus_message_iter_next(&array_iter)); + QVariant variant(str_list); + return variant; + } else { + QVariantList variantList; + do { + variantList << getVariantFromDBusMessage(&array_iter); + } while (dbus_message_iter_next(&array_iter)); + QVariant variant(variantList); + return variant; + } + break; + } + + case DBUS_TYPE_BYTE: + { + dbus_message_iter_get_basic(iter, &char_data); + QChar ch(char_data); + QVariant variant(ch); + return variant; + } + + case DBUS_TYPE_INT32: + { + dbus_message_iter_get_basic(iter, &int32_data); + QVariant variant((int)int32_data); + return variant; + } + + case DBUS_TYPE_UINT32: + { + dbus_message_iter_get_basic(iter, &uint32_data); + QVariant variant((uint)uint32_data); + return variant; + } + + case DBUS_TYPE_STRING: + { + dbus_message_iter_get_basic(iter, &str_data); + QString str(str_data); + QVariant variant(str); + return variant; + } + + case DBUS_TYPE_INT64: + { + dbus_message_iter_get_basic(iter, &int64_data); + QVariant variant((qlonglong)int64_data); + return variant; + } + + case DBUS_TYPE_UINT64: + { + dbus_message_iter_get_basic(iter, &uint64_data); + QVariant variant((qulonglong)uint64_data); + return variant; + } + + case DBUS_TYPE_STRUCT: + { + // Handle all structs here + DBusMessageIter struct_iter; + dbus_message_iter_recurse(iter, &struct_iter); + + QVariantList variantList; + do { + variantList << getVariantFromDBusMessage(&struct_iter); + } while (dbus_message_iter_next(&struct_iter)); + QVariant variant(variantList); + return variant; + } + + default: + qDebug() << "Unsupported DBUS type: " << argtype; + } + + return QVariant(); +} + +static DBusHandlerResult signalHandler (DBusConnection *connection, + DBusMessage *message, + void *object_ref) { + (void)connection; + QString interface; + QString signal; + DBusDispatcher *dispatcher = (DBusDispatcher *)object_ref; + + if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL) { + interface = dbus_message_get_interface(message); + signal = dbus_message_get_member(message); + + QList arglist; + DBusMessageIter dbus_iter; + + if (dbus_message_iter_init(message, &dbus_iter)) { + // Read return arguments + while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { + arglist << getVariantFromDBusMessage(&dbus_iter); + dbus_message_iter_next(&dbus_iter); + } + } + + dispatcher->emitSignalReceived(interface, signal, arglist); + return DBUS_HANDLER_RESULT_HANDLED; + } + (void)message; + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +} + +DBusDispatcher::DBusDispatcher(const QString& service, + const QString& path, + const QString& interface, + QObject *parent) + : QObject(parent), + d_ptr(new DBusDispatcherPrivate(service, path, interface, path)) { + setupDBus(); +} + +DBusDispatcher::DBusDispatcher(const QString& service, + const QString& path, + const QString& interface, + const QString& signalPath, + QObject *parent) + : QObject(parent), + d_ptr(new DBusDispatcherPrivate(service, path, interface, signalPath)) { + setupDBus(); +} + +DBusDispatcher::~DBusDispatcher() +{ + if (d_ptr->connection) { + dbus_connection_close(d_ptr->connection); + dbus_connection_unref(d_ptr->connection); + } + delete d_ptr; +} + +void DBusDispatcher::setupDBus() +{ + d_ptr->connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL); + + if (d_ptr->connection == NULL) + qDebug() << "Unable to get DBUS connection!"; + else { + d_ptr->signal_vtable.message_function = signalHandler; + + dbus_connection_set_exit_on_disconnect(d_ptr->connection, FALSE); + dbus_connection_setup_with_g_main(d_ptr->connection, NULL); + dbus_connection_register_object_path(d_ptr->connection, + d_ptr->signalPath.toLatin1(), + &d_ptr->signal_vtable, + this); + } +} + +static DBusMessage *prepareDBusCall(const QString& service, + const QString& path, + const QString& interface, + const QString& method, + const QVariant& arg1 = QVariant(), + const QVariant& arg2 = QVariant(), + const QVariant& arg3 = QVariant(), + const QVariant& arg4 = QVariant(), + const QVariant& arg5 = QVariant(), + const QVariant& arg6 = QVariant(), + const QVariant& arg7 = QVariant(), + const QVariant& arg8 = QVariant()) +{ + DBusMessage *message = dbus_message_new_method_call(service.toLatin1(), + path.toLatin1(), + interface.toLatin1(), + method.toLatin1()); + DBusMessageIter dbus_iter; + + // Append variants to DBUS message + QList arglist; + if (arg1.isValid()) arglist << arg1; + if (arg2.isValid()) arglist << arg2; + if (arg3.isValid()) arglist << arg3; + if (arg4.isValid()) arglist << arg4; + if (arg5.isValid()) arglist << arg5; + if (arg6.isValid()) arglist << arg6; + if (arg7.isValid()) arglist << arg7; + if (arg8.isValid()) arglist << arg8; + + dbus_message_iter_init_append (message, &dbus_iter); + + while (!arglist.isEmpty()) { + QVariant argument = arglist.takeFirst(); + appendVariantToDBusMessage(argument, &dbus_iter); + } + + return message; +} + +QList DBusDispatcher::call(const QString& method, + const QVariant& arg1, + const QVariant& arg2, + const QVariant& arg3, + const QVariant& arg4, + const QVariant& arg5, + const QVariant& arg6, + const QVariant& arg7, + const QVariant& arg8) { + DBusMessageIter dbus_iter; + DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path, + d_ptr->interface, method, + arg1, arg2, arg3, arg4, arg5, + arg6, arg7, arg8); + DBusMessage *reply = dbus_connection_send_with_reply_and_block( + d_ptr->connection, + message, -1, NULL); + dbus_message_unref(message); + + QList replylist; + if (reply != NULL && dbus_message_iter_init(reply, &dbus_iter)) { + // Read return arguments + while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { + replylist << getVariantFromDBusMessage(&dbus_iter); + dbus_message_iter_next(&dbus_iter); + } + } + if (reply != NULL) dbus_message_unref(reply); + return replylist; +} + +class PendingCallInfo { +public: + QString method; + DBusDispatcher *dispatcher; + DBusDispatcherPrivate *priv; +}; + +static void freePendingCallInfo(void *memory) { + PendingCallInfo *info = (PendingCallInfo *)memory; + delete info; +} + +static void pendingCallFunction (DBusPendingCall *pending, + void *memory) { + PendingCallInfo *info = (PendingCallInfo *)memory; + QString errorStr; + QList replyList; + DBusMessage *reply = dbus_pending_call_steal_reply (pending); + + Q_ASSERT(reply != NULL); + + if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) { + errorStr = dbus_message_get_error_name (reply); + } else { + DBusMessageIter dbus_iter; + dbus_message_iter_init(reply, &dbus_iter); + // Read return arguments + while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { + replyList << getVariantFromDBusMessage(&dbus_iter); + dbus_message_iter_next(&dbus_iter); + } + } + + info->priv->pending_calls.removeOne(pending); + info->dispatcher->emitCallReply(info->method, replyList, errorStr); + dbus_message_unref(reply); + dbus_pending_call_unref(pending); +} + +bool DBusDispatcher::callAsynchronous(const QString& method, + const QVariant& arg1, + const QVariant& arg2, + const QVariant& arg3, + const QVariant& arg4, + const QVariant& arg5, + const QVariant& arg6, + const QVariant& arg7, + const QVariant& arg8) { + DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path, + d_ptr->interface, method, + arg1, arg2, arg3, arg4, arg5, + arg6, arg7, arg8); + DBusPendingCall *call = NULL; + dbus_bool_t ret = dbus_connection_send_with_reply(d_ptr->connection, + message, &call, -1); + PendingCallInfo *info = new PendingCallInfo; + info->method = method; + info->dispatcher = this; + info->priv = d_ptr; + + dbus_pending_call_set_notify(call, pendingCallFunction, info, freePendingCallInfo); + d_ptr->pending_calls.append(call); + return (bool)ret; +} + +void DBusDispatcher::emitSignalReceived(const QString& interface, + const QString& signal, + const QList& args) { + emit signalReceived(interface, signal, args); } + +void DBusDispatcher::emitCallReply(const QString& method, + const QList& args, + const QString& error) { + emit callReply(method, args, error); } + +void DBusDispatcher::synchronousDispatch(int timeout_ms) +{ + dbus_connection_read_write_dispatch(d_ptr->connection, timeout_ms); +} + +} // Maemo namespace + diff --git a/src/3rdparty/libconninet/src/dbusdispatcher.h b/src/3rdparty/libconninet/src/dbusdispatcher.h new file mode 100644 index 0000000..2f71b6f --- /dev/null +++ b/src/3rdparty/libconninet/src/dbusdispatcher.h @@ -0,0 +1,91 @@ +/* * This file is part of conn-dui-settings-inet * + * + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * + * Contact: Aapo Makela + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#ifndef DBUSDISPATCHER_H +#define DBUSDISPATCHER_H + +#include +#include + +namespace Maemo { + +class DBusDispatcherPrivate; +class DBusDispatcher : public QObject +{ + Q_OBJECT + +public: + DBusDispatcher(const QString& service, + const QString& path, + const QString& interface, + QObject *parent = 0); + DBusDispatcher(const QString& service, + const QString& path, + const QString& interface, + const QString& signalPath, + QObject *parent = 0); + ~DBusDispatcher(); + + QList call(const QString& method, + const QVariant& arg1 = QVariant(), + const QVariant& arg2 = QVariant(), + const QVariant& arg3 = QVariant(), + const QVariant& arg4 = QVariant(), + const QVariant& arg5 = QVariant(), + const QVariant& arg6 = QVariant(), + const QVariant& arg7 = QVariant(), + const QVariant& arg8 = QVariant()); + bool callAsynchronous(const QString& method, + const QVariant& arg1 = QVariant(), + const QVariant& arg2 = QVariant(), + const QVariant& arg3 = QVariant(), + const QVariant& arg4 = QVariant(), + const QVariant& arg5 = QVariant(), + const QVariant& arg6 = QVariant(), + const QVariant& arg7 = QVariant(), + const QVariant& arg8 = QVariant()); + void emitSignalReceived(const QString& interface, + const QString& signal, + const QList& args); + void emitCallReply(const QString& method, + const QList& args, + const QString& error = ""); + void synchronousDispatch(int timeout_ms); + +Q_SIGNALS: + void signalReceived(const QString& interface, + const QString& signal, + const QList& args); + void callReply(const QString& method, + const QList& args, + const QString& error); + +protected: + void setupDBus(); + +private: + DBusDispatcherPrivate *d_ptr; +}; + +} // Maemo namespace + +#endif diff --git a/src/3rdparty/libconninet/src/iapconf.cpp b/src/3rdparty/libconninet/src/iapconf.cpp new file mode 100644 index 0000000..2e77fa5 --- /dev/null +++ b/src/3rdparty/libconninet/src/iapconf.cpp @@ -0,0 +1,299 @@ +/* + libconninet - Internet Connectivity support library + + Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. + + Contact: Aapo Makela + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + +#include +#include +#include + +#include "iapconf.h" + +#define QSTRING_TO_CONST_CSTR(str) \ + str.toUtf8().constData() + +namespace Maemo { + +class IAPConfPrivate { +public: + ConnSettings *settings; + + ConnSettingsValue *variantToValue(const QVariant &variant); + QVariant valueToVariant(ConnSettingsValue *value); +}; + +ConnSettingsValue *IAPConfPrivate::variantToValue(const QVariant &variant) +{ + // Convert variant to ConnSettingsValue + ConnSettingsValue *value = conn_settings_value_new(); + if (value == 0) { + qWarning("IAPConf: Unable to create new ConnSettingsValue"); + return 0; + } + + switch(variant.type()) { + + case QVariant::Invalid: + value->type = CONN_SETTINGS_VALUE_INVALID; + break; + + case QVariant::String: { + char *valueStr = strdup(QSTRING_TO_CONST_CSTR(variant.toString())); + value->type = CONN_SETTINGS_VALUE_STRING; + value->value.string_val = valueStr; + break; + } + + case QVariant::Int: + value->type = CONN_SETTINGS_VALUE_INT; + value->value.int_val = variant.toInt(); + break; + + case QMetaType::Float: + case QVariant::Double: + value->type = CONN_SETTINGS_VALUE_DOUBLE; + value->value.double_val = variant.toDouble(); + break; + + case QVariant::Bool: + value->type = CONN_SETTINGS_VALUE_BOOL; + value->value.bool_val = variant.toBool() ? 1 : 0; + break; + + case QVariant::ByteArray: { + QByteArray array = variant.toByteArray(); + value->type = CONN_SETTINGS_VALUE_BYTE_ARRAY; + value->value.byte_array.len = array.size(); + value->value.byte_array.val = (unsigned char *)malloc(array.size()); + memcpy(value->value.byte_array.val, array.constData(), array.size()); + break; + } + + case QVariant::List: { + QVariantList list = variant.toList(); + ConnSettingsValue **list_val = (ConnSettingsValue **)malloc( + (list.size() + 1) * sizeof(ConnSettingsValue *)); + + for (int idx = 0; idx < list.size(); idx++) { + list_val[idx] = variantToValue(list.at(idx)); + } + list_val[list.size()] = 0; + + value->type = CONN_SETTINGS_VALUE_LIST; + value->value.list_val = list_val; + break; + } + + default: + qWarning("IAPConf: Can not handle QVariant of type %d", + variant.type()); + conn_settings_value_destroy(value); + return 0; + } + + return value; +} + +QVariant IAPConfPrivate::valueToVariant(ConnSettingsValue *value) +{ + if (value == 0 || value->type == CONN_SETTINGS_VALUE_INVALID) { + return QVariant(); + } + + switch(value->type) { + + case CONN_SETTINGS_VALUE_BOOL: + return QVariant(value->value.bool_val ? true : false); + + case CONN_SETTINGS_VALUE_STRING: + return QVariant(QString(value->value.string_val)); + + case CONN_SETTINGS_VALUE_DOUBLE: + return QVariant(value->value.double_val); + + case CONN_SETTINGS_VALUE_INT: + return QVariant(value->value.int_val); + + case CONN_SETTINGS_VALUE_LIST: { + // At least with GConf backend connsettings returns byte array as list + // of ints, first check for that case + if (value->value.list_val && value->value.list_val[0]) { + bool canBeConvertedToByteArray = true; + for (int idx = 0; value->value.list_val[idx]; idx++) { + ConnSettingsValue *val = value->value.list_val[idx]; + if (val->type != CONN_SETTINGS_VALUE_INT + || val->value.int_val > 255 + || val->value.int_val < 0) { + canBeConvertedToByteArray = false; + break; + } + } + + if (canBeConvertedToByteArray) { + QByteArray array; + for (int idx = 0; value->value.list_val[idx]; idx++) { + array.append(value->value.list_val[idx]->value.int_val); + } + return array; + } + + // Create normal list + QVariantList list; + for (int idx = 0; value->value.list_val[idx]; idx++) { + list.append(valueToVariant(value->value.list_val[idx])); + } + return list; + } + } + + case CONN_SETTINGS_VALUE_BYTE_ARRAY: + return QByteArray::fromRawData((char *)value->value.byte_array.val, + value->value.byte_array.len); + + default: + return QVariant(); + } +} + +// Public class implementation + +IAPConf::IAPConf(const QString &iap_id) + : d_ptr(new IAPConfPrivate) +{ + d_ptr->settings = conn_settings_open(CONN_SETTINGS_CONNECTION, + QSTRING_TO_CONST_CSTR(iap_id)); + if (d_ptr->settings == 0) { + qWarning("IAPConf: Unable to open ConnSettings for %s", + QSTRING_TO_CONST_CSTR(iap_id)); + } +} + +IAPConf::~IAPConf() +{ + conn_settings_close(d_ptr->settings); + delete d_ptr; +} + +void IAPConf::setValue(const QString& key, const QVariant& value) +{ + // Invalid value means unsetting the given key + if (!value.isValid()) { + int err = conn_settings_unset(d_ptr->settings, + QSTRING_TO_CONST_CSTR(key)); + if (err != CONN_SETTINGS_E_NO_ERROR) { + qWarning("IAPConf: unable to unset key %s: %s", + QSTRING_TO_CONST_CSTR(key), + conn_settings_error_text((ConnSettingsError)err)); + } + return; + } + + // Convert value to ConnSettingsValue + ConnSettingsValue *val = d_ptr->variantToValue(value); + if (val == 0) return; + + // Set value and handle errors + int error = conn_settings_set(d_ptr->settings, + QSTRING_TO_CONST_CSTR(key), + val); + if (error != CONN_SETTINGS_E_NO_ERROR) { + qWarning("IAPConf: error in setting key %s: %s", + QSTRING_TO_CONST_CSTR(key), + conn_settings_error_text((ConnSettingsError)error)); + } + + // Destroy value + conn_settings_value_destroy(val); + return; +} + +void IAPConf::set(const QString& key1, const QVariant& value1, + const QString& key2, const QVariant& value2, + const QString& key3, const QVariant& value3, + const QString& key4, const QVariant& value4, + const QString& key5, const QVariant& value5, + const QString& key6, const QVariant& value6, + const QString& key7, const QVariant& value7, + const QString& key8, const QVariant& value8, + const QString& key9, const QVariant& value9, + const QString& key10, const QVariant& value10) +{ + if (!key1.isEmpty()) setValue(key1, value1); + if (!key2.isEmpty()) setValue(key2, value2); + if (!key3.isEmpty()) setValue(key3, value3); + if (!key4.isEmpty()) setValue(key4, value4); + if (!key5.isEmpty()) setValue(key5, value5); + if (!key6.isEmpty()) setValue(key6, value6); + if (!key7.isEmpty()) setValue(key7, value7); + if (!key8.isEmpty()) setValue(key8, value8); + if (!key9.isEmpty()) setValue(key9, value9); + if (!key10.isEmpty()) setValue(key10, value10); +} + +QVariant IAPConf::value(const QString& key) const +{ + ConnSettingsValue *val = conn_settings_get(d_ptr->settings, + QSTRING_TO_CONST_CSTR(key)); + + QVariant variant = d_ptr->valueToVariant(val); + conn_settings_value_destroy(val); + return variant; +} + +void IAPConf::clear(const char *default_path) +{ + Q_UNUSED(default_path); // default path is unused + + int error = conn_settings_remove(d_ptr->settings); + if (error != CONN_SETTINGS_E_NO_ERROR) { + qWarning("IAPConf: Error when removing IAP: %s", + conn_settings_error_text((ConnSettingsError)error)); + } +} + +void IAPConf::clearAll() +{ + ConnSettings *settings = conn_settings_open(CONN_SETTINGS_CONNECTION, + NULL); + conn_settings_remove(settings); + conn_settings_close(settings); +} + + +void IAPConf::getAll(QList &all_iaps, bool return_path) +{ + Q_UNUSED(return_path); // We don't use return path currently + + // Go through all available connections and add them to the list + char **ids = conn_settings_list_ids(CONN_SETTINGS_CONNECTION); + if (ids == 0) { + // No ids found - nothing to do + return; + } + + for (int idx = 0; ids[idx]; idx++) { + all_iaps.append(QString(ids[idx])); + free(ids[idx]); + } + free(ids); +} + + +} // namespace Maemo diff --git a/src/3rdparty/libconninet/src/iapconf.h b/src/3rdparty/libconninet/src/iapconf.h new file mode 100644 index 0000000..57c0856 --- /dev/null +++ b/src/3rdparty/libconninet/src/iapconf.h @@ -0,0 +1,84 @@ +/* + libconninet - Internet Connectivity support library + + Copyright (C) 2009 Nokia Corporation. All rights reserved. + + Contact: Aapo Makela + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + +#ifndef IAPCONF_H +#define IAPCONF_H + +#include +#include + +namespace Maemo { + +class IAPConfPrivate; +class IAPConf { +public: + IAPConf(const QString &iap_id); + virtual ~IAPConf(); + + /** + Convenience method for setting multiple IAP values with one call. + */ + void set(const QString& key1, const QVariant& value1, + const QString& key2 = "", const QVariant& value2 = QVariant(), + const QString& key3 = "", const QVariant& value3 = QVariant(), + const QString& key4 = "", const QVariant& value4 = QVariant(), + const QString& key5 = "", const QVariant& value5 = QVariant(), + const QString& key6 = "", const QVariant& value6 = QVariant(), + const QString& key7 = "", const QVariant& value7 = QVariant(), + const QString& key8 = "", const QVariant& value8 = QVariant(), + const QString& key9 = "", const QVariant& value9 = QVariant(), + const QString& key10 = "", const QVariant& value10 = QVariant()); + + /** + Set one IAP value. + */ + void setValue(const QString& key, const QVariant& value); + + /** + Get one IAP value. + */ + QVariant value(const QString& key) const; + + /** + Clear this IAP from GConf + */ + void clear(const char *default_path=0); + + /** + Clear all IAP specific information from GConf (including all IAPs). + DO NOT USE THIS FUNCTION IN ANYWHERE ELSE EXCEPT IN TEST CODE! + */ + void clearAll(); + + /** + Return all the IAPs found in the system. If return_path is true, + then do not strip the IAP path away. + */ + static void getAll(QList &all_iaps, bool return_path=false); + +private: + IAPConfPrivate *d_ptr; +}; + +} // namespace Maemo + +#endif diff --git a/src/3rdparty/libconninet/src/iapmonitor.cpp b/src/3rdparty/libconninet/src/iapmonitor.cpp new file mode 100644 index 0000000..c44cbc8 --- /dev/null +++ b/src/3rdparty/libconninet/src/iapmonitor.cpp @@ -0,0 +1,110 @@ +/* + libconninet - Internet Connectivity support library + + Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. + + Contact: Jukka Rissanen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + +#include + +#include +#include "iapmonitor.h" + +namespace Maemo { + + +void conn_settings_notify_func (ConnSettingsType type, + const char *id, + const char *key, + ConnSettingsValue *value, + void *user_data); + +class IAPMonitorPrivate { +private: + IAPMonitor *monitor; + ConnSettings *settings; + +public: + + IAPMonitorPrivate(IAPMonitor *monitor) + : monitor(monitor) + { + settings = conn_settings_open(CONN_SETTINGS_CONNECTION, NULL); + conn_settings_add_notify( + settings, + (ConnSettingsNotifyFunc *)conn_settings_notify_func, + this); + } + + ~IAPMonitorPrivate() + { + conn_settings_del_notify(settings); + conn_settings_close(settings); + } + + void iapAdded(const QString &iap) + { + monitor->iapAdded(iap); + } + + void iapRemoved(const QString &iap) + { + monitor->iapRemoved(iap); + } +}; + +void conn_settings_notify_func (ConnSettingsType type, + const char *id, + const char *key, + ConnSettingsValue *value, + void *user_data) +{ + if (type != CONN_SETTINGS_CONNECTION) return; + IAPMonitorPrivate *priv = (IAPMonitorPrivate *)user_data; + + QString iapId(key); + iapId = iapId.split("/")[0]; + if (value != 0) { + priv->iapAdded(iapId); + } else if (iapId == QString(key)) { + // IAP is removed only when the directory gets removed + priv->iapRemoved(iapId); + } +} + +IAPMonitor::IAPMonitor() + : d_ptr(new IAPMonitorPrivate(this)) +{ +} + +IAPMonitor::~IAPMonitor() +{ + delete d_ptr; +} + +void IAPMonitor::iapAdded(const QString &id) +{ + // By default do nothing +} + +void IAPMonitor::iapRemoved(const QString &id) +{ + // By default do nothing +} + +} // namespace Maemo diff --git a/src/3rdparty/libconninet/src/iapmonitor.h b/src/3rdparty/libconninet/src/iapmonitor.h new file mode 100644 index 0000000..558f23e --- /dev/null +++ b/src/3rdparty/libconninet/src/iapmonitor.h @@ -0,0 +1,48 @@ +/* + libconninet - Internet Connectivity support library + + Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. + + Contact: Jukka Rissanen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + +#ifndef IAPMONITOR_H +#define IAPMONITOR_H + +#include + +namespace Maemo { + +class IAPMonitorPrivate; +class IAPMonitor { +public: + IAPMonitor(); + ~IAPMonitor(); + +protected: + virtual void iapAdded(const QString &id); + virtual void iapRemoved(const QString &id); + +private: + IAPMonitorPrivate *d_ptr; + Q_DECLARE_PRIVATE(IAPMonitor); +}; + +} // namespace Maemo + +#endif // IAPMONITOR_H + diff --git a/src/3rdparty/libconninet/src/maemo_icd.cpp b/src/3rdparty/libconninet/src/maemo_icd.cpp new file mode 100644 index 0000000..026241c --- /dev/null +++ b/src/3rdparty/libconninet/src/maemo_icd.cpp @@ -0,0 +1,1316 @@ +/* + libconninet - Internet Connectivity support library + + Copyright (C) 2009 Nokia Corporation. All rights reserved. + + Contact: Jukka Rissanen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + +#include +#include "maemo_icd.h" +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace Maemo { + +#undef PRINT_DEBUGINFO +#ifdef PRINT_DEBUGINFO + static FILE *fdebug = NULL; +#define PDEBUG(fmt, args...) \ + do { \ + struct timeval tv; \ + gettimeofday(&tv, 0); \ + fprintf(fdebug, "DEBUG[%d]:%ld.%ld:%s:%s():%d: " fmt, \ + getpid(), \ + tv.tv_sec, tv.tv_usec, \ + __FILE__, __FUNCTION__, __LINE__, args); \ + fflush(fdebug); \ + } while(0) +#else +#define PDEBUG(fmt...) +#endif + + +/* Reference counting singleton class that creates a single connection + * to icd so that icd reference counting works as expected. This is + * needed because DBusDispatcher uses private dbus connections + * which come and go and icd cannot use that information to + * determine whether application quit or not. So we create one + * persistent connection that is only teared down when application + * quits or calls disconnect() + */ +class IcdRefCounting +{ +public: + IcdRefCounting() : first_call(true) { } + void setup(enum icd_connection_flags flag); + void cleanup(); + +private: + bool first_call; + struct DBusConnection *connection; +}; + +Q_GLOBAL_STATIC(IcdRefCounting, icdRefCounting); + + +void IcdRefCounting::setup(enum icd_connection_flags flag) +{ + if (first_call) { + DBusMessage *msg = NULL; + + connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL); + dbus_connection_set_exit_on_disconnect(connection, FALSE); + dbus_connection_setup_with_g_main(connection, NULL); + + msg = dbus_message_new_method_call(ICD_DBUS_API_INTERFACE, + ICD_DBUS_API_PATH, + ICD_DBUS_API_INTERFACE, + ICD_DBUS_API_CONNECT_REQ); + if (msg == NULL) + goto out; + + if (!dbus_message_append_args(msg, + DBUS_TYPE_UINT32, &flag, + DBUS_TYPE_INVALID)) + goto out; + + if (!dbus_connection_send_with_reply(connection, msg, + NULL, 60*1000)) + goto out; + + first_call = false; + return; + + out: + dbus_connection_close(connection); + dbus_connection_unref(connection); + } +} + +void IcdRefCounting::cleanup() +{ + if (!first_call) { + dbus_connection_close(connection); + dbus_connection_unref(connection); + first_call = true; + } +} + + +class IcdPrivate +{ +public: + IcdPrivate(Icd *myfriend) + { + init(10000, IcdNewDbusInterface, myfriend); + } + + IcdPrivate(unsigned int timeout, Icd *myfriend) + { + init(timeout, IcdNewDbusInterface, myfriend); + } + + IcdPrivate(unsigned int timeout, IcdDbusInterfaceVer ver, Icd *myfriend) + { + /* Note that the old Icd interface is currently disabled and + * the new one is always used. + */ + init(timeout, IcdNewDbusInterface, myfriend); + } + + ~IcdPrivate() + { + QObject::disconnect(mDBus, + SIGNAL(signalReceived(const QString&, + const QString&, + const QList&)), + icd, + SLOT(icdSignalReceived(const QString&, + const QString&, + const QList&))); + + QObject::disconnect(mDBus, + SIGNAL(callReply(const QString&, + const QList&, + const QString&)), + icd, + SLOT(icdCallReply(const QString&, + const QList&, + const QString&))); + + delete mDBus; + mDBus = 0; + } + + /* Icd2 dbus API functions */ + QStringList scan(icd_scan_request_flags flags, + QStringList &network_types, + QList& scan_results, + QString& error); + void scanCancel(); + bool connect(icd_connection_flags flags, IcdConnectResult& result); + bool connect(icd_connection_flags flags, QList& params, + IcdConnectResult& result); + bool connect(icd_connection_flags flags, QString& iap, QString& result); + void select(uint flags); + void disconnect(uint connect_flags, QString& service_type, + uint service_attrs, QString& service_id, + QString& network_type, uint network_attrs, + QByteArray& network_id); + void disconnect(uint connect_flags); + + uint state(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStateResult &state_result); + uint statistics(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStatisticsResult& stats_result); + uint addrinfo(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdAddressInfoResult& addr_result); + + uint state(QList& state_results); + uint state_non_blocking(QList& state_results); + uint statistics(QList& stats_results); + uint addrinfo(QList& addr_results); + uint addrinfo_non_blocking(QList& addr_results); + + void signalReceived(const QString& interface, + const QString& signal, + const QList& args); + void callReply(const QString& method, + const QList& args, + const QString& error); + + QString error() { return mError; } + +public: + DBusDispatcher *mDBus; + QString mMethod; + QString mInterface; + QString mSignal; + QString mError; + QList mArgs; + QList receivedSignals; + unsigned int timeout; + IcdDbusInterfaceVer icd_dbus_version; + Icd *icd; + + void init(unsigned int dbus_timeout, IcdDbusInterfaceVer ver, + Icd *myfriend) + { + if (ver == IcdNewDbusInterface) { + mDBus = new DBusDispatcher(ICD_DBUS_API_INTERFACE, + ICD_DBUS_API_PATH, + ICD_DBUS_API_INTERFACE); + } else { + mDBus = new DBusDispatcher(ICD_DBUS_SERVICE, + ICD_DBUS_PATH, + ICD_DBUS_INTERFACE); + } + icd_dbus_version = ver; + + /* This connect has a side effect as it means that only one + * Icd object can exists in one time. This should be fixed! + */ + QObject::connect(mDBus, + SIGNAL(signalReceived(const QString&, + const QString&, + const QList&)), + myfriend, + SLOT(icdSignalReceived(const QString&, + const QString&, + const QList&))); + + QObject::connect(mDBus, + SIGNAL(callReply(const QString&, + const QList&, + const QString&)), + myfriend, + SLOT(icdCallReply(const QString&, + const QList&, + const QString&))); + + icd = myfriend; + timeout = dbus_timeout; + +#ifdef PRINT_DEBUGINFO + if (!fdebug) { + fdebug = fopen("/tmp/maemoicd.log", "a+"); + } + PDEBUG("created %s\n", "IcdPrivate"); +#endif + } + + void clearState() + { + mMethod.clear(); + mInterface.clear(); + mSignal.clear(); + mError.clear(); + mArgs.clear(); + receivedSignals.clear(); + } + + bool doConnect(IcdConnectResult& result); + bool doConnect(QString& result); + bool doState(); +}; + + +void IcdPrivate::signalReceived(const QString& interface, + const QString& signal, + const QList& args) +{ + // Signal handler, which simply records what has been signalled + mInterface = interface; + mSignal = signal; + mArgs = args; + + //qDebug() << "signal" << signal << "received:" << args; + receivedSignals << QVariant(interface) << QVariant(signal) << QVariant(args); +} + + +void IcdPrivate::callReply(const QString& method, + const QList& /*args*/, + const QString& error) +{ + mMethod = method; + mError = error; +} + + +static void get_scan_result(QList& args, + IcdScanResult& ret) +{ + int i=0; + + if (args.isEmpty()) + return; + + ret.status = args[i++].toUInt(); + ret.timestamp = args[i++].toUInt(); + ret.scan.service_type = args[i++].toString(); + ret.service_name = args[i++].toString(); + ret.scan.service_attrs = args[i++].toUInt(); + ret.scan.service_id = args[i++].toString(); + ret.service_priority = args[i++].toInt(); + ret.scan.network_type = args[i++].toString(); + ret.network_name = args[i++].toString(); + ret.scan.network_attrs = args[i++].toUInt(); + ret.scan.network_id = args[i++].toByteArray(); + ret.network_priority = args[i++].toInt(); + ret.signal_strength = args[i++].toInt(); + ret.station_id = args[i++].toString(); + ret.signal_dB = args[i++].toInt(); +} + + +static void get_connect_result(QList& args, + IcdConnectResult& ret) +{ + int i=0; + + if (args.isEmpty()) + return; + + ret.connect.service_type = args[i++].toString(); + ret.connect.service_attrs = args[i++].toInt(); + ret.connect.service_id = args[i++].toString(); + ret.connect.network_type = args[i++].toString(); + ret.connect.network_attrs = args[i++].toInt(); + ret.connect.network_id = args[i++].toByteArray(); + ret.status = args[i++].toInt(); +} + + +QStringList IcdPrivate::scan(icd_scan_request_flags flags, + QStringList &network_types, + QList& scan_results, + QString& error) +{ + QStringList scanned_types; + QTimer timer; + QVariant reply; + QVariantList vl; + bool last_result = false; + IcdScanResult result; + int all_waited; + + clearState(); + reply = mDBus->call(ICD_DBUS_API_SCAN_REQ, (uint)flags); + if (reply.type() != QVariant::List) + return scanned_types; + vl = reply.toList(); + if (vl.isEmpty()) { + error = "Scan did not return anything."; + return scanned_types; + } + reply = vl.first(); + scanned_types = reply.toStringList(); + //qDebug() << "Scanning:" << scanned_types; + all_waited = scanned_types.size(); + + timer.setSingleShot(true); + timer.start(timeout); + + scan_results.clear(); + while (!last_result) { + while (timer.isActive() && mInterface.isEmpty() && mError.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + } + + if (!timer.isActive()) { + //qDebug() << "Timeout happened"; + break; + } + + if (mSignal != ICD_DBUS_API_SCAN_SIG) { + //qDebug() << "Received" << mSignal << "while waiting" << ICD_DBUS_API_SCAN_SIG << ", ignoring"; + mInterface.clear(); + continue; + } + + if (mError.isEmpty()) { + QString msgInterface = receivedSignals.takeFirst().toString(); + QString msgSignal = receivedSignals.takeFirst().toString(); + QList msgArgs = receivedSignals.takeFirst().toList(); + //qDebug() << "Signal" << msgSignal << "received."; + //qDebug() << "Params:" << msgArgs; + + while (!msgSignal.isEmpty()) { + get_scan_result(msgArgs, result); + +#if 0 + qDebug() << "Received: " << + "status =" << result.status << + ", timestamp =" << result.timestamp << + ", service_type =" << result.scan.service_type << + ", service_name =" << result.service_name << + ", service_attrs =" << result.scan.service_attrs << + ", service_id =" << result.scan.service_id << + ", service_priority =" << result.service_priority << + ", network_type =" << result.scan.network_type << + ", network_name =" << result.network_name << + ", network_attrs =" << result.scan.network_attrs << + ", network_id =" << "-" << + ", network_priority =" << result.network_priority << + ", signal_strength =" << result.signal_strength << + ", station_id =" << result.station_id << + ", signal_dB =" << result.signal_dB; +#endif + + if (result.status == ICD_SCAN_COMPLETE) { + //qDebug() << "waited =" << all_waited; + if (--all_waited == 0) { + last_result = true; + break; + } + } else + scan_results << result; + + if (receivedSignals.isEmpty()) + break; + + msgInterface = receivedSignals.takeFirst().toString(); + msgSignal = receivedSignals.takeFirst().toString(); + msgArgs = receivedSignals.takeFirst().toList(); + } + mInterface.clear(); + + } else { + qWarning() << "Error while scanning:" << mError; + break; + } + } + timer.stop(); + + error = mError; + return scanned_types; +} + + +void IcdPrivate::scanCancel() +{ + mDBus->call(ICD_DBUS_API_SCAN_CANCEL); +} + + +bool IcdPrivate::doConnect(IcdConnectResult& result) +{ + QTimer timer; + bool status = false; + + timer.setSingleShot(true); + timer.start(timeout); + + //qDebug() << "Waiting" << ICD_DBUS_API_CONNECT_SIG << "signal"; + + while (timer.isActive() && mInterface.isEmpty() && + mSignal != ICD_DBUS_API_CONNECT_SIG && + mError.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + } + + timer.stop(); + + if (mError.isEmpty()) { + if (!mArgs.isEmpty()) { + get_connect_result(mArgs, result); + status = true; + } else + status = false; + } else + status = false; + + return status; +} + + +bool IcdPrivate::connect(icd_connection_flags flags, IcdConnectResult& result) +{ + clearState(); + //mDBus->callAsynchronous(ICD_DBUS_API_CONNECT_REQ, (uint)flags); + mDBus->call(ICD_DBUS_API_CONNECT_REQ, (uint)flags); + icdRefCounting()->setup(flags); + return doConnect(result); +} + + +bool IcdPrivate::connect(icd_connection_flags flags, QList& params, + IcdConnectResult& result) +{ + QVariantList varlist; + QVariantList varlist2; + + foreach (ConnectParams param, params) { + QVariantList items; + + items.append(QVariant(param.connect.service_type)); + items.append(QVariant(param.connect.service_attrs)); + items.append(QVariant(param.connect.service_id)); + items.append(QVariant(param.connect.network_type)); + items.append(QVariant(param.connect.network_attrs)); + items.append(QVariant(param.connect.network_id)); + + varlist.append(items); + } + + varlist2.append(QVariant(varlist)); + + clearState(); + //mDBus->callAsynchronous(ICD_DBUS_API_CONNECT_REQ, (uint)flags, varlist2); + mDBus->call(ICD_DBUS_API_CONNECT_REQ, (uint)flags, varlist2); + icdRefCounting()->setup(flags); + return doConnect(result); +} + + +bool IcdPrivate::doConnect(QString& ret) +{ + QTimer timer; + bool status = false; + + timer.setSingleShot(true); + timer.start(timeout); + + while (timer.isActive() && mInterface.isEmpty() && + mError.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + } + + timer.stop(); + + if (mError.isEmpty()) { + if (!mArgs.isEmpty()) { + status = true; + //ret = mArgs[0]; // TODO correctly + } else + status = false; + } else + status = false; + + return status; +} + + +bool IcdPrivate::connect(icd_connection_flags flags, QString& iap, QString& result) +{ + clearState(); + //mDBus->callAsynchronous(ICD_CONNECT_REQ, iap, (uint)flags); + mDBus->call(ICD_CONNECT_REQ, iap, (uint)flags); + icdRefCounting()->setup(flags); + return doConnect(result); +} + + +void IcdPrivate::select(uint flags) +{ + mDBus->call(ICD_DBUS_API_SELECT_REQ, flags); +} + + +void IcdPrivate::disconnect(uint flags, QString& service_type, + uint service_attrs, QString& service_id, + QString& network_type, uint network_attrs, + QByteArray& network_id) +{ + clearState(); + mDBus->call(ICD_DBUS_API_DISCONNECT_REQ, flags, + service_type, service_attrs, service_id, + network_type, network_attrs, network_id); + icdRefCounting()->cleanup(); +} + + +void IcdPrivate::disconnect(uint flags) +{ + clearState(); + mDBus->call(ICD_DBUS_API_DISCONNECT_REQ, flags); + icdRefCounting()->cleanup(); +} + + +static void get_state_all_result(QList& args, + IcdStateResult& ret) +{ + int i=0; + + ret.params.service_type = args[i++].toString(); + ret.params.service_attrs = args[i++].toUInt(); + ret.params.service_id = args[i++].toString(); + ret.params.network_type = args[i++].toString(); + ret.params.network_attrs = args[i++].toUInt(); + ret.params.network_id = args[i++].toByteArray(); + ret.error = args[i++].toString(); + ret.state = args[i++].toInt(); +} + + +static void get_state_all_result2(QList& args, + IcdStateResult& ret) +{ + int i=0; + + ret.params.network_type = args[i++].toString(); + ret.state = args[i++].toInt(); + + // Initialize the other values so that the caller can + // notice we only returned partial status + ret.params.service_type = QString(); + ret.params.service_attrs = 0; + ret.params.service_id = QString(); + ret.params.network_attrs = 0; + ret.params.network_id = QByteArray(); + ret.error = QString(); +} + + +uint IcdPrivate::state(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStateResult& state_result) +{ + QTimer timer; + QVariant reply; + uint total_signals; + QVariantList vl; + + clearState(); + + reply = mDBus->call(ICD_DBUS_API_STATE_REQ, + service_type, service_attrs, service_id, + network_type, network_attrs, network_id); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + total_signals = reply.toUInt(); + if (!total_signals) + return 0; + + timer.setSingleShot(true); + timer.start(timeout); + + mInterface.clear(); + while (timer.isActive() && mInterface.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + + if (mSignal != ICD_DBUS_API_STATE_SIG) { + mInterface.clear(); + continue; + } + } + + timer.stop(); + + if (mError.isEmpty()) { + if (!mArgs.isEmpty()) { + if (mArgs.size()>2) + get_state_all_result(mArgs, state_result); + else { + // We are not connected as we did not get the status we asked + return 0; + } + } + } else { + qWarning() << "Error:" << mError; + } + + // The returned value should be one because we asked for one state + return total_signals; +} + + +uint IcdPrivate::state_non_blocking(QList& state_results) +{ + QTimer timer; + QVariant reply; + QVariantList vl; + uint signals_left, total_signals; + IcdStateResult result; + + PDEBUG("%s\n", "non blocking state"); + + clearState(); + reply = mDBus->call(ICD_DBUS_API_STATE_REQ); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + signals_left = total_signals = reply.toUInt(); + if (!signals_left) + return 0; + + timer.setSingleShot(true); + timer.start(timeout); + state_results.clear(); + mError.clear(); + while (signals_left) { + mInterface.clear(); + while (timer.isActive() && mInterface.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + } + + if (!timer.isActive()) { + total_signals = 0; + break; + } + + if (mSignal != ICD_DBUS_API_STATE_SIG) { + continue; + } + + if (mError.isEmpty()) { + if (!mArgs.isEmpty()) { + if (mArgs.size()==2) + get_state_all_result2(mArgs, result); + else + get_state_all_result(mArgs, result); + state_results << result; + } + signals_left--; + } else { + qWarning() << "Error:" << mError; + break; + } + } + timer.stop(); + + PDEBUG("total_signals=%d\n", total_signals); + return total_signals; +} + + +/* Special version of the state() call which does not call event loop. + * Needed in order to fix NB#175098 where Qt4.7 webkit crashes because event + * loop is run when webkit does not expect it. This function is called from + * bearer management API syncStateWithInterface() in QNetworkSession + * constructor. + */ +uint IcdPrivate::state(QList& state_results) +{ + QVariant reply; + QVariantList vl; + uint signals_left, total_signals; + IcdStateResult result; + time_t started; + int timeout_secs = timeout / 1000; + + PDEBUG("%s\n", "state_results"); + + clearState(); + reply = mDBus->call(ICD_DBUS_API_STATE_REQ); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + signals_left = total_signals = reply.toUInt(); + if (!signals_left) + return 0; + + started = time(0); + state_results.clear(); + mError.clear(); + while (signals_left) { + mInterface.clear(); + while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) { + mDBus->synchronousDispatch(1000); + } + + if (time(0)>(started+timeout_secs)) { + total_signals = 0; + break; + } + + if (mSignal != ICD_DBUS_API_STATE_SIG) { + continue; + } + + if (mError.isEmpty()) { + if (!mArgs.isEmpty()) { + if (mArgs.size()==2) + get_state_all_result2(mArgs, result); + else + get_state_all_result(mArgs, result); + state_results << result; + } + signals_left--; + } else { + qWarning() << "Error:" << mError; + break; + } + } + + PDEBUG("total_signals=%d\n", total_signals); + return total_signals; +} + + +static void get_statistics_all_result(QList& args, + IcdStatisticsResult& ret) +{ + int i=0; + + if (args.isEmpty()) + return; + + ret.params.service_type = args[i++].toString(); + ret.params.service_attrs = args[i++].toUInt(); + ret.params.service_id = args[i++].toString(); + ret.params.network_type = args[i++].toString(); + ret.params.network_attrs = args[i++].toUInt(); + ret.params.network_id = args[i++].toByteArray(); + ret.time_active = args[i++].toUInt(); + ret.signal_strength = (enum icd_nw_levels)args[i++].toUInt(); + ret.bytes_sent = args[i++].toUInt(); + ret.bytes_received = args[i++].toUInt(); +} + + +uint IcdPrivate::statistics(QList& stats_results) +{ + QTimer timer; + QVariant reply; + QVariantList vl; + uint signals_left, total_signals; + IcdStatisticsResult result; + + clearState(); + reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + if (reply.type() != QVariant::UInt) + return 0; + signals_left = total_signals = reply.toUInt(); + + if (!signals_left) + return 0; + + timer.setSingleShot(true); + timer.start(timeout); + stats_results.clear(); + while (signals_left) { + mInterface.clear(); + while (timer.isActive() && mInterface.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + } + + if (!timer.isActive()) { + total_signals = 0; + break; + } + + if (mSignal != ICD_DBUS_API_STATISTICS_SIG) { + continue; + } + + if (mError.isEmpty()) { + get_statistics_all_result(mArgs, result); + stats_results << result; + signals_left--; + } else { + qWarning() << "Error:" << mError; + break; + } + } + timer.stop(); + + return total_signals; +} + + +uint IcdPrivate::statistics(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStatisticsResult& stats_result) +{ + QTimer timer; + QVariant reply; + uint total_signals; + QVariantList vl; + + clearState(); + + reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ, + service_type, service_attrs, service_id, + network_type, network_attrs, network_id); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + total_signals = reply.toUInt(); + if (!total_signals) + return 0; + + timer.setSingleShot(true); + timer.start(timeout); + + mInterface.clear(); + while (timer.isActive() && mInterface.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + + if (mSignal != ICD_DBUS_API_STATISTICS_SIG) { + mInterface.clear(); + continue; + } + } + + timer.stop(); + + if (mError.isEmpty()) { + get_statistics_all_result(mArgs, stats_result); + } else { + qWarning() << "Error:" << mError; + } + + // The returned value should be one because we asked for one statistics + return total_signals; +} + + +static void get_addrinfo_all_result(QList& args, + IcdAddressInfoResult& ret) +{ + int i=0; + + if (args.isEmpty()) + return; + + ret.params.service_type = args[i++].toString(); + ret.params.service_attrs = args[i++].toUInt(); + ret.params.service_id = args[i++].toString(); + ret.params.network_type = args[i++].toString(); + ret.params.network_attrs = args[i++].toUInt(); + ret.params.network_id = args[i++].toByteArray(); + + QVariantList vl = args[i].toList(); + QVariant reply = vl.first(); + QList lst = reply.toList(); + for (int k=0; k& addr_results) +{ + QVariant reply; + QVariantList vl; + uint signals_left, total_signals; + IcdAddressInfoResult result; + time_t started; + int timeout_secs = timeout / 1000; + + PDEBUG("%s\n", "addr_results"); + + clearState(); + reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + if (reply.type() != QVariant::UInt) + return 0; + signals_left = total_signals = reply.toUInt(); + if (!signals_left) + return 0; + + started = time(0); + addr_results.clear(); + while (signals_left) { + mInterface.clear(); + while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) { + mDBus->synchronousDispatch(1000); + } + + if (time(0)>(started+timeout_secs)) { + total_signals = 0; + break; + } + + if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) { + continue; + } + + if (mError.isEmpty()) { + get_addrinfo_all_result(mArgs, result); + addr_results << result; + signals_left--; + } else { + qWarning() << "Error:" << mError; + break; + } + } + + PDEBUG("total_signals=%d\n", total_signals); + return total_signals; +} + +uint IcdPrivate::addrinfo_non_blocking(QList& addr_results) +{ + QTimer timer; + QVariant reply; + QVariantList vl; + uint signals_left, total_signals; + IcdAddressInfoResult result; + + PDEBUG("%s\n", "non blocking addrinfo"); + + clearState(); + reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + if (reply.type() != QVariant::UInt) + return 0; + signals_left = total_signals = reply.toUInt(); + if (!signals_left) + return 0; + + timer.setSingleShot(true); + timer.start(timeout); + addr_results.clear(); + while (signals_left) { + mInterface.clear(); + while (timer.isActive() && mInterface.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + } + + if (!timer.isActive()) { + total_signals = 0; + break; + } + + if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) { + continue; + } + + if (mError.isEmpty()) { + get_addrinfo_all_result(mArgs, result); + addr_results << result; + signals_left--; + } else { + qWarning() << "Error:" << mError; + break; + } + } + timer.stop(); + PDEBUG("total_signals=%d\n", total_signals); + return total_signals; +} + + +uint IcdPrivate::addrinfo(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdAddressInfoResult& addr_result) +{ + QTimer timer; + QVariant reply; + uint total_signals; + QVariantList vl; + + clearState(); + + reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ, + service_type, service_attrs, service_id, + network_type, network_attrs, network_id); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + total_signals = reply.toUInt(); + + if (!total_signals) + return 0; + + timer.setSingleShot(true); + timer.start(timeout); + + mInterface.clear(); + while (timer.isActive() && mInterface.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + + if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) { + mInterface.clear(); + continue; + } + } + + timer.stop(); + + if (mError.isEmpty()) { + get_addrinfo_all_result(mArgs, addr_result); + } else { + qWarning() << "Error:" << mError; + } + + // The returned value should be one because we asked for one addrinfo + return total_signals; +} + + +Icd::Icd(QObject *parent) + : QObject(parent), d(new IcdPrivate(this)) +{ +} + +Icd::Icd(unsigned int timeout, QObject *parent) + : QObject(parent), d(new IcdPrivate(timeout, this)) +{ +} + +Icd::Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent) + : QObject(parent), d(new IcdPrivate(timeout, ver, this)) +{ +} + +Icd::~Icd() +{ + delete d; +} + + +QStringList Icd::scan(icd_scan_request_flags flags, + QStringList &network_types, + QList& scan_results, + QString& error) +{ + return d->scan(flags, network_types, scan_results, error); +} + + +void Icd::scanCancel() +{ + d->scanCancel(); +} + + +bool Icd::connect(icd_connection_flags flags, IcdConnectResult& result) +{ + return d->connect(flags, result); +} + + +bool Icd::connect(icd_connection_flags flags, QList& params, + IcdConnectResult& result) +{ + return d->connect(flags, params, result); +} + + +bool Icd::connect(icd_connection_flags flags, QString& iap, QString& result) +{ + return d->connect(flags, iap, result); +} + + +void Icd::select(uint flags) +{ + d->select(flags); +} + + +void Icd::disconnect(uint connect_flags, QString& service_type, + uint service_attrs, QString& service_id, + QString& network_type, uint network_attrs, + QByteArray& network_id) +{ + d->disconnect(connect_flags, service_type, + service_attrs, service_id, + network_type, network_attrs, + network_id); +} + + +void Icd::disconnect(uint connect_flags) +{ + d->disconnect(connect_flags); +} + + +uint Icd::state(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStateResult &state_result) +{ + return d->state(service_type, service_attrs, service_id, + network_type, network_attrs, network_id, + state_result); +} + + +uint Icd::statistics(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStatisticsResult& stats_result) +{ + return d->statistics(service_type, service_attrs, service_id, + network_type, network_attrs, network_id, + stats_result); +} + + +uint Icd::addrinfo(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdAddressInfoResult& addr_result) +{ + return d->addrinfo(service_type, service_attrs, service_id, + network_type, network_attrs, network_id, + addr_result); +} + + +uint Icd::state(QList& state_results) +{ + return d->state(state_results); +} + +uint Icd::state_non_blocking(QList& state_results) +{ + return d->state_non_blocking(state_results); +} + +uint Icd::statistics(QList& stats_results) +{ + return d->statistics(stats_results); +} + + +uint Icd::addrinfo(QList& addr_results) +{ + return d->addrinfo(addr_results); +} + +uint Icd::addrinfo_non_blocking(QList& addr_results) +{ + return d->addrinfo_non_blocking(addr_results); +} + +void Icd::icdSignalReceived(const QString& interface, + const QString& signal, + const QList& args) +{ + d->signalReceived(interface, signal, args); +} + + +void Icd::icdCallReply(const QString& method, + const QList& args, + const QString& error) +{ + d->callReply(method, args, error); +} + + +QString Icd::error() +{ + return d->error(); +} + +} // Maemo namespace + + diff --git a/src/3rdparty/libconninet/src/maemo_icd.h b/src/3rdparty/libconninet/src/maemo_icd.h new file mode 100644 index 0000000..d7a8d5b --- /dev/null +++ b/src/3rdparty/libconninet/src/maemo_icd.h @@ -0,0 +1,182 @@ +/* + libconninet - Internet Connectivity support library + + Copyright (C) 2009 Nokia Corporation. All rights reserved. + + Contact: Jukka Rissanen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + +#ifndef MAEMO_ICD_H +#define MAEMO_ICD_H + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "dbusdispatcher.h" +#include + +#define ICD_LONG_SCAN_TIMEOUT (30*1000) /* 30sec */ +#define ICD_SHORT_SCAN_TIMEOUT (10*1000) /* 10sec */ +#define ICD_SHORT_CONNECT_TIMEOUT (10*1000) /* 10sec */ +#define ICD_LONG_CONNECT_TIMEOUT (150*1000) /* 2.5min */ + +namespace Maemo { + +struct CommonParams { + QString service_type; + uint service_attrs; + QString service_id; + QString network_type; + uint network_attrs; + QByteArray network_id; +}; + +struct ConnectParams { + struct CommonParams connect; +}; + +struct IcdScanResult { + uint status; // see #icd_scan_status + uint timestamp; // when last seen + QString service_name; + uint service_priority; // within a service type + QString network_name; + uint network_priority; + struct CommonParams scan; + uint signal_strength; // quality, 0 (none) - 10 (good) + QString station_id; // e.g. MAC address or similar id + uint signal_dB; // use signal strength above unless you know what you are doing + + IcdScanResult() { + status = timestamp = scan.service_attrs = service_priority = + scan.network_attrs = network_priority = signal_strength = + signal_dB = 0; + } +}; + +struct IcdConnectResult { + struct CommonParams connect; + uint status; +}; + +struct IcdStateResult { + struct CommonParams params; + QString error; + uint state; +}; + +struct IcdStatisticsResult { + struct CommonParams params; + uint time_active; // in seconds + enum icd_nw_levels signal_strength; // see network_api_defines.h in icd2-dev package + uint bytes_sent; + uint bytes_received; +}; + +struct IcdIPInformation { + QString address; + QString netmask; + QString default_gateway; + QString dns1; + QString dns2; + QString dns3; +}; + +struct IcdAddressInfoResult { + struct CommonParams params; + QList ip_info; +}; + +enum IcdDbusInterfaceVer { + IcdOldDbusInterface = 0, // use the old OSSO-IC interface + IcdNewDbusInterface // use the new Icd2 interface (default) +}; + + +class IcdPrivate; +class Icd : public QObject +{ + Q_OBJECT + +public: + Icd(QObject *parent = 0); + Icd(unsigned int timeout, QObject *parent = 0); + Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent = 0); + ~Icd(); + QString error(); // returns last error string + + /* Icd2 dbus API functions */ + QStringList scan(icd_scan_request_flags flags, + QStringList &network_types, + QList& scan_results, + QString& error); + void scanCancel(); + bool connect(icd_connection_flags flags, IcdConnectResult& result); + bool connect(icd_connection_flags flags, QList& params, + IcdConnectResult& result); + bool connect(icd_connection_flags flags, QString& iap, QString& result); + void select(uint flags); + void disconnect(uint connect_flags, QString& service_type, + uint service_attrs, QString& service_id, + QString& network_type, uint network_attrs, + QByteArray& network_id); + void disconnect(uint connect_flags); + + uint state(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStateResult &state_result); + uint statistics(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStatisticsResult& stats_result); + uint addrinfo(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdAddressInfoResult& addr_result); + + uint state(QList& state_results); + uint state_non_blocking(QList& state_results); + uint statistics(QList& stats_results); + uint addrinfo(QList& addr_results); + uint addrinfo_non_blocking(QList& addr_results); + +private Q_SLOTS: + void icdSignalReceived(const QString& interface, + const QString& signal, + const QList& args); + void icdCallReply(const QString& method, + const QList& args, + const QString& error); + +private: + IcdPrivate *d; + friend class IcdPrivate; +}; + +} // Maemo namespace + +#endif diff --git a/src/3rdparty/libconninet/src/proxyconf.cpp b/src/3rdparty/libconninet/src/proxyconf.cpp new file mode 100644 index 0000000..d377a31 --- /dev/null +++ b/src/3rdparty/libconninet/src/proxyconf.cpp @@ -0,0 +1,392 @@ +/* + libconninet - Internet Connectivity support library + + Copyright (C) 2010 Nokia Corporation. All rights reserved. + + Contact: Jukka Rissanen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "proxyconf.h" + +#define CONF_PROXY "/system/proxy" +#define HTTP_PROXY "/system/http_proxy" + + +namespace Maemo { + +static QString convertKey(const char *key) +{ + return QString::fromUtf8(key); +} + +static QVariant convertValue(GConfValue *src) +{ + if (!src) { + return QVariant(); + } else { + switch (src->type) { + case GCONF_VALUE_INVALID: + return QVariant(QVariant::Invalid); + case GCONF_VALUE_BOOL: + return QVariant((bool)gconf_value_get_bool(src)); + case GCONF_VALUE_INT: + return QVariant(gconf_value_get_int(src)); + case GCONF_VALUE_FLOAT: + return QVariant(gconf_value_get_float(src)); + case GCONF_VALUE_STRING: + return QVariant(QString::fromUtf8(gconf_value_get_string(src))); + case GCONF_VALUE_LIST: + switch (gconf_value_get_list_type(src)) { + case GCONF_VALUE_STRING: + { + QStringList result; + for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next) + result.append(QString::fromUtf8(gconf_value_get_string((GConfValue *)elts->data))); + return QVariant(result); + } + default: + { + QList result; + for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next) + result.append(convertValue((GConfValue *)elts->data)); + return QVariant(result); + } + } + case GCONF_VALUE_SCHEMA: + default: + return QVariant(); + } + } +} + + +/* Fast version of GConfItem, allows reading subtree at a time */ +class GConfItemFast { +public: + GConfItemFast(const QString &k) : key(k) {} + QHash getEntries() const; + +private: + QString key; +}; + +#define withClient(c) for (GConfClient *c = gconf_client_get_default(); c; c=0) + + +QHash GConfItemFast::getEntries() const +{ + QHash children; + + withClient(client) { + QByteArray k = key.toUtf8(); + GSList *entries = gconf_client_all_entries(client, k.data(), NULL); + for (GSList *e = entries; e; e = e->next) { + char *key_name = strrchr(((GConfEntry *)e->data)->key, '/'); + if (!key_name) + key_name = ((GConfEntry *)e->data)->key; + else + key_name++; + QString key(convertKey(key_name)); + QVariant value = convertValue(((GConfEntry *)e->data)->value); + gconf_entry_unref((GConfEntry *)e->data); + //qDebug()<<"key="< queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery()); +}; + + +QList NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query) +{ + ProxyConf proxy_conf; + + QList result = proxy_conf.flush(query); + if (result.isEmpty()) + result << QNetworkProxy::NoProxy; + + return result; +} + + +class ProxyConfPrivate { +private: + // proxy values from gconf + QString mode; + bool use_http_host; + QString autoconfig_url; + QString http_proxy; + quint16 http_port; + QList ignore_hosts; + QString secure_host; + quint16 secure_port; + QString ftp_host; + quint16 ftp_port; + QString socks_host; + quint16 socks_port; + QString rtsp_host; + quint16 rtsp_port; + + bool isHostExcluded(const QString &host); + +public: + QString prefix; + QString http_prefix; + + void readProxyData(); + QList flush(const QNetworkProxyQuery &query); +}; + + +static QHash getValues(const QString& prefix) +{ + GConfItemFast item(prefix); + return item.getEntries(); +} + +static QHash getHttpValues(const QString& prefix) +{ + GConfItemFast item(prefix); + return item.getEntries(); +} + +#define GET(var, type) \ + do { \ + QVariant v = values.value(#var); \ + if (v.isValid()) \ + var = v.to##type (); \ + } while(0) + +#define GET_HTTP(var, name, type) \ + do { \ + QVariant v = httpValues.value(#name); \ + if (v.isValid()) \ + var = v.to##type (); \ + } while(0) + + +void ProxyConfPrivate::readProxyData() +{ + QHash values = getValues(prefix); + QHash httpValues = getHttpValues(http_prefix); + + //qDebug()<<"values="< ProxyConfPrivate::flush(const QNetworkProxyQuery &query) +{ + QList result; + +#if 0 + qDebug()<<"http_proxy" << http_proxy; + qDebug()<<"http_port" << http_port; + qDebug()<<"ignore_hosts" << ignore_hosts; + qDebug()<<"use_http_host" << use_http_host; + qDebug()<<"mode" << mode; + qDebug()<<"autoconfig_url" << autoconfig_url; + qDebug()<<"secure_host" << secure_host; + qDebug()<<"secure_port" << secure_port; + qDebug()<<"ftp_host" << ftp_host; + qDebug()<<"ftp_port" << ftp_port; + qDebug()<<"socks_host" << socks_host; + qDebug()<<"socks_port" << socks_port; + qDebug()<<"rtsp_host" << rtsp_host; + qDebug()<<"rtsp_port" << rtsp_port; +#endif + + if (isHostExcluded(query.peerHostName())) + return result; // no proxy for this host + + if (mode == "auto") { + // TODO: pac currently not supported, fix me + return result; + } + + if (mode == "manual") { + bool isHttps = false; + QString protocol = query.protocolTag().toLower(); + + // try the protocol-specific proxy + QNetworkProxy protocolSpecificProxy; + + if (protocol == QLatin1String("ftp")) { + if (!ftp_host.isEmpty()) { + protocolSpecificProxy.setType(QNetworkProxy::FtpCachingProxy); + protocolSpecificProxy.setHostName(ftp_host); + protocolSpecificProxy.setPort(ftp_port); + } + } else if (protocol == QLatin1String("http")) { + if (!http_proxy.isEmpty()) { + protocolSpecificProxy.setType(QNetworkProxy::HttpProxy); + protocolSpecificProxy.setHostName(http_proxy); + protocolSpecificProxy.setPort(http_port); + } + } else if (protocol == QLatin1String("https")) { + isHttps = true; + if (!secure_host.isEmpty()) { + protocolSpecificProxy.setType(QNetworkProxy::HttpProxy); + protocolSpecificProxy.setHostName(secure_host); + protocolSpecificProxy.setPort(secure_port); + } + } + + if (protocolSpecificProxy.type() != QNetworkProxy::DefaultProxy) + result << protocolSpecificProxy; + + + if (!socks_host.isEmpty()) { + QNetworkProxy proxy; + proxy.setType(QNetworkProxy::Socks5Proxy); + proxy.setHostName(socks_host); + proxy.setPort(socks_port); + result << proxy; + } + + + // Add the HTTPS proxy if present (and if we haven't added yet) + if (!isHttps) { + QNetworkProxy https; + if (!secure_host.isEmpty()) { + https.setType(QNetworkProxy::HttpProxy); + https.setHostName(secure_host); + https.setPort(secure_port); + } + + if (https.type() != QNetworkProxy::DefaultProxy && + https != protocolSpecificProxy) + result << https; + } + } + + return result; +} + + +ProxyConf::ProxyConf() + : d_ptr(new ProxyConfPrivate) +{ + g_type_init(); + d_ptr->prefix = CONF_PROXY; + d_ptr->http_prefix = HTTP_PROXY; +} + +ProxyConf::~ProxyConf() +{ + delete d_ptr; +} + + +QList ProxyConf::flush(const QNetworkProxyQuery &query) +{ + d_ptr->readProxyData(); + return d_ptr->flush(query); +} + + +static int refcount = 0; +static QReadWriteLock lock; + +void ProxyConf::update() +{ + QWriteLocker locker(&lock); + NetworkProxyFactory *factory = new NetworkProxyFactory(); + QNetworkProxyFactory::setApplicationProxyFactory((QNetworkProxyFactory*)factory); + refcount++; +} + + +void ProxyConf::clear(void) +{ + QWriteLocker locker(&lock); + refcount--; + if (refcount == 0) + QNetworkProxyFactory::setApplicationProxyFactory(NULL); + + if (refcount<0) + refcount = 0; +} + + +} // namespace Maemo diff --git a/src/3rdparty/libconninet/src/proxyconf.h b/src/3rdparty/libconninet/src/proxyconf.h new file mode 100644 index 0000000..7711c49 --- /dev/null +++ b/src/3rdparty/libconninet/src/proxyconf.h @@ -0,0 +1,53 @@ +/* + libconninet - Internet Connectivity support library + + Copyright (C) 2010 Nokia Corporation. All rights reserved. + + Contact: Jukka Rissanen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + +#ifndef PROXYCONF_H +#define PROXYCONF_H + +#include +#include + +namespace Maemo { + +class ProxyConfPrivate; +class ProxyConf { +private: + ProxyConfPrivate *d_ptr; + +public: + ProxyConf(); + virtual ~ProxyConf(); + + QList flush(const QNetworkProxyQuery &query = QNetworkProxyQuery()); // read the proxies from db + + /* Note that for each update() call there should be corresponding + * clear() call because the ProxyConf class implements a reference + * counting mechanism. The factory is removed only when there is + * no one using the factory any more. + */ + static void update(void); // this builds QNetworkProxy factory + static void clear(void); // this removes QNetworkProxy factory +}; + +} // namespace Maemo + +#endif diff --git a/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp b/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp new file mode 100644 index 0000000..70deb3f --- /dev/null +++ b/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp @@ -0,0 +1,191 @@ +/* * This file is part of conn-dui-settings-inet * + * + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * + * Contact: Aapo Makela + * + * This software, including documentation, is protected by copyright + * controlled by Nokia Corporation. All rights are reserved. Copying, + * including reproducing, storing, adapting or translating, any or all of + * this material requires the prior written consent of Nokia Corporation. + * This material also contains confidential information which may not be + * disclosed to others without the prior written consent of Nokia. + */ + +#include +#include +#include +#include +#include + +#include + +class Ut_DBusDispatcher : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void init(); + void cleanup(); + void initTestCase(); + void cleanupTestCase(); + + void simpleSignalReceived(const QString& interface, + const QString& signal, + const QList& args); + void simpleCallReply(const QString& method, + const QList& args, + const QString& error); + void simpleCall(); + + void complexCallReply(const QString& method, + const QList& args, + const QString& error); + void complexCall(); + +private: + Maemo::DBusDispatcher *mSubject; + QProcess *icd_stub; + + QString mMethod; + QString mInterface; + QString mSignal; + QList mArgs; +}; + +void Ut_DBusDispatcher::init() +{ + mSubject = new Maemo::DBusDispatcher("com.nokia.icd2", "/com/nokia/icd2", + "com.nokia.icd2"); + + // Start icd2 stub + icd_stub = new QProcess(this); + icd_stub->start("/usr/bin/icd2_stub.py"); + QTest::qWait(1000); +} + +void Ut_DBusDispatcher::cleanup() +{ + // Terminate icd2 stub + icd_stub->terminate(); + icd_stub->waitForFinished(); + + delete mSubject; + mSubject = 0; +} + +void Ut_DBusDispatcher::initTestCase() +{ +} + +void Ut_DBusDispatcher::cleanupTestCase() +{ +} + +void Ut_DBusDispatcher::simpleSignalReceived(const QString& interface, + const QString& signal, + const QList& args) +{ + // Signal handler, which simply records what has been signalled + mInterface = interface; + mSignal = signal; + mArgs = args; +} + +void Ut_DBusDispatcher::simpleCallReply(const QString& method, + const QList& args, + const QString& error) +{ + mMethod = method; + + // Check that method matches and at least WLAN_INFRA is returned + QVERIFY(error.isEmpty()); + QVERIFY(args[0].toStringList().contains("WLAN_INFRA")); +} + +void Ut_DBusDispatcher::simpleCall() +{ + uint flags = 0; + QList reply; + int idx = 0; + QTimer timer; + + // Connect signals + connect(mSubject, SIGNAL(signalReceived(const QString&, + const QString&, + const QList&)), + this, SLOT(simpleSignalReceived(const QString&, + const QString&, + const QList&))); + connect(mSubject, SIGNAL(callReply(const QString&, + const QList&, + const QString&)), + this, SLOT(simpleCallReply(const QString&, + const QList&, + const QString&))); + + // Request scan and verify the call starts succesfully + QVERIFY(mSubject->callAsynchronous("scan_req", flags)); + + // Wait 1st scan signal for 10 secs + timer.setSingleShot(true); + timer.start(10000); + while (timer.isActive() && mInterface.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + idx++; + } + timer.stop(); + + // Sanity checks for the scan result + QVERIFY(mInterface == "com.nokia.icd2"); // interface is icd2 + QVERIFY(mMethod == "scan_req"); // method is scan_req + QVERIFY(mSignal == "scan_result_sig"); // signal is scan result + QVERIFY(mArgs[0] == QVariant(0) || + mArgs[0] == QVariant(4)); // First argument is status + // (0 == NEW, 4 == COMPLETED) + //QVERIFY(mArgs.contains(QVariant("WLAN_INFRA"))); // WLAN scan result +} + +void Ut_DBusDispatcher::complexCallReply(const QString& method, + const QList& args, + const QString& error) +{ + mMethod = method; + + // Check that method has not return arguments and error is not set + QVERIFY(error.isEmpty()); + QVERIFY(args.isEmpty()); +} + +void Ut_DBusDispatcher::complexCall() +{ + uint flags = ICD_CONNECTION_FLAG_UI_EVENT; + QList reply; + QVariantList networks; + QVariantList network1; + + network1 << "" << (uint)0 << "" << "WLAN_INFRA" << (uint)0x05000011 << QByteArray("osso@46@net"); + networks << QVariant(network1); + + // Connect signal + connect(mSubject, SIGNAL(callReply(const QString&, + const QList&, + const QString&)), + this, SLOT(complexCallReply(const QString&, + const QList&, + const QString&))); + + // Request connect and verify the call starts succesfully + QVERIFY(mSubject->callAsynchronous("connect_req", flags, networks)); + + QTest::qWait(1000); + + // Sanity checks for the scan result + QVERIFY(mInterface == "com.nokia.icd2"); // interface is icd2 + QVERIFY(mMethod == "connect_req"); // method connect_req +} + +QTEST_MAIN(Ut_DBusDispatcher) + +#include "ut_dbusdispatcher.moc" diff --git a/src/3rdparty/libconninet/tests/ut_iapconf.cpp b/src/3rdparty/libconninet/tests/ut_iapconf.cpp new file mode 100644 index 0000000..6a91d61 --- /dev/null +++ b/src/3rdparty/libconninet/tests/ut_iapconf.cpp @@ -0,0 +1,186 @@ +/* + libconninet - Internet Connectivity support library + + Copyright (C) 2009 Nokia Corporation. All rights reserved. + + Contact: Aapo Makela + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + + +#include +#include + +#include + +class Ut_IAPConf : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void init(); + void cleanup(); + void initTestCase(); + void cleanupTestCase(); + + void setupIAP(); + void setupIAPContainingDot(); + void unsetIAPValueIsNotValid(); + void verifyAllIAPs(); + void allForEmptyConfReturnsEmptyList(); + void settingInvalidValueUnsetsKey(); + +private: + Maemo::IAPConf *mSubject; +}; + +void Ut_IAPConf::init() +{ + mSubject = new Maemo::IAPConf("test_iap"); +} + +void Ut_IAPConf::cleanup() +{ + // Clear made settings + mSubject->clear(); + + delete mSubject; + mSubject = 0; +} + +void Ut_IAPConf::initTestCase() +{ +} + +void Ut_IAPConf::cleanupTestCase() +{ +} + +void Ut_IAPConf::setupIAP() +{ + // Set bunch of values + mSubject->set("ipv4_type", "AUTO", + "wlan_wepkey1", "connt", + "wlan_wepdefkey", 1, + "wlan_ssid", QByteArray("CONNTEST-1")); + + // Set one value + mSubject->setValue("type", "WLAN_INFRA"); + + // Check all values that they were set correctly + QVERIFY(mSubject->value("ipv4_type").toString() == "AUTO"); + QVERIFY(mSubject->value("wlan_wepkey1").toString() == "connt"); + QVERIFY(mSubject->value("wlan_wepdefkey").toInt() == 1); + QVERIFY(mSubject->value("wlan_ssid").toByteArray() == QByteArray("CONNTEST-1")); + QVERIFY(mSubject->value("type").toString() == "WLAN_INFRA"); +} + +void Ut_IAPConf::setupIAPContainingDot() +{ + delete mSubject; + mSubject = new Maemo::IAPConf("test.iap"); + + // Set and check one value + mSubject->setValue("type", "DUMMY"); + QVERIFY(mSubject->value("type").toString() == "DUMMY"); +} + +void Ut_IAPConf::unsetIAPValueIsNotValid() +{ + QVariant invalidValue = mSubject->value("this_value_does_not_exist"); + QVERIFY(invalidValue.isValid() == false); +} + +void Ut_IAPConf::verifyAllIAPs() +{ + int count = 0, extras = 0; + QRegExp regexp("iap[1-3]"); + Maemo::IAPConf iap1("iap1"); + Maemo::IAPConf iap2("iap2"); + Maemo::IAPConf iap3("iap3"); + + iap1.clear(); + iap2.clear(); + iap3.clear(); + + iap1.setValue("name", "iap1"); + iap2.setValue("name", "iap2"); + iap3.setValue("name", "iap3"); + + count = extras = 0; + QList iaps; + Maemo::IAPConf::getAll(iaps, true); + foreach (QString iap_path, iaps) { + QString iap_id = iap_path.section('/', 5); /* This is the IAP id */ + if (!iap_id.contains(regexp)) { + extras++; + continue; + } + Maemo::IAPConf iap(iap_id); + QString name = iap.value("name").toString(); + QVERIFY(name == iap_id); + count++; + } + QCOMPARE(count, iaps.size()-extras); + + iap1.clear(); + iap2.clear(); + iap3.clear(); + + iap1.setValue("name", "iap1"); + iap2.setValue("name", "iap2"); + iap3.setValue("name", "iap3"); + + count = extras = 0; + Maemo::IAPConf::getAll(iaps); + foreach (QString iap_id, iaps) { + if (!iap_id.contains(regexp)) { + extras++; + continue; + } + Maemo::IAPConf iap(iap_id); + QString name = iap.value("name").toString(); + QVERIFY(name == iap_id); + count++; + } + QCOMPARE(count, iaps.size()-extras); +} + +void Ut_IAPConf::allForEmptyConfReturnsEmptyList() +{ + // Clear everything in configuration + mSubject->clearAll(); + + // Get all for a list and check that it is empty + QStringList iaps; + mSubject->getAll(iaps); + QVERIFY(iaps.isEmpty()); +} + +void Ut_IAPConf::settingInvalidValueUnsetsKey() +{ + // Setup some IAP + setupIAP(); + + // Set invalid value to unset "wlan_wepdefkey" key and verify that the + // value is unset + mSubject->setValue("wlan_wepdefkey", QVariant()); + QVERIFY(!mSubject->value("wlan_wepdefkey").isValid()); +} + +QTEST_MAIN(Ut_IAPConf) + +#include "ut_iapconf.moc" diff --git a/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp b/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp new file mode 100644 index 0000000..f14f623 --- /dev/null +++ b/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp @@ -0,0 +1,118 @@ +/* + libconninet - Internet Connectivity support library + + Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. + + Contact: Jukka Rissanen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + + +#include +#include + +#include +#include + +static const char *iap_id = "test_monitor_1"; + +class TestIAPMonitor : public Maemo::IAPMonitor +{ +public: + QString addedIap; + QString removedIap; + +protected: + virtual void iapAdded(const QString &id) + { + addedIap = id; + } + + virtual void iapRemoved(const QString &id) + { + removedIap = id; + } +}; + +class Ut_IAPMonitor : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void init(); + void cleanup(); + void initTestCase(); + void cleanupTestCase(); + + void check(); + +private: + TestIAPMonitor *mon; + Maemo::IAPConf *iap; +}; + +void Ut_IAPMonitor::init() +{ + mon = new TestIAPMonitor; +} + +void Ut_IAPMonitor::cleanup() +{ + delete mon; + mon = 0; +} + +void Ut_IAPMonitor::initTestCase() +{ +} + +void Ut_IAPMonitor::cleanupTestCase() +{ +} + +void Ut_IAPMonitor::check() +{ + QVERIFY(mon->addedIap.isEmpty()); + + iap = new Maemo::IAPConf(iap_id); + iap->set("ipv4_type", "AUTO", + "wlan_wepkey1", "connt", + "wlan_wepdefkey", 1, + "wlan_ssid", QByteArray(iap_id)); + + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + QVERIFY(mon->addedIap == iap_id); + mon->addedIap.clear(); + + QVERIFY(mon->removedIap.isEmpty()); + + // Unset only one value and verify that IAP is not removed + iap->set("ipv4_type", QVariant()); + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + QVERIFY(mon->removedIap.isEmpty()); + + // Clear the whole IAP and check that it is removed + iap->clear(); + delete iap; + + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + + QVERIFY(mon->removedIap == iap_id); +} + +QTEST_MAIN(Ut_IAPMonitor) + +#include "ut_iapmonitor.moc" diff --git a/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp b/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp new file mode 100644 index 0000000..494829d --- /dev/null +++ b/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp @@ -0,0 +1,274 @@ +/* + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * + * Contact: Jukka Rissanen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + + +// !!!! +// !!!! NOTE: THESE TEST DO NOT REALLY WORK YET BECAUSE OF MISSING +// !!!! FUNCTIONALITY IN ICD2 STUB. YOU HAVE BEEN WARNED. +// !!!! + + +#include +#include +#include +#include +#include + +#include "maemo_icd.h" + +class Ut_MaemoIcd : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void init(); + void cleanup(); + void initTestCase(); + void cleanupTestCase(); + + void scan_req(); + void scan_cancel_req(); + void connect_req_default(); + void state_req_all(); + void state_req(); + void statistics_req_all(); + void statistics_req(); + void addrinfo_req_all(); + void addrinfo_req(); + +private: + void disconnect_req_default(); // this is currently not run + void connect_req_specific(); // this is currently not run + QProcess *icd_stub; + bool connect_iap(Maemo::IcdConnectResult &connect_result, + QString &result, + QString &error, + QString iap=QString()); +}; + + +QString create_error_str(Maemo::Icd &icd) +{ + return icd.error(); +} + + +void Ut_MaemoIcd::init() +{ + icd_stub = new QProcess(this); + icd_stub->setStandardOutputFile("/tmp/ut_maemo_icd.log"); + icd_stub->start("/usr/bin/icd2_stub.py"); + QTest::qWait(1000); + + // Set the statistics + QProcess dbus_send; + dbus_send.start("dbus-send --type=method_call --system " + "--dest=com.nokia.icd2 /com/nokia/icd2 " + "com.nokia.icd2.testing.set_statistics " + "uint32:1024 uint32:256"); + dbus_send.waitForFinished(); + +} + +void Ut_MaemoIcd::cleanup() +{ + icd_stub->terminate(); + icd_stub->waitForFinished(); +} + +void Ut_MaemoIcd::initTestCase() +{ +} + +void Ut_MaemoIcd::cleanupTestCase() +{ +} + +void Ut_MaemoIcd::scan_req() +{ + QList scanned; + QStringList scannedNetworkTypes; + QStringList networkTypesToScan; + QString error; + Maemo::Icd icd(ICD_SHORT_SCAN_TIMEOUT); + + scannedNetworkTypes = icd.scan(ICD_SCAN_REQUEST_ACTIVE, + networkTypesToScan, + scanned, + error); + QVERIFY(error.isEmpty()); + QCOMPARE(scanned.size(), 3); + QVERIFY(scannedNetworkTypes[0] == "WLAN_INFRA"); + QVERIFY(scannedNetworkTypes[1] == "DUN_GSM_PS"); +} + +void Ut_MaemoIcd::scan_cancel_req() +{ + Maemo::Icd icd; + icd.scanCancel(); + // Not much to verify here +} + +bool Ut_MaemoIcd::connect_iap(Maemo::IcdConnectResult &connect_result, + QString &result, + QString &error, + QString iap) +{ + icd_connection_flags flags = ICD_CONNECTION_FLAG_USER_EVENT; + bool st; + Maemo::Icd icd(ICD_SHORT_CONNECT_TIMEOUT); + + if (iap.isEmpty()) { + qDebug() << "connecting to default IAP"; + st = icd.connect(flags, connect_result); + } else { + qDebug() << "connecting to" << iap; + st = icd.connect(flags, iap, result); + } + + error = create_error_str(icd); + return st; +} + +void Ut_MaemoIcd::connect_req_default() +{ + Maemo::IcdConnectResult connect_result; + QString result, error; + bool st; + st = connect_iap(connect_result, result, error); + QVERIFY2(st, error.toAscii().data()); + result = connect_result.connect.network_id.data(); + qDebug() << result; +} + + +void Ut_MaemoIcd::disconnect_req_default() +{ + icd_connection_flags flags = ICD_CONNECTION_FLAG_USER_EVENT; + bool st; + Maemo::Icd icd(ICD_SHORT_CONNECT_TIMEOUT); + icd.disconnect(flags); +} + + +void Ut_MaemoIcd::connect_req_specific() +{ + Maemo::IcdConnectResult connect_result; + QString result; + QString error; + bool st; + st = connect_iap(connect_result, result, error, "wpa2gx2.osso.net"); + QVERIFY2(st, error.toAscii().data()); + qDebug() << result; +} + + +void Ut_MaemoIcd::state_req_all() +{ + QList state_results; + Maemo::Icd icd; + int sig; + sig = icd.state(state_results); + QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); +} + + +void Ut_MaemoIcd::state_req() +{ + Maemo::IcdStateResult state_result; + Maemo::Icd icd; + int sig; + QString service_type, service_id; + QString network_type("WLAN_INFRA"); + QByteArray network_id("wpa2gx2.osso.net"); + sig = icd.state(service_type, 0, service_id, + network_type, (uint)0x17a1, network_id, + state_result); + QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); +} + + +void Ut_MaemoIcd::statistics_req_all() +{ + QList stats_results; + Maemo::Icd icd; + int sig; + QString err; + sig = icd.statistics(stats_results); + err = create_error_str(icd); + if (!err.isEmpty()) + QVERIFY2(sig==1, err.toAscii().data()); + else + QCOMPARE(sig, 1); + + for(int i=0; i addr_results; + Maemo::Icd icd; + int sig; + sig = icd.addrinfo(addr_results); + QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); +} + + +void Ut_MaemoIcd::addrinfo_req() +{ + Maemo::IcdAddressInfoResult addr_result; + Maemo::Icd icd; + int sig; + QString service_type, service_id; + QString network_type("WLAN_INFRA"); + QByteArray network_id("wpa2gx2.osso.net"); + sig = icd.addrinfo(service_type, 0, service_id, + network_type, (uint)0x17a1, network_id, + addr_result); + QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); +} + + +QTEST_MAIN(Ut_MaemoIcd) + +#include "ut_maemo_icd.moc" diff --git a/src/3rdparty/libconninet/tests/ut_proxyconf.cpp b/src/3rdparty/libconninet/tests/ut_proxyconf.cpp new file mode 100644 index 0000000..1f407f0 --- /dev/null +++ b/src/3rdparty/libconninet/tests/ut_proxyconf.cpp @@ -0,0 +1,400 @@ +/* + libconninet - Internet Connectivity support library + + Copyright (C) 2010 Nokia Corporation. All rights reserved. + + Contact: Jukka Rissanen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + + +#include +#include +#include +#include + +#include "../src/proxyconf.h" + +class Ut_ProxyConf : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void init(); + void cleanup(); + void initTestCase(); + void cleanupTestCase(); + + // tests without the factory + void proxy_ftp_no_factory_ok_auto(); + void proxy_ftp_no_factory_ok_manual(); + void proxy_http_no_factory_ok_manual(); + void proxy_https_no_factory_ok_manual(); + void proxy_socks_no_factory_ok_manual(); + void proxy_default_no_factory_ok_manual(); + + // tests using the factory + void proxy_ftp_factory_ok_auto(); + void proxy_ftp_factory_ok_manual(); + void proxy_http_factory_ok_manual(); + void proxy_https_factory_ok_manual(); + void proxy_socks_factory_ok_manual(); + void proxy_http_factory_ok_manual_clear(); + void proxy_default_factory_ok_manual(); + void proxy_http_factory_ok_manual_ignore_list(); + void proxy_default_factory_ok_manual_system(); + +private: + Maemo::ProxyConf *pc; +}; + + +void put(QString var, QString type, QString value) +{ + QProcess gconf; + if (value.isEmpty()) + gconf.start(QString("gconftool-2 -u /system/proxy/"+var)); + else + gconf.start(QString("gconftool-2 -s /system/proxy/"+var+" -t "+type+" "+value)); + gconf.waitForFinished(); +} + +void put_http(QString var, QString type, QString value) +{ + QProcess gconf; + if (value.isEmpty()) + gconf.start(QString("gconftool-2 -u /system/http_proxy/"+var)); + else + gconf.start(QString("gconftool-2 -s /system/http_proxy/"+var+" -t "+type+" "+value)); + gconf.waitForFinished(); +} + +void put_list(QString var, QString type, QList value) +{ + QProcess gconf; + QString values = "["; + foreach (QString str, value) + values = values + str + ","; + values.chop(1); + values = values + "]"; + + gconf.start(QString("gconftool-2 -s /system/http_proxy/"+var+" -t list --list-type="+type+" "+values)); + gconf.waitForFinished(); +} + + +void Ut_ProxyConf::init() +{ + put_http("host", "string", "my.proxy.com"); + put_http("port", "int", "8080"); + + QList list; + list.append("foo.bar.com"); + list.append("192.168.19.69"); + list.append("192.168.20.0/24"); + list.append("bar.foo.com"); + put_list("ignore_hosts", "string", list); + put_http("use_http_host", "boolean", "true"); + + put("mode", "string", "auto"); + put("autoconfig_url", "string", "http://foo.bar.com/autoconf"); + put("secure_host", "string", "secure_host.com"); + put("secure_port", "int", "112"); + + put("ftp_host", "string", "ftp.nuukia.com"); + put("ftp_port", "int", "2000"); + put("socks_host", "string", "socks.host.com"); + put("socks_port", "int", "10080"); + put("rtsp_host", "string", "rtsp.voice.com"); + put("rtsp_port", "int", "1554"); + + pc = new Maemo::ProxyConf(); +} + +void Ut_ProxyConf::cleanup() +{ + delete pc; + pc = 0; +} + +void Ut_ProxyConf::initTestCase() +{ +} + +void Ut_ProxyConf::cleanupTestCase() +{ +} + + +void Ut_ProxyConf::proxy_ftp_no_factory_ok_auto() +{ + QList nplist; + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); + + nplist = pc->flush(query); + QVERIFY(nplist.length()==0); +} + + +void Ut_ProxyConf::proxy_ftp_no_factory_ok_manual() +{ + QList nplist; + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); + + put("mode", "string", "manual"); + + nplist = pc->flush(query); + foreach (QNetworkProxy proxy, nplist) { + qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); + } + QVERIFY(nplist.length()==3); + QVERIFY(nplist.first().type() == QNetworkProxy::FtpCachingProxy); +} + + +void Ut_ProxyConf::proxy_http_no_factory_ok_manual() +{ + QList nplist; + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); + + put("mode", "string", "manual"); + + nplist = pc->flush(query); + foreach (QNetworkProxy proxy, nplist) { + qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); + } + QVERIFY(nplist.length()==3); + QVERIFY(nplist.first().type() == QNetworkProxy::HttpProxy); +} + + +void Ut_ProxyConf::proxy_https_no_factory_ok_manual() +{ + QList nplist; + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("https://maps.google.com/")); + + put("mode", "string", "manual"); + + nplist = pc->flush(query); + foreach (QNetworkProxy proxy, nplist) { + qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); + } + QVERIFY(nplist.length()==2); + QVERIFY(nplist.first().type() == QNetworkProxy::HttpProxy); +} + + +void Ut_ProxyConf::proxy_socks_no_factory_ok_manual() +{ + QList nplist; + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); + + put("mode", "string", "manual"); + put_http("host", "string", ""); + + nplist = pc->flush(query); + foreach (QNetworkProxy proxy, nplist) { + qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); + } + QVERIFY(nplist.length()==2); + QVERIFY(nplist.first().type() == QNetworkProxy::Socks5Proxy); +} + + +void Ut_ProxyConf::proxy_default_no_factory_ok_manual() +{ + QList nplist; + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("foobar://maps.google.com/")); + + put("mode", "string", "manual"); + put("socks_host", "string", ""); + put("secure_host", "string", ""); + + nplist = pc->flush(query); + foreach (QNetworkProxy proxy, nplist) { + qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); + } + QVERIFY(nplist.length()==0); +} + + +void Ut_ProxyConf::proxy_ftp_factory_ok_auto() +{ + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); + Maemo::ProxyConf::update(); + QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); + QVERIFY(listOfProxies.length()==1); + QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); + Maemo::ProxyConf::clear(); +} + + +void Ut_ProxyConf::proxy_ftp_factory_ok_manual() +{ + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); + Maemo::ProxyConf::update(); + + put("mode", "string", "manual"); + + QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); + + foreach (QNetworkProxy proxy, listOfProxies) { + qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); + } + QVERIFY(listOfProxies.length()==3); + QVERIFY(listOfProxies.first().type() == QNetworkProxy::FtpCachingProxy); + Maemo::ProxyConf::clear(); +} + + +void Ut_ProxyConf::proxy_http_factory_ok_manual() +{ + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); + Maemo::ProxyConf::update(); + + put("mode", "string", "manual"); + + QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); + + foreach (QNetworkProxy proxy, listOfProxies) { + qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); + } + QVERIFY(listOfProxies.length()==3); + QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); + Maemo::ProxyConf::clear(); +} + + +void Ut_ProxyConf::proxy_https_factory_ok_manual() +{ + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("https://maps.google.com/")); + Maemo::ProxyConf::update(); + + put("mode", "string", "manual"); + + QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); + + foreach (QNetworkProxy proxy, listOfProxies) { + qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); + } + QVERIFY(listOfProxies.length()==2); + QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); + Maemo::ProxyConf::clear(); +} + + +void Ut_ProxyConf::proxy_socks_factory_ok_manual() +{ + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); + Maemo::ProxyConf::update(); + + put("mode", "string", "manual"); + put_http("host", "string", ""); + + QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); + + foreach (QNetworkProxy proxy, listOfProxies) { + qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); + } + QVERIFY(listOfProxies.length()==2); + QVERIFY(listOfProxies.first().type() == QNetworkProxy::Socks5Proxy); + Maemo::ProxyConf::clear(); +} + + +void Ut_ProxyConf::proxy_http_factory_ok_manual_clear() +{ + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); + Maemo::ProxyConf::update(); + + put("mode", "string", "manual"); + put_http("host", "string", "192.168.1.1"); + + QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); + + foreach (QNetworkProxy proxy, listOfProxies) { + qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); + } + QVERIFY(listOfProxies.length()==3); + QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); + + Maemo::ProxyConf::clear(); + listOfProxies = QNetworkProxyFactory::proxyForQuery(query); + QVERIFY(listOfProxies.length()==1); + QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); +} + + +void Ut_ProxyConf::proxy_default_factory_ok_manual() +{ + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("foobar://maps.google.com/")); + Maemo::ProxyConf::update(); + + put("mode", "string", "manual"); + put("socks_host", "string", ""); + put("secure_host", "string", ""); + + QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); + + QVERIFY(listOfProxies.length()==1); + QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); + Maemo::ProxyConf::clear(); +} + + +void Ut_ProxyConf::proxy_http_factory_ok_manual_ignore_list() +{ + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://192.168.19.70/")); + Maemo::ProxyConf::update(); + + put("mode", "string", "manual"); + + QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); + + foreach (QNetworkProxy proxy, listOfProxies) { + qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); + } + QVERIFY(listOfProxies.length()==3); + QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); + + query = QNetworkProxyQuery(QUrl("http://192.168.20.10/")); + listOfProxies = QNetworkProxyFactory::proxyForQuery(query); + QVERIFY(listOfProxies.length()==1); + QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); + Maemo::ProxyConf::clear(); +} + + +void Ut_ProxyConf::proxy_default_factory_ok_manual_system() +{ + QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); + Maemo::ProxyConf::update(); + + put("mode", "string", "manual"); + + QList listOfProxies = QNetworkProxyFactory::systemProxyForQuery(query); + + QVERIFY(listOfProxies.length()==1); + QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); + Maemo::ProxyConf::clear(); +} + + + + +QTEST_MAIN(Ut_ProxyConf) + +#include "ut_proxyconf.moc" -- cgit v0.12 From fc8f2a77531879f1302388ad3fc6ff820885dfd8 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 10 Sep 2010 14:20:25 +0300 Subject: Provide a way to compile with RVCT 4.0 using generated Makefile. QT_RVCT_VERSION environment variable can be used to specify the desired RVCT version for symbian-sbsv2 Makefiles: E.g. QT_RVCT_VERSION=4.0, release-armv6 -> sbs -c arm.v6.urel.rvct4_0 If no version is specified, generic sbsv2 rvct aliases are used just like before: E.g. release-armv6 -> sbs -c armv6_urel Version specific make targets are also generated for each detected compiler: E.g. release-armv6-rvct4.0 -> sbs -c arm.v6.urel.rvct4_0 Also optimized finding the installed compiler versions. Task-number: QTBUG-13499 Reviewed-by: axis --- qmake/generators/symbian/symmake_sbsv2.cpp | 351 +++++++++++++++++++---------- qmake/generators/symbian/symmake_sbsv2.h | 15 +- 2 files changed, 240 insertions(+), 126 deletions(-) diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index c66c1b8..32c31ee 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -56,12 +56,21 @@ SymbianSbsv2MakefileGenerator::~SymbianSbsv2MakefileGenerator() { } #define FLM_DEST_DIR "epoc32/tools/makefile_templates/qt" #define FLM_SOURCE_DIR "/mkspecs/symbian-sbsv2/flm/qt" -#define UNDETECTED_GCCE_VERSION "0" #define PLATFORM_GCCE "gcce" #define PLATFORM_WINSCW "winscw" -#define PLATFORM_ARMV5 "armv5" +#define PLATFORM_ARM_PREFIX "arm" #define BUILD_DEBUG "udeb" #define BUILD_RELEASE "urel" +#define SBS_RVCT_PREFIX "rvct" + +static QString winscwPlatform; +static QString armPlatformPrefix; +static QString gccePlatform; +static QString sbsRvctPrefix; + +#if defined(Q_OS_UNIX) + extern char **environ; +#endif // Copies Qt FLMs to correct location under epocroot. // This is not done by configure as it is possible to change epocroot after configure. @@ -96,64 +105,95 @@ void SymbianSbsv2MakefileGenerator::exportFlm() } } -QString SymbianSbsv2MakefileGenerator::gcceVersion() +void SymbianSbsv2MakefileGenerator::findInstalledCompilerVersions(const QString &matchExpression, + const QString &versionPrefix, + QStringList *versionList) { - static QString gcceVersionStr; - - if (gcceVersionStr.isEmpty()) { - // First check if QT_GCCE_VERSION has been set, and use that if it is - QByteArray qtGcceVersion = qgetenv("QT_GCCE_VERSION"); - if (!qtGcceVersion.isEmpty()) { - // Check that QT_GCCE_VERSION is in proper format - QString check(qtGcceVersion); - check.replace(QRegExp("^\\d+\\.\\d+\\.\\d+$"),QString()); - if (check.isEmpty()) { - gcceVersionStr = PLATFORM_GCCE + QString(qtGcceVersion).replace(".","_"); - return gcceVersionStr; - } else { - fprintf(stderr, "Warning: Environment variable QT_GCCE_VERSION ('%s') is in incorrect " - "format, expected format is: '1.2.3'. Attempting to autodetect GCCE version.", - qtGcceVersion.constData()); + // No need to be able to find env variables on other operating systems, + // as only linux and windows have support for symbian-sbsv2 toolchain +#if defined(Q_OS_UNIX) || defined(Q_OS_WIN) + char *entry = 0; + int count = 0; + QRegExp matcher(matchExpression); + while ((entry = environ[count++])) { + if (matcher.exactMatch(QString::fromLocal8Bit(entry)) + && fileInfo(matcher.cap(matcher.captureCount())).exists()) { + // First capture (index 0) is the whole match, which is skipped. + // Next n captures are version numbers, which are interesting. + // Final capture is the env var value, which we alrady used, so that is skipped, too. + int capture = 1; + int finalCapture = matcher.captureCount() - 1; + QString version = versionPrefix; + while (capture <= finalCapture) { + version.append(matcher.cap(capture)); + if (capture != finalCapture) + version.append(QLatin1Char('.')); + capture++; } + *versionList << version; } - // Sbsv2 has separate env variable defined for each gcce version, so try to determine - // which user is likely to want to use by checking version 4.0.0 to 9.9.9 and taking - // the highest found version that actually points to a valid path. - // This is kind of a kludge, but since qmake doesn't bootstrap QProcess, there - // is no Qt API available to get all environment variables. - for (int i = 9; i >= 4; i--) { - for (int j = 9; j >= 0; j--) { - for (int k = 9; k >= 0; k--) { - QByteArray gcceVar = qgetenv(qPrintable(QString("SBS_GCCE%1%2%3BIN").arg(i).arg(j).arg(k))); - if (!gcceVar.isEmpty() && fileInfo(QString::fromLocal8Bit(gcceVar.constData())).exists()) { - gcceVersionStr = QString(PLATFORM_GCCE "%1_%2_%3").arg(i).arg(j).arg(k); - return gcceVersionStr; - } - } - } + } +#endif +} + +void SymbianSbsv2MakefileGenerator::findGcceVersions(QStringList *gcceVersionList, + QString *defaultVersion) +{ + QString matchStr = QLatin1String("SBS_GCCE(\\d)(\\d)(\\d)BIN=(.*)"); + findInstalledCompilerVersions(matchStr, gccePlatform, gcceVersionList); + + QString qtGcceVersion = QString::fromLocal8Bit(qgetenv("QT_GCCE_VERSION")); + + if (!qtGcceVersion.isEmpty()) { + if (QRegExp("\\d+\\.\\d+\\.\\d+").exactMatch(qtGcceVersion)) { + *defaultVersion = gccePlatform + qtGcceVersion; + } else { + fprintf(stderr, "Warning: Variable QT_GCCE_VERSION ('%s') is in incorrect " + "format, expected format is: 'x.y.z'. Attempting to autodetect GCCE version.\n", + qPrintable(qtGcceVersion)); } } - // Indicate undetected version to avoid rechecking multiple times - if (gcceVersionStr.isEmpty()) - gcceVersionStr = UNDETECTED_GCCE_VERSION; + if (defaultVersion->isEmpty() && gcceVersionList->size()) { + gcceVersionList->sort(); + *defaultVersion = gcceVersionList->last(); + } +} + +void SymbianSbsv2MakefileGenerator::findRvctVersions(QStringList *rvctVersionList, + QString *defaultVersion) +{ + QString matchStr = QLatin1String("RVCT(\\d)(\\d)BIN=(.*)"); + findInstalledCompilerVersions(matchStr, sbsRvctPrefix, rvctVersionList); + + QString qtRvctVersion = QString::fromLocal8Bit(qgetenv("QT_RVCT_VERSION")); - return gcceVersionStr; + if (!qtRvctVersion.isEmpty()) { + if (QRegExp("\\d+\\.\\d+").exactMatch(qtRvctVersion)) { + *defaultVersion = sbsRvctPrefix + qtRvctVersion; + } else { + fprintf(stderr, "Warning: Variable QT_RVCT_VERSION ('%s') is in incorrect " + "format, expected format is: 'x.y'.\n", + qPrintable(qtRvctVersion)); + } + } } -QString SymbianSbsv2MakefileGenerator::configClause(QString &platform, - QString &build, - QString &winscwClauseTemplate, - QString &gcceClauseTemplate, - QString &genericClauseTemplate) +QString SymbianSbsv2MakefileGenerator::configClause(const QString &platform, + const QString &build, + const QString &compilerVersion, + const QString &clauseTemplate) { QString retval; - if (QString::compare(platform, PLATFORM_WINSCW) == 0) - retval = winscwClauseTemplate.arg(build); - else if (QString::compare(platform, PLATFORM_GCCE) == 0) - retval = gcceClauseTemplate.arg(build); - else - retval = genericClauseTemplate.arg(platform).arg(build); + if (QString::compare(platform, winscwPlatform) == 0) { + retval = clauseTemplate.arg(build); + } else if (platform.startsWith(armPlatformPrefix)) { + QString fixedCompilerVersion = compilerVersion; + fixedCompilerVersion.replace(".","_"); + retval = clauseTemplate.arg(platform.mid(sizeof(PLATFORM_ARM_PREFIX)-1)) + .arg(build) + .arg(fixedCompilerVersion); + } // else - Unsupported platform for makefile target, return empty clause return retval; } @@ -185,52 +225,101 @@ void SymbianSbsv2MakefileGenerator::writeMkFile(const QString& wrapperFileName, void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile) { - static QString debugBuild(BUILD_DEBUG); - static QString releaseBuild(BUILD_RELEASE); + static QString debugBuild; + static QString releaseBuild; + static QString defaultGcceCompilerVersion; + static QString defaultRvctCompilerVersion; + static QStringList rvctVersions; + static QStringList gcceVersions; + static QStringList allArmCompilerVersions; + + // Initialize static variables used in makefile creation + if (debugBuild.isEmpty()) { + debugBuild.append(QLatin1String(BUILD_DEBUG)); + releaseBuild.append(QLatin1String(BUILD_RELEASE)); + winscwPlatform.append(QLatin1String(PLATFORM_WINSCW)); + gccePlatform.append(QLatin1String(PLATFORM_GCCE)); + armPlatformPrefix.append(QLatin1String(PLATFORM_ARM_PREFIX)); + sbsRvctPrefix.append(QLatin1String(SBS_RVCT_PREFIX)); + + findGcceVersions(&gcceVersions, &defaultGcceCompilerVersion); + findRvctVersions(&rvctVersions, &defaultRvctCompilerVersion); + + allArmCompilerVersions << rvctVersions << gcceVersions; + + if (!allArmCompilerVersions.size()) { + fprintf(stderr, "Warning: No HW compilers detected. " + "Please install either GCCE or RVCT compiler to enable release builds.\n"); + } + } QStringList allPlatforms; foreach(QString platform, project->values("SYMBIAN_PLATFORMS")) { allPlatforms << platform.toLower(); } + if (!gcceVersions.size()) + allPlatforms.removeAll(gccePlatform); + QString testClause; if (project->isActiveConfig(SYMBIAN_TEST_CONFIG)) testClause = QLatin1String(".test"); else testClause = QLatin1String(""); - QString genericClause = " -c %1_%2" + testClause; - QString winscwClause = " -c winscw_%1.mwccinc" + testClause; - QString gcceClause; - bool stripArmv5 = false; + // Note: armClause is used for gcce, too, which has a side effect + // of requiring armv* platform(s) in SYMBIAN_PLATFORMS in order + // to get any compiler version specific targets. + QString armClause = " -c " PLATFORM_ARM_PREFIX ".%1.%2.%3" + testClause; + QString genericArmClause; + if (defaultRvctCompilerVersion.isEmpty()) { + // Note: Argument %3 needs to be empty string in this version of clause + genericArmClause = " -c " PLATFORM_ARM_PREFIX "%1_%2%3" + testClause; + } else { + // If defaultRvctCompilerVersion is defined, use specific sbs clause for "generic" clause + genericArmClause = armClause; + } + QString winscwClause = " -c " PLATFORM_WINSCW "_%1.mwccinc" + testClause;; - if (allPlatforms.contains(PLATFORM_GCCE)) { - if (QString::compare(gcceVersion(), UNDETECTED_GCCE_VERSION) == 0) { - allPlatforms.removeAll(PLATFORM_GCCE); - } else { - gcceClause = " -c arm.v5.%1." + gcceVersion() + testClause; - // Since gcce building is enabled, do not add armv5 for any sbs command - // that also contains gcce, because those will build same targets. - stripArmv5 = true; + QStringList armPlatforms = allPlatforms.filter(QRegExp("^" PLATFORM_ARM_PREFIX)); + + if (!allArmCompilerVersions.size()) { + foreach (QString item, armPlatforms) { + allPlatforms.removeAll(item); } + armPlatforms.clear(); } QStringList allClauses; QStringList debugClauses; QStringList releaseClauses; + // Only winscw and arm platforms are supported QStringList debugPlatforms = allPlatforms; QStringList releasePlatforms = allPlatforms; - releasePlatforms.removeAll(PLATFORM_WINSCW); // No release for emulator + releasePlatforms.removeAll(winscwPlatform); // No release for emulator - foreach(QString item, debugPlatforms) { - if (item != PLATFORM_ARMV5 || !stripArmv5) - debugClauses << configClause(item, debugBuild, winscwClause, gcceClause, genericClause); + if (!releasePlatforms.size()) { + fprintf(stderr, "Warning: No valid release platforms in SYMBIAN_PLATFORMS (%s)\n" + "Most likely required compiler(s) are not properly installed.\n", + qPrintable(project->values("SYMBIAN_PLATFORMS").join(" "))); } - foreach(QString item, releasePlatforms) { - if (item != PLATFORM_ARMV5 || !stripArmv5) - releaseClauses << configClause(item, releaseBuild, winscwClause, gcceClause, genericClause); + + if (debugPlatforms.contains(winscwPlatform)) + debugClauses << configClause(winscwPlatform, debugBuild, QString(), winscwClause); + + foreach(QString item, armPlatforms) { + // Only use single clause per arm platform even if multiple compiler versions were found, + // otherwise we get makefile target collisions from sbsv2 toolchain. + if (rvctVersions.size()) { + debugClauses << configClause(item, debugBuild, defaultRvctCompilerVersion, genericArmClause); + releaseClauses << configClause(item, releaseBuild, defaultRvctCompilerVersion, genericArmClause); + } else { + debugClauses << configClause(item, debugBuild, defaultGcceCompilerVersion, armClause); + releaseClauses << configClause(item, releaseBuild, defaultGcceCompilerVersion, armClause); + } } + allClauses << debugClauses << releaseClauses; QTextStream t(&wrapperFile); @@ -270,22 +359,20 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << " -I\"" << values.at(i) << "\" "; } } - t << endl; - t << "first: default" << endl; - if (debugPlatforms.contains(PLATFORM_WINSCW)) - t << "default: debug-winscw"; - else if (debugPlatforms.contains(PLATFORM_ARMV5)) - t << "default: debug-armv5"; - else if (debugPlatforms.size()) - t << "default: debug-" << debugPlatforms.first(); - else - t << "default: all"; t << endl; + t << "first: default" << endl << endl; if (!isPrimaryMakefile) { - t << "all:" << endl; + t << "all:" << endl << endl; + t << "default: all" << endl << endl; } else { - t << "all: debug release" << endl; + t << "all: debug release" << endl << endl; + if (debugPlatforms.contains(winscwPlatform)) + t << "default: debug-winscw"; + else if (debugPlatforms.size()) + t << "default: debug-" << debugPlatforms.first(); + else + t << "default: all"; t << endl; QString qmakeCmd = "\t$(QMAKE) \"" + project->projectFile() + "\" " + buildArgs(); @@ -302,30 +389,80 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "debug: " << BLD_INF_FILENAME << endl; t << "\t$(SBS)"; - foreach(QString item, debugClauses) { - t << item; + foreach(QString clause, debugClauses) { + t << clause; + } + t << endl; + t << "clean-debug: " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) reallyclean"; + foreach(QString clause, debugClauses) { + t << clause; } t << endl; t << "release: " << BLD_INF_FILENAME << endl; t << "\t$(SBS)"; - foreach(QString item, releaseClauses) { - t << item; + foreach(QString clause, releaseClauses) { + t << clause; } t << endl; + t << "clean-release: " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) reallyclean"; + foreach(QString clause, releaseClauses) { + t << clause; + } + t << endl << endl; + + QString defaultGcceArmVersion; + if (armPlatforms.size()) { + defaultGcceArmVersion = armPlatforms.first(); + } else { + defaultGcceArmVersion = QLatin1String("armv5"); + } - // For more specific builds, targets are in this form: build-platform, e.g. release-armv5 + // For more specific builds, targets are in this form: + // release-armv5 - generic target, compiler version determined by toolchain or autodetection + // release-armv5-rvct4.0 - compiler version specific target foreach(QString item, debugPlatforms) { + QString clause; + if (item.compare(winscwPlatform) == 0) + clause = configClause(item, debugBuild, QString(), winscwClause); + else if (item.compare(gccePlatform) == 0 ) + clause = configClause(defaultGcceArmVersion, debugBuild, defaultGcceCompilerVersion, armClause); + else // use generic arm clause + clause = configClause(item, debugBuild, defaultRvctCompilerVersion, genericArmClause); + t << "debug-" << item << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS)"; - t << configClause(item, debugBuild, winscwClause, gcceClause, genericClause); - t << endl; + t << "\t$(SBS)" << clause << endl; + t << "clean-debug-" << item << ": " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) reallyclean" << clause << endl; } foreach(QString item, releasePlatforms) { + QString clause; + if (item.compare(gccePlatform) == 0 ) + clause = configClause(defaultGcceArmVersion, releaseBuild, defaultGcceCompilerVersion, armClause); + else // use generic arm clause + clause = configClause(item, releaseBuild, defaultRvctCompilerVersion, genericArmClause); + t << "release-" << item << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS)"; - t << configClause(item, releaseBuild, winscwClause, gcceClause, genericClause); - t << endl; + t << "\t$(SBS)" << clause << endl; + t << "clean-release-" << item << ": " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) reallyclean" << clause << endl; + } + + foreach(QString item, armPlatforms) { + foreach(QString compilerVersion, allArmCompilerVersions) { + QString debugClause = configClause(item, debugBuild, compilerVersion, armClause); + QString releaseClause = configClause(item, releaseBuild, compilerVersion, armClause); + t << "debug-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; + t << "\t$(SBS)" << debugClause << endl; + t << "clean-debug-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) reallyclean" << debugClause << endl; + t << "release-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; + t << "\t$(SBS)" << releaseClause << endl; + t << "clean-release-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) reallyclean" << releaseClause << endl; + } } t << endl; @@ -344,7 +481,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << endl << endl; } - // Add all extra targets including extra compiler targest also to wrapper makefile, + // Add all extra targets including extra compiler targets also to wrapper makefile, // even though many of them may have already been added to bld.inf as FLMs. // This is to enable use of targets like 'mocables', which call targets generated by extra compilers. if (targetType != TypeSubdirs) { @@ -365,32 +502,6 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo } t << endl << endl; - t << "clean-debug: " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean"; - foreach(QString clause, debugClauses) { - t << clause; - } - t << endl << endl; - t << "clean-release: " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean"; - foreach(QString clause, releaseClauses) { - t << clause; - } - t << endl << endl; - - // For more specific builds, targets are in this form: clean-build-platform, e.g. clean-release-armv5 - foreach(QString item, debugPlatforms) { - t << "clean-debug-" << item << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean"; - t << configClause(item, debugBuild, winscwClause, gcceClause, genericClause); - t << endl; - } - foreach(QString item, releasePlatforms) { - t << "clean-release-" << item << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean"; - t << configClause(item, releaseBuild, winscwClause, gcceClause, genericClause); - t << endl; - } t << endl; } diff --git a/qmake/generators/symbian/symmake_sbsv2.h b/qmake/generators/symbian/symmake_sbsv2.h index 6644a03..557e3dd 100644 --- a/qmake/generators/symbian/symmake_sbsv2.h +++ b/qmake/generators/symbian/symmake_sbsv2.h @@ -65,12 +65,15 @@ public: private: void exportFlm(); - QString gcceVersion(); - QString configClause(QString &platform, - QString &build, - QString &winscwClauseTemplate, - QString &gcceClauseTemplate, - QString &genericClauseTemplate); + void findGcceVersions(QStringList *gcceVersionList, QString *defaultVersion); + void findRvctVersions(QStringList *rvctVersionList, QString *defaultVersion); + void findInstalledCompilerVersions(const QString &matchExpression, + const QString &versionPrefix, + QStringList *versionList); + QString configClause(const QString &platform, + const QString &build, + const QString &compilerVersion, + const QString &clauseTemplate); void writeSbsDeploymentList(const DeploymentList& depList, QTextStream& t); -- cgit v0.12 From f055e5daf17d73a56ac956c273a0a7160e634e7b Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 16 Sep 2010 10:43:54 +0300 Subject: QS60style: itemview selection indication works incorrectly Currently QS60Style shows tick mark for listWidget with multiselection capability only after two or more items are selected. This is fixed so that selection indication is shown in multiselection itemviews (all of them and not just list widget) irregardless of number of selected items. Also, if itemview loses focus with singleitem itemview, style now still draws item highlight to it (with 50% transparency). Task-number: QTBUG-12875, QTBUG-13072 Reviewed-by: Janne Anttila --- src/gui/styles/qs60style.cpp | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 358c6aa..971e1e3 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1430,11 +1430,25 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, const QRect iconRect = subElementRect(SE_ItemViewItemDecoration, &voptAdj, widget); QRect textRect = subElementRect(SE_ItemViewItemText, &voptAdj, widget); const QAbstractItemView *itemView = qobject_cast(widget); + const bool singleSelection = + (itemView->selectionMode() == QAbstractItemView::SingleSelection || + itemView->selectionMode() == QAbstractItemView::NoSelection); + const bool selectItems = (itemView->selectionBehavior() == QAbstractItemView::SelectItems); - // draw themed background for table unless background brush has been defined. + // draw themed background for itemview unless background brush has been defined. if (vopt->backgroundBrush == Qt::NoBrush) { if (itemView) { + //With single item selection, use highlight focus as selection indicator. + if (singleSelection && isSelected){ + voptAdj.state = voptAdj.state | State_HasFocus; + if (!hasFocus && selectItems) { + painter->save(); + painter->setOpacity(0.5); + } + } drawPrimitive(PE_PanelItemViewItem, &voptAdj, painter, widget); + if (singleSelection && isSelected && !hasFocus && selectItems) + painter->restore(); } } else { QCommonStyle::drawPrimitive(PE_PanelItemViewItem, &voptAdj, painter, widget);} @@ -1444,27 +1458,19 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, voptAdj.icon.paint(painter, iconRect, voptAdj.decorationAlignment, mode, state); // Draw selection check mark. Show check mark only in multi selection modes. - if (itemView) { - const bool singleSelection = - (itemView->selectionMode() == QAbstractItemView::SingleSelection || - itemView->selectionMode() == QAbstractItemView::NoSelection)|| - (itemView->selectionModel()->selectedIndexes().count() < 2 ); - - const bool selectItemsOnly = (itemView->selectionBehavior() == QAbstractItemView::SelectItems); - + if (itemView && !singleSelection) { const QRect selectionRect = subElementRect(SE_ItemViewItemCheckIndicator, &voptAdj, widget); QStyleOptionViewItemV4 checkMarkOption(voptAdj); if (selectionRect.isValid()) checkMarkOption.rect = selectionRect; // Draw selection mark. - if (isSelected && !singleSelection && selectItemsOnly) { + if (isSelected && selectItems) { proxy()->drawPrimitive(PE_IndicatorViewItemCheck, &checkMarkOption, painter, widget); // @todo: this should happen in the rect retrievel i.e. subElementRect() if (textRect.right() > selectionRect.left()) textRect.setRight(selectionRect.left()); - } else if (singleSelection && - voptAdj.features & QStyleOptionViewItemV2::HasCheckIndicator) { + } else if (voptAdj.features & QStyleOptionViewItemV2::HasCheckIndicator) { checkMarkOption.state = checkMarkOption.state & ~State_HasFocus; switch (vopt->checkState) { @@ -1484,7 +1490,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, // draw the text if (!voptAdj.text.isEmpty()) { - if (isSelected || hasFocus ) + if (hasFocus) painter->setPen(voptAdj.palette.highlightedText().color()); else painter->setPen(voptAdj.palette.text().color()); @@ -2314,7 +2320,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti QAbstractItemView::SelectionBehavior selectionBehavior = itemView ? itemView->selectionBehavior() : QAbstractItemView::SelectItems; // Set the draw area for highlights (focus, select rect or pressed rect) - if (hasFocus || isSelected || isPressed) { + if (hasFocus || isPressed) { if (selectionBehavior != QAbstractItemView::SelectItems) { // set highlight rect so that it is continuous from cell to cell, yet sligthly // smaller than cell rect @@ -2344,7 +2350,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti QRect elementRect = option->rect; //draw item is drawn as pressed, if it already has focus. - if (isPressed && (hasFocus || isSelected)) { + if (isPressed && hasFocus) { themeGraphicDefined = true; element = tableView ? QS60StylePrivate::SE_TableItemPressed : QS60StylePrivate::SE_ListItemPressed; } else if (hasFocus || (isSelected && selectionBehavior != QAbstractItemView::SelectItems)) { @@ -2984,7 +2990,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con case SE_ItemViewItemText: case SE_ItemViewItemDecoration: if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast(opt)) { - const QListWidget *listItem = qobject_cast(widget); + const QAbstractItemView *listItem = qobject_cast(widget); const bool multiSelection = !listItem ? false : listItem->selectionMode() == QAbstractItemView::MultiSelection || listItem->selectionMode() == QAbstractItemView::ExtendedSelection || @@ -3054,7 +3060,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con break; case SE_ItemViewItemCheckIndicator: if (const QStyleOptionViewItemV2 *vopt = qstyleoption_cast(opt)) { - const QListWidget *listItem = qobject_cast(widget); + const QAbstractItemView *listItem = qobject_cast(widget); const bool singleSelection = listItem && (listItem->selectionMode() == QAbstractItemView::SingleSelection || -- cgit v0.12 From b1cea5eb85645450b29fd673795325ed0d4d7009 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 16 Sep 2010 09:54:19 +0200 Subject: Make test less sensitive to platform specifics Zero timers on Windows are implemented using posted events, as are QueuedConnections, making the QTBUG13633_dontBlockEvents test sensitive to the order between invokeMethod() and starting a zero timer. Reviewed-by: Olivier --- tests/auto/qtimer/tst_qtimer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp index 73b3452..f23d065 100644 --- a/tests/auto/qtimer/tst_qtimer.cpp +++ b/tests/auto/qtimer/tst_qtimer.cpp @@ -701,8 +701,8 @@ DontBlockEvents::DontBlockEvents() void DontBlockEvents::timerEvent(QTimerEvent* event) { if (event->timerId() == m_timer.timerId()) { - m_timer.start(0, this); QMetaObject::invokeMethod(this, "paintEvent", Qt::QueuedConnection); + m_timer.start(0, this); count++; QCOMPARE(count, 1); total++; -- cgit v0.12 From ee03482e47cf9ce285cf2d578a22fc0702e4a30c Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Thu, 16 Sep 2010 14:50:05 +1000 Subject: Optimize FontLoader for "multi-use". Task-number: QTBUG-13419 Reviewed-by: Michael Brasser --- src/declarative/util/qdeclarativefontloader.cpp | 199 +++++++++++++++--------- src/declarative/util/qdeclarativefontloader_p.h | 2 +- 2 files changed, 129 insertions(+), 72 deletions(-) diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp index 1755855..91588b7 100644 --- a/src/declarative/util/qdeclarativefontloader.cpp +++ b/src/declarative/util/qdeclarativefontloader.cpp @@ -58,23 +58,91 @@ QT_BEGIN_NAMESPACE +#define FONTLOADER_MAXIMUM_REDIRECT_RECURSION 16 + +class QDeclarativeFontObject : public QObject +{ +Q_OBJECT + +public: + QDeclarativeFontObject(int _id); + + void download(const QUrl &url, QNetworkAccessManager *manager); + +Q_SIGNALS: + void fontDownloaded(const QString&, QDeclarativeFontLoader::Status); + +private Q_SLOTS: + void replyFinished(); + +public: + int id; + +private: + QNetworkReply *reply; + int redirectCount; + + Q_DISABLE_COPY(QDeclarativeFontObject) +}; + +QDeclarativeFontObject::QDeclarativeFontObject(int _id = -1) + : QObject(0), id(_id), reply(0), redirectCount(0) {} + + +void QDeclarativeFontObject::download(const QUrl &url, QNetworkAccessManager *manager) +{ + QNetworkRequest req(url); + req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); + reply = manager->get(req); + QObject::connect(reply, SIGNAL(finished()), this, SLOT(replyFinished())); +} + +void QDeclarativeFontObject::replyFinished() +{ + if (reply) { + redirectCount++; + if (redirectCount < FONTLOADER_MAXIMUM_REDIRECT_RECURSION) { + QVariant redirect = reply->attribute(QNetworkRequest::RedirectionTargetAttribute); + if (redirect.isValid()) { + QUrl url = reply->url().resolved(redirect.toUrl()); + QNetworkAccessManager *manager = reply->manager(); + reply->deleteLater(); + reply = 0; + download(url, manager); + return; + } + } + redirectCount = 0; + + if (!reply->error()) { + id = QFontDatabase::addApplicationFontFromData(reply->readAll()); + if (id != -1) + emit fontDownloaded(QFontDatabase::applicationFontFamilies(id).at(0), QDeclarativeFontLoader::Ready); + else + emit fontDownloaded(QString(), QDeclarativeFontLoader::Error); + } else { + emit fontDownloaded(QString(), QDeclarativeFontLoader::Error); + } + reply->deleteLater(); + reply = 0; + } +} + + class QDeclarativeFontLoaderPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QDeclarativeFontLoader) public: - QDeclarativeFontLoaderPrivate() : reply(0), status(QDeclarativeFontLoader::Null), redirectCount(0) {} - - void addFontToDatabase(const QByteArray &); + QDeclarativeFontLoaderPrivate() : status(QDeclarativeFontLoader::Null) {} QUrl url; QString name; - QNetworkReply *reply; QDeclarativeFontLoader::Status status; - int redirectCount; + static QHash fonts; }; - +QHash QDeclarativeFontLoaderPrivate::fonts; /*! \qmlclass FontLoader QDeclarativeFontLoader @@ -127,30 +195,65 @@ void QDeclarativeFontLoader::setSource(const QUrl &url) if (url == d->url) return; d->url = qmlContext(this)->resolvedUrl(url); - - d->status = Loading; - emit statusChanged(); emit sourceChanged(); + #ifndef QT_NO_LOCALFILE_OPTIMIZED_QML - QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(d->url); - if (!lf.isEmpty()) { - int id = QFontDatabase::addApplicationFont(lf); - if (id != -1) { - d->name = QFontDatabase::applicationFontFamilies(id).at(0); + QString localFile = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(d->url); + if (!localFile.isEmpty()) { + if (!d->fonts.contains(d->url)) { + int id = QFontDatabase::addApplicationFont(localFile); + if (id != -1) { + updateFontInfo(QFontDatabase::applicationFontFamilies(id).at(0), Ready); + QDeclarativeFontObject *fo = new QDeclarativeFontObject(id); + d->fonts[d->url] = fo; + } else { + updateFontInfo(QString(), Error); + } + } else { + QDeclarativeFontObject *fo = d->fonts[d->url]; + d->name = QFontDatabase::applicationFontFamilies(fo->id).at(0); emit nameChanged(); d->status = QDeclarativeFontLoader::Ready; - } else { - d->status = QDeclarativeFontLoader::Error; - qmlInfo(this) << "Cannot load font: \"" << url.toString() << "\""; + emit statusChanged(); } - emit statusChanged(); } else #endif { - QNetworkRequest req(d->url); - req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); - d->reply = qmlEngine(this)->networkAccessManager()->get(req); - QObject::connect(d->reply, SIGNAL(finished()), this, SLOT(replyFinished())); + if (!d->fonts.contains(d->url)) { + QDeclarativeFontObject *fo = new QDeclarativeFontObject; + d->fonts[d->url] = fo; + fo->download(d->url, qmlEngine(this)->networkAccessManager()); + d->status = Loading; + emit statusChanged(); + QObject::connect(fo, SIGNAL(fontDownloaded(QString, QDeclarativeFontLoader::Status)), + this, SLOT(updateFontInfo(QString, QDeclarativeFontLoader::Status))); + } else { + QDeclarativeFontObject *fo = d->fonts[d->url]; + if (fo->id == -1) { + d->status = Loading; + emit statusChanged(); + QObject::connect(fo, SIGNAL(fontDownloaded(QString, QDeclarativeFontLoader::Status)), + this, SLOT(updateFontInfo(QString, QDeclarativeFontLoader::Status))); + } + else + updateFontInfo(QFontDatabase::applicationFontFamilies(fo->id).at(0), Ready); + } + } +} + +void QDeclarativeFontLoader::updateFontInfo(const QString& name, QDeclarativeFontLoader::Status status) +{ + Q_D(QDeclarativeFontLoader); + + if (name != d->name) { + d->name = name; + emit nameChanged(); + } + if (status != d->status) { + if (status == Error) + qmlInfo(this) << "Cannot load font: \"" << d->url.toString() << "\""; + d->status = status; + emit statusChanged(); } } @@ -177,7 +280,7 @@ QString QDeclarativeFontLoader::name() const void QDeclarativeFontLoader::setName(const QString &name) { Q_D(QDeclarativeFontLoader); - if (d->name == name ) + if (d->name == name) return; d->name = name; emit nameChanged(); @@ -223,52 +326,6 @@ QDeclarativeFontLoader::Status QDeclarativeFontLoader::status() const return d->status; } -#define FONTLOADER_MAXIMUM_REDIRECT_RECURSION 16 - -void QDeclarativeFontLoader::replyFinished() -{ - Q_D(QDeclarativeFontLoader); - if (d->reply) { - d->redirectCount++; - if (d->redirectCount < FONTLOADER_MAXIMUM_REDIRECT_RECURSION) { - QVariant redirect = d->reply->attribute(QNetworkRequest::RedirectionTargetAttribute); - if (redirect.isValid()) { - QUrl url = d->reply->url().resolved(redirect.toUrl()); - d->reply->deleteLater(); - d->reply = 0; - setSource(url); - return; - } - } - d->redirectCount=0; - - if (!d->reply->error()) { - QByteArray ba = d->reply->readAll(); - d->addFontToDatabase(ba); - } else { - d->status = Error; - qmlInfo(this) << "Cannot load font: \"" << d->reply->url().toString() << "\""; - emit statusChanged(); - } - d->reply->deleteLater(); - d->reply = 0; - } -} - -void QDeclarativeFontLoaderPrivate::addFontToDatabase(const QByteArray &ba) -{ - Q_Q(QDeclarativeFontLoader); - - int id = QFontDatabase::addApplicationFontFromData(ba); - if (id != -1) { - name = QFontDatabase::applicationFontFamilies(id).at(0); - emit q->nameChanged(); - status = QDeclarativeFontLoader::Ready; - } else { - status = QDeclarativeFontLoader::Error; - qmlInfo(q) << "Cannot load font: \"" << url.toString() << "\""; - } - emit q->statusChanged(); -} - QT_END_NAMESPACE + +#include diff --git a/src/declarative/util/qdeclarativefontloader_p.h b/src/declarative/util/qdeclarativefontloader_p.h index 0344d99..bebd5a0 100644 --- a/src/declarative/util/qdeclarativefontloader_p.h +++ b/src/declarative/util/qdeclarativefontloader_p.h @@ -79,7 +79,7 @@ public: Status status() const; private Q_SLOTS: - void replyFinished(); + void updateFontInfo(const QString&, QDeclarativeFontLoader::Status); Q_SIGNALS: void sourceChanged(); -- cgit v0.12 From 71ffdcb4da039acba8d34c2b23484bd335bd736d Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Thu, 16 Sep 2010 17:44:27 +1000 Subject: Update QtDeclarative def files Task-number: Reviewed-by: Martin Jones --- src/s60installs/bwins/QtDeclarativeu.def | 24 +++++++++++++++++++++++- src/s60installs/eabi/QtDeclarativeu.def | 22 ++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index a2bff5d..0193381 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -1689,5 +1689,27 @@ EXPORTS ?tr@QDeclarativePropertyChanges@@SA?AVQString@@PBD0@Z @ 1688 NONAME ; class QString QDeclarativePropertyChanges::tr(char const *, char const *) ?changeBindingInRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@PAVQDeclarativeAbstractBinding@@@Z @ 1689 NONAME ; bool QDeclarativeState::changeBindingInRevertList(class QObject *, class QByteArray const &, class QDeclarativeAbstractBinding *) ?getStaticMetaObject@QDeclarativePropertyChanges@@SAABUQMetaObject@@XZ @ 1690 NONAME ; struct QMetaObject const & QDeclarativePropertyChanges::getStaticMetaObject(void) - ?weakPointer@QDeclarativeAbstractBinding@@QAE?AV?$QWeakPointer@VQDeclarativeAbstractBinding@@@@XZ @ 1691 NONAME ; class QWeakPointer QDeclarativeAbstractBinding::weakPointer(void) + ?weakPointer@QDeclarativeAbstractBinding@@QAE?AV?$QWeakPointer@VQDeclarativeAbstractBinding@@@@XZ @ 1691 NONAME ABSENT ; class QWeakPointer QDeclarativeAbstractBinding::weakPointer(void) + ?getStaticMetaObject@QDeclarativeScriptAction@@SAABUQMetaObject@@XZ @ 1692 NONAME ; struct QMetaObject const & QDeclarativeScriptAction::getStaticMetaObject(void) + ?qt_metacall@QDeclarativeScriptAction@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1693 NONAME ; int QDeclarativeScriptAction::qt_metacall(enum QMetaObject::Call, int, void * *) + ??1QDeclarativeScriptAction@@UAE@XZ @ 1694 NONAME ; QDeclarativeScriptAction::~QDeclarativeScriptAction(void) + ?stateChangeScriptName@QDeclarativeScriptAction@@QBE?AVQString@@XZ @ 1695 NONAME ; class QString QDeclarativeScriptAction::stateChangeScriptName(void) const + ?script@QDeclarativeScriptAction@@QBE?AVQDeclarativeScriptString@@XZ @ 1696 NONAME ; class QDeclarativeScriptString QDeclarativeScriptAction::script(void) const + ?qt_metacast@QDeclarativeScriptAction@@UAEPAXPBD@Z @ 1697 NONAME ; void * QDeclarativeScriptAction::qt_metacast(char const *) + ?tr@QDeclarativeScriptAction@@SA?AVQString@@PBD0@Z @ 1698 NONAME ; class QString QDeclarativeScriptAction::tr(char const *, char const *) + ?setStateChangeScriptName@QDeclarativeScriptAction@@QAEXABVQString@@@Z @ 1699 NONAME ; void QDeclarativeScriptAction::setStateChangeScriptName(class QString const &) + ??_EQDeclarativeScriptAction@@UAE@I@Z @ 1700 NONAME ; QDeclarativeScriptAction::~QDeclarativeScriptAction(unsigned int) + ?d_func@QDeclarativeScriptAction@@ABEPBVQDeclarativeScriptActionPrivate@@XZ @ 1701 NONAME ; class QDeclarativeScriptActionPrivate const * QDeclarativeScriptAction::d_func(void) const + ?weakPointer@QDeclarativeAbstractBinding@@AAE?AV?$QWeakPointer@VQDeclarativeAbstractBinding@@@@XZ @ 1702 NONAME ; class QWeakPointer QDeclarativeAbstractBinding::weakPointer(void) + ?trUtf8@QDeclarativeScriptAction@@SA?AVQString@@PBD0H@Z @ 1703 NONAME ; class QString QDeclarativeScriptAction::trUtf8(char const *, char const *, int) + ?trUtf8@QDeclarativeScriptAction@@SA?AVQString@@PBD0@Z @ 1704 NONAME ; class QString QDeclarativeScriptAction::trUtf8(char const *, char const *) + ?qtAnimation@QDeclarativeScriptAction@@MAEPAVQAbstractAnimation@@XZ @ 1705 NONAME ; class QAbstractAnimation * QDeclarativeScriptAction::qtAnimation(void) + ??0QDeclarativeScriptAction@@QAE@PAVQObject@@@Z @ 1706 NONAME ; QDeclarativeScriptAction::QDeclarativeScriptAction(class QObject *) + ?tr@QDeclarativeScriptAction@@SA?AVQString@@PBD0H@Z @ 1707 NONAME ; class QString QDeclarativeScriptAction::tr(char const *, char const *, int) + ?d_func@QDeclarativeScriptAction@@AAEPAVQDeclarativeScriptActionPrivate@@XZ @ 1708 NONAME ; class QDeclarativeScriptActionPrivate * QDeclarativeScriptAction::d_func(void) + ?transition@QDeclarativeScriptAction@@MAEXAAV?$QList@VQDeclarativeAction@@@@AAV?$QList@VQDeclarativeProperty@@@@W4TransitionDirection@QDeclarativeAbstractAnimation@@@Z @ 1709 NONAME ; void QDeclarativeScriptAction::transition(class QList &, class QList &, enum QDeclarativeAbstractAnimation::TransitionDirection) + ?staticMetaObject@QDeclarativeScriptAction@@2UQMetaObject@@B @ 1710 NONAME ; struct QMetaObject const QDeclarativeScriptAction::staticMetaObject + ?setScript@QDeclarativeScriptAction@@QAEXABVQDeclarativeScriptString@@@Z @ 1711 NONAME ; void QDeclarativeScriptAction::setScript(class QDeclarativeScriptString const &) + ?metaObject@QDeclarativeScriptAction@@UBEPBUQMetaObject@@XZ @ 1712 NONAME ; struct QMetaObject const * QDeclarativeScriptAction::metaObject(void) const + ?getPointer@QDeclarativeAbstractBinding@@SA?AV?$QWeakPointer@VQDeclarativeAbstractBinding@@@@PAV1@@Z @ 1713 NONAME ; class QWeakPointer QDeclarativeAbstractBinding::getPointer(class QDeclarativeAbstractBinding *) diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index 37325fa..2016ec7 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -1722,4 +1722,26 @@ EXPORTS _ZNK27QDeclarativePropertyChanges8propertyERK10QByteArray @ 1721 NONAME _ZTI27QDeclarativePropertyChanges @ 1722 NONAME _ZTV27QDeclarativePropertyChanges @ 1723 NONAME + _ZN24QDeclarativeScriptAction10transitionER5QListI18QDeclarativeActionERS0_I20QDeclarativePropertyEN29QDeclarativeAbstractAnimation19TransitionDirectionE @ 1724 NONAME + _ZN24QDeclarativeScriptAction11qtAnimationEv @ 1725 NONAME + _ZN24QDeclarativeScriptAction11qt_metacallEN11QMetaObject4CallEiPPv @ 1726 NONAME + _ZN24QDeclarativeScriptAction11qt_metacastEPKc @ 1727 NONAME + _ZN24QDeclarativeScriptAction16staticMetaObjectE @ 1728 NONAME DATA 16 + _ZN24QDeclarativeScriptAction19getStaticMetaObjectEv @ 1729 NONAME + _ZN24QDeclarativeScriptAction24setStateChangeScriptNameERK7QString @ 1730 NONAME + _ZN24QDeclarativeScriptAction9setScriptERK24QDeclarativeScriptString @ 1731 NONAME + _ZN24QDeclarativeScriptActionC1EP7QObject @ 1732 NONAME + _ZN24QDeclarativeScriptActionC2EP7QObject @ 1733 NONAME + _ZN24QDeclarativeScriptActionD0Ev @ 1734 NONAME + _ZN24QDeclarativeScriptActionD1Ev @ 1735 NONAME + _ZN24QDeclarativeScriptActionD2Ev @ 1736 NONAME + _ZNK24QDeclarativeScriptAction10metaObjectEv @ 1737 NONAME + _ZNK24QDeclarativeScriptAction21stateChangeScriptNameEv @ 1738 NONAME + _ZNK24QDeclarativeScriptAction6scriptEv @ 1739 NONAME + _ZTI24QDeclarativeScriptAction @ 1740 NONAME + _ZTV24QDeclarativeScriptAction @ 1741 NONAME + _ZThn12_N24QDeclarativeScriptActionD0Ev @ 1742 NONAME + _ZThn12_N24QDeclarativeScriptActionD1Ev @ 1743 NONAME + _ZThn8_N24QDeclarativeScriptActionD0Ev @ 1744 NONAME + _ZThn8_N24QDeclarativeScriptActionD1Ev @ 1745 NONAME -- cgit v0.12 From 52409912fdb150111e0559d9b44c12bca3126a61 Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 6 Sep 2010 16:23:35 +0200 Subject: Fixed incorrect Symbian scoping. The missing install functionality is only true for mmp based systems. --- src/3rdparty/webkit/WebCore/WebCore.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 87638a0..5f688f3 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -2860,13 +2860,13 @@ contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) { } } -!symbian { +!symbian-abld:!symbian-sbsv2 { modfile.files = $$moduleFile modfile.path = $$[QMAKE_MKSPECS]/modules INSTALLS += modfile } else { - # INSTALLS is not implemented in qmake's s60 generators, copy headers manually + # INSTALLS is not implemented in qmake's mmp generators, copy headers manually inst_modfile.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT} inst_modfile.input = moduleFile -- cgit v0.12 From 82575a9f6123eed3e8581b6e73833924fe47cace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 16 Sep 2010 09:53:32 +0200 Subject: Fixed regression in QPixmap::size() for null pixmaps. After change 79eef278228aac21fbf QPixmap::size() started returning QSize(-1, -1) for null pixmaps. This restores the old behavior of returning QSize(0, 0), and is symmetric with QImage::size(). Task-number: QT-3934 Reviewed-by: Trond --- src/gui/image/qpixmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index c039ca8..66a861d 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -579,7 +579,7 @@ int QPixmap::height() const */ QSize QPixmap::size() const { - return data ? QSize(data->width(), data->height()) : QSize(); + return data ? QSize(data->width(), data->height()) : QSize(0, 0); } /*! -- cgit v0.12 From 99205499b848d2af5502b63ecee8cfd4c577ec42 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Thu, 16 Sep 2010 11:25:34 +0200 Subject: Fix warnings --- src/declarative/qml/qdeclarativecustomparser_p.h | 2 +- src/declarative/util/qdeclarativepixmapcache_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qdeclarativecustomparser_p.h b/src/declarative/qml/qdeclarativecustomparser_p.h index 509e30a..c3f9dd2 100644 --- a/src/declarative/qml/qdeclarativecustomparser_p.h +++ b/src/declarative/qml/qdeclarativecustomparser_p.h @@ -117,7 +117,7 @@ public: NoFlag = 0x00000000, AcceptsAttachedProperties = 0x00000001 }; - Q_DECLARE_FLAGS(Flags, Flag); + Q_DECLARE_FLAGS(Flags, Flag) QDeclarativeCustomParser() : compiler(0), object(0), m_flags(NoFlag) {} QDeclarativeCustomParser(Flags f) : compiler(0), object(0), m_flags(f) {} diff --git a/src/declarative/util/qdeclarativepixmapcache_p.h b/src/declarative/util/qdeclarativepixmapcache_p.h index b4d88bd..2e83cc4 100644 --- a/src/declarative/util/qdeclarativepixmapcache_p.h +++ b/src/declarative/util/qdeclarativepixmapcache_p.h @@ -98,7 +98,7 @@ public: bool connectDownloadProgress(QObject *, int); private: - Q_DISABLE_COPY(QDeclarativePixmap); + Q_DISABLE_COPY(QDeclarativePixmap) QDeclarativePixmapData *d; }; -- cgit v0.12 From db701aac50cf0e60d64697743331b437630e1d51 Mon Sep 17 00:00:00 2001 From: mread Date: Thu, 16 Sep 2010 14:33:35 +0100 Subject: QTBUG-4852 Turning on runtime nested exception support where available Added nested_exceptions.prf to the symbian mkspecs features, and used it from the stl.prf config. nested_exceptions.prf adds the .mmp flag to use the nested exceptions runtime support library for apps. stl.prf will add nested_exceptions to the config when the support library is present. Since this check depends on the existence of the runtime support library when qmake is run, qtp will have to add nested_exceptions to their config when building with nested exception support. This change means that, where nested exceptions are supported on Symbian, apps will no longer crash if a nested exception is encountered at runtime. Task-number: QTBUG-4852 Reviewed-by: Miikka Heikkinen --- mkspecs/features/symbian/nested_exceptions.prf | 4 ++++ mkspecs/features/symbian/stl.prf | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 mkspecs/features/symbian/nested_exceptions.prf diff --git a/mkspecs/features/symbian/nested_exceptions.prf b/mkspecs/features/symbian/nested_exceptions.prf new file mode 100644 index 0000000..defca94 --- /dev/null +++ b/mkspecs/features/symbian/nested_exceptions.prf @@ -0,0 +1,4 @@ +# use nested exceptions runtime support for apps +contains(TEMPLATE, app) { + MMP_RULES *= EPOCNESTEDEXCEPTIONS +} diff --git a/mkspecs/features/symbian/stl.prf b/mkspecs/features/symbian/stl.prf index 2a3bce4..65d4b93 100644 --- a/mkspecs/features/symbian/stl.prf +++ b/mkspecs/features/symbian/stl.prf @@ -36,3 +36,8 @@ equals(use_libstdcppv5, true) { } else { LIBS *= -llibstdcpp.dll } + +# use the runtime support for nested exceptions, if a library is available +exists($${EPOCROOT}epoc32/release/armv5/urel/usrt_nx_*.lib) { + CONFIG += nested_exceptions +} -- cgit v0.12 From 61ffabaf55f4130114ede74f90ae820bebbfa84a Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Thu, 16 Sep 2010 15:46:23 +0200 Subject: Restore 4.7.0 behavior that non-existing paths are possible. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changing a relative path to a non-existing absolute path used to work, this should work again after this patch. Reviewed-by: João Abecasis --- src/corelib/io/qdir.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index fcd17f7..efcc8f9 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1550,10 +1550,11 @@ bool QDir::makeAbsolute() // ### What do the return values signify? QScopedPointer dir(new QDirPrivate(*d_ptr.constData())); dir->setPath(absolutePath); - if (!(dir->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType)) + d_ptr = dir.take(); + + if (!(d_ptr->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType)) return false; - d_ptr = dir.take(); return true; } -- cgit v0.12 From 093221ee4ca3b6ca08731c6d7cb71c360ef68a18 Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 16 Sep 2010 15:33:33 +0200 Subject: Fixed EPOCROOT references in createpackage.pl. The makefile build system does not require EPOCROOT to end in a slash. RevBy: Jani Hautakangas --- bin/createpackage.pl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 361b32d..cce0b54 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -139,6 +139,9 @@ unless (GetOptions('i|install' => \$install, Usage(); } +my $epocroot = $ENV{EPOCROOT}; +$epocroot =~ s,[\\/]$,,x; + my $certfilepath = abs_path(dirname($certfile)); # Read params to variables @@ -303,12 +306,12 @@ if ($preprocessonly) { } if($stub) { - if(!($ENV{EPOCROOT})) { die("EPOCROOT must be set to create stub sis files"); } - my $systeminstall = "$ENV{EPOCROOT}epoc32/data/z/system/install"; + if(!($epocroot)) { die("EPOCROOT must be set to create stub sis files"); } + my $systeminstall = "$epocroot/epoc32/data/z/system/install"; mkpath($systeminstall); my $stub_sis_name = $systeminstall."/".$stub_sis_name; # Create stub SIS. - system ("$ENV{EPOCROOT}epoc32/tools/makesis -s $pkgoutput $stub_sis_name"); + system ("$epocroot/epoc32/tools/makesis -s $pkgoutput $stub_sis_name"); } else { if ($certtext eq "Self Signed" && !@certificates @@ -321,8 +324,8 @@ if($stub) { # Create SIS. # The 'and' is because system uses 0 to indicate success. - if($ENV{EPOCROOT}) { - system ("$ENV{EPOCROOT}epoc32/tools/makesis $pkgoutput $unsigned_sis_name") and die ("makesis failed"); + if($epocroot) { + system ("$epocroot/epoc32/tools/makesis $pkgoutput $unsigned_sis_name") and die ("makesis failed"); } else { system ("makesis $pkgoutput $unsigned_sis_name") and die ("makesis failed"); } -- cgit v0.12 From acc84a9d0d3427155298db3a8c0ad406d078de0e Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 16 Sep 2010 16:59:14 +0300 Subject: Check S60_VERSION instead of existence of certain files in bearer plugin Checking for existence of files does not work in clean platform builds, so check the S60_VERSION instead, which can be explicitly set by those builds to correct value. Task-number: QT-3949 Reviewed-by: axis --- src/plugins/bearer/symbian/3_2/3_2.pro | 12 +++++++----- src/plugins/bearer/symbian/symbian_3/symbian_3.pro | 18 ++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/plugins/bearer/symbian/3_2/3_2.pro b/src/plugins/bearer/symbian/3_2/3_2.pro index 6f3ecaf..ac3b3f8 100644 --- a/src/plugins/bearer/symbian/3_2/3_2.pro +++ b/src/plugins/bearer/symbian/3_2/3_2.pro @@ -1,13 +1,15 @@ include(../symbian.pri) symbian { - exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \ - exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) { + contains(S60_VERSION, 3.1) { + is_using_gnupoc { + LIBS += -lapengine + } else { + LIBS += -lAPEngine + } + } else { DEFINES += SNAP_FUNCTIONALITY_AVAILABLE LIBS += -lcmmanager - } else { - # Fall back to 3_1 implementation on platforms that do not have cmmanager - LIBS += -lapengine } } diff --git a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro index fd66198..ef90ad2 100644 --- a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro +++ b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro @@ -1,22 +1,20 @@ include(../symbian.pri) symbian { - exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \ - exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) { + contains(S60_VERSION, 3.1) { + is_using_gnupoc { + LIBS += -lapengine + } else { + LIBS += -lAPEngine + } + } else { DEFINES += SNAP_FUNCTIONALITY_AVAILABLE LIBS += -lcmmanager - exists($$prependEpocroot($$MW_LAYER_PUBLIC_EXPORT_PATH(extendedconnpref.h))) { + !contains(S60_VERSION, 3.2):!contains(S60_VERSION, 5.0) { DEFINES += OCC_FUNCTIONALITY_AVAILABLE LIBS += -lextendedconnpref } - } else { - # Fall back to 3_1 implementation on platforms that do not have cmmanager - is_using_gnupoc { - LIBS += -lapengine - } else { - LIBS += -lAPEngine - } } } -- cgit v0.12